Commit bad33898 authored by Ramon Nou's avatar Ramon Nou Committed by Marc Vef
Browse files

Reduced syscall log and other gkfwd fixes

parent 12d478eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@
namespace gkfs::config {

constexpr auto hostfile_path = "./gkfs_hosts.txt";
constexpr auto forwarding_file_path = "./gkfs_forwarding.map";
// We do not default this, ENV variable always required.
constexpr auto forwarding_file_path = "";

namespace io {
/*
+4 −3
Original line number Diff line number Diff line
@@ -203,7 +203,8 @@ init_environment() {
    /* Setup distributor */
    auto forwarding_map_file = gkfs::env::get_var(
            gkfs::env::FORWARDING_MAP_FILE, gkfs::config::forwarding_file_path);
    if(forwarding_map_file.empty()) {

    if(!forwarding_map_file.empty()) {
        try {
            gkfs::utils::load_forwarding_map();

@@ -288,7 +289,7 @@ init_preload() {

    auto forwarding_map_file = gkfs::env::get_var(
            gkfs::env::FORWARDING_MAP_FILE, gkfs::config::forwarding_file_path);
    if(forwarding_map_file.empty()) {
    if(!forwarding_map_file.empty()) {
        init_forwarding_mapper();
    }

@@ -304,7 +305,7 @@ void
destroy_preload() {
    auto forwarding_map_file = gkfs::env::get_var(
            gkfs::env::FORWARDING_MAP_FILE, gkfs::config::forwarding_file_path);
    if(forwarding_map_file.empty()) {
    if(!forwarding_map_file.empty()) {
        destroy_forwarding_mapper();
    }
    CTX->clear_hosts();
+6 −3
Original line number Diff line number Diff line
@@ -521,7 +521,8 @@ class ShellClient:
            'LD_PRELOAD'           : str(self._preload_library),
            'LIBGKFS_HOSTS_FILE'   : str(self.cwd / gkfs_hosts_file),
            'LIBGKFS_LOG'          : gkfs_client_log_level,
            'LIBGKFS_LOG_OUTPUT'   : str(self._workspace.logdir / gkfs_client_log_file)
            'LIBGKFS_LOG_OUTPUT'   : str(self._workspace.logdir / gkfs_client_log_file),
            'LIBGKFS_LOG_SYSCALL_FILTER': gkfs_client_log_syscall_filter
        }

        self._env.update(self._patched_env)
@@ -908,7 +909,8 @@ class FwdClient:
            'LIBGKFS_HOSTS_FILE'            : str(self.cwd / gkfwd_hosts_file),
            'LIBGKFS_FORWARDING_MAP_FILE'   : str(self.cwd / gkfwd_forwarding_map_file_local),
            'LIBGKFS_LOG'                   : gkfs_client_log_level,
            'LIBGKFS_LOG_OUTPUT'            : str(self._workspace.logdir / gkfwd_client_log_file_local)
            'LIBGKFS_LOG_OUTPUT'            : str(self._workspace.logdir / gkfwd_client_log_file_local),
            'LIBGKFS_LOG_SYSCALL_FILTER': gkfs_client_log_syscall_filter
        }

        self._env.update(self._patched_env)
@@ -998,7 +1000,8 @@ class ShellFwdClient:
            'LIBGKFS_HOSTS_FILE'            : str(self.cwd / gkfwd_hosts_file),
            'LIBGKFS_FORWARDING_MAP_FILE'   : str(self.cwd / gkfwd_forwarding_map_file),
            'LIBGKFS_LOG'                   : gkfwd_client_log_level,
            'LIBGKFS_LOG_OUTPUT'            : str(self._workspace.logdir / gkfwd_client_log_file)
            'LIBGKFS_LOG_OUTPUT'            : str(self._workspace.logdir / gkfwd_client_log_file),
            'LIBGKFS_LOG_SYSCALL_FILTER': gkfs_client_log_syscall_filter
        }

        self._env.update(self._patched_env)