Commit a8e48ae1 authored by Ramon Nou's avatar Ramon Nou Committed by Ramon Nou
Browse files

Join both daemons using --enable-forwarding

parent 46429f41
Loading
Loading
Loading
Loading
+3 −20
Original line number Diff line number Diff line
@@ -65,23 +65,6 @@ gkfs:
      - ${INSTALL_PATH}
    expire_in: 1 week

gkfwd:
  stage: build
  image: gekkofs/deps:0.9.2
  interruptible: true
  needs: []
  script:
    - cmake --preset ci-forwarding-coverage
    - cmake --build ${BUILD_PATH} -j $(nproc) --target install
    # reduce artifacts size
    - ${CI_SCRIPTS_DIR}/trim_build_artifacts.sh ${BUILD_PATH}
  artifacts:
    paths:
      - ${BUILD_PATH}
      - ${INSTALL_PATH}
    expire_in: 1 week


################################################################################
## Testing
################################################################################
@@ -156,7 +139,7 @@ gkfwd:integration:
  stage: test
  image: gekkofs/testing:0.9.2
  interruptible: true
  needs: ['gkfwd']
  needs: ['gkfs']
  parallel:
    matrix:
      - SUBTEST: [ forwarding ]
@@ -274,7 +257,7 @@ coverage:baseline:
  stage: report
  image: gekkofs/testing:0.9.2
  interruptible: true
  needs: ['gkfs', 'gkfwd']
  needs: ['gkfs']

  script:
    ## capture initial coverage information to establish a baseline
@@ -301,7 +284,7 @@ coverage:
  image: gekkofs/testing:0.9.2
#  needs: [ 'coverage:baseline', 'gkfs:integration', 'gkfwd:integration',
#           'gkfs:unit' ]
  needs: [ 'coverage:baseline', 'gkfs:integration', 'gkfs:unit' ]
  needs: [ 'coverage:baseline', 'gkfs:integration', 'gkfs:unit', 'gkfwd:integration']
  script:
    - cd ${CI_PROJECT_DIR}
    - cmake
+0 −59
Original line number Diff line number Diff line
@@ -27,14 +27,6 @@
        "deprecated": true
      }
    },
    {
      "name": "forwarding",
      "inherits": "default",
      "hidden": true,
      "cacheVariables": {
        "GKFS_ENABLE_FORWARDING": true
      }
    },
    {
      "name": "release",
      "hidden": true,
@@ -113,30 +105,6 @@
        "release"
      ]
    },
    {
      "name": "forwarding-debug",
      "displayName": "Forwarding gekkofs (debug)",
      "inherits": [
        "forwarding",
        "debug"
      ]
    },
    {
      "name": "forwarding-coverage",
      "displayName": "Forwarding gekkofs (coverage)",
      "inherits": [
        "forwarding",
        "coverage"
      ]
    },
    {
      "name": "forwarding-release",
      "displayName": "Forwarding gekkofs (release)",
      "inherits": [
        "forwarding",
        "release"
      ]
    },
    {
      "name": "ci-debug",
      "displayName": "Default gekkofs (debug, CI flags)",
@@ -171,33 +139,6 @@
        "default",
        "release"
      ]
    },
    {
      "name": "ci-forwarding-debug",
      "displayName": "Forwarding gekkofs (debug, CI flags)",
      "inherits": [
        "ci",
        "forwarding",
        "debug"
      ]
    },
    {
      "name": "ci-forwarding-coverage",
      "displayName": "Forwarding gekkofs (coverage, CI flags)",
      "inherits": [
        "ci",
        "forwarding",
        "coverage"
      ]
    },
    {
      "name": "ci-forwarding-release",
      "displayName": "Forwarding gekkofs (release, CI flags)",
      "inherits": [
        "ci",
        "forwarding",
        "release"
      ]
    }
  ]
}
+1 −2
Original line number Diff line number Diff line
@@ -49,9 +49,8 @@ static constexpr auto LOG_PER_PROCESS = ADD_PREFIX("LOG_PER_PROCESS");
static constexpr auto LOG_OUTPUT_TRUNC = ADD_PREFIX("LOG_OUTPUT_TRUNC");
static constexpr auto CWD = ADD_PREFIX("CWD");
static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE");
#ifdef GKFS_ENABLE_FORWARDING
static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE");
#endif

static constexpr auto NUM_REPL = ADD_PREFIX("NUM_REPL");
} // namespace gkfs::env

+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@
#define IOINTERCEPT_PRELOAD_HPP

#include <client/preload_context.hpp>

#include <common/env_util.hpp>
#include <client/env.hpp>
#define EUNKNOWN (-1)

#define CTX gkfs::preload::PreloadContext::getInstance()
+7 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ private:
    bool enable_stats_ = false;
    bool enable_chunkstats_ = false;
    bool enable_prometheus_ = false;
    bool enable_forwarding_ = false;
    std::string stats_file_;

    // Prometheus
@@ -246,6 +247,12 @@ public:
    void
    enable_chunkstats(bool enable_chunkstats);

    bool
    enable_forwarding() const;

    void
    enable_forwarding(bool enable_forwarding);

    bool
    enable_prometheus() const;

Loading