Unverified Commit e49f8a68 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Change default log name

parent afc64ba8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -50,8 +50,8 @@
#define ENV_PREFIX "GKFS_"

// Log
#define DEFAULT_PRELOAD_LOG_PATH "/tmp/adafs_preload.log"
#define DEFAULT_DAEMON_LOG_PATH "/tmp/adafs_daemon.log"
#define DEFAULT_PRELOAD_LOG_PATH "/tmp/gkfs_preload.log"
#define DEFAULT_DAEMON_LOG_PATH "/tmp/gkfs_daemon.log"

#define DEFAULT_PRELOAD_LOG_LEVEL 4 // info
#define DEFAULT_DAEMON_LOG_LEVEL 4 // info
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ def shutdown_system(daemon_pid_path, nodelist, sigkill):
            time.sleep(1)
    print('Checking logs ...\n')

    cmd_chk_str = '%s "tail -4 /tmp/adafs_daemon.log"' % pssh
    cmd_chk_str = '%s "tail -4 /tmp/gkfs_daemon.log"' % pssh
    if PRETEND:
        print('Pretending: {}'.format(cmd_chk_str))
    else:
+6 −6
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ def init_system(daemon_path, rootdir, metadir, mountdir, nodelist, cleanroot, nu

    # clean root and metadata dir if needed
    if cleanroot:
        cmd_rm_str = '%s "rm -rf %s/* %s/* && truncate -s 0 /tmp/adafs_daemon.log /tmp/adafs_preload.log"' % (pssh, rootdir, metadir)
        cmd_rm_str = '%s "rm -rf %s/* %s/* && truncate -s 0 /tmp/gkfs_daemon.log /tmp/gkfs_preload.log"' % (pssh, rootdir, metadir)
        if PRETEND:
            print('Pretending: {}'.format(cmd_rm_str))
        else:
@@ -95,18 +95,18 @@ def init_system(daemon_path, rootdir, metadir, mountdir, nodelist, cleanroot, nu
    # Start deamons
    if nodefile:
        if len(numactl) == 0:
            cmd_str = '%s "nohup %s -r %s -i %s -m %s --hostfile %s > /tmp/adafs_daemon.log 2>&1 &"' \
            cmd_str = '%s "nohup %s -r %s -i %s -m %s --hostfile %s > /tmp/gkfs_daemon.log 2>&1 &"' \
                      % (pssh, daemon_path, rootdir, metadir, mountdir, nodelist)
        else:
            cmd_str = '%s "nohup numactl %s %s -r %s -i %s -m %s --hostfile %s > /tmp/adafs_daemon.log 2>&1 &"' \
            cmd_str = '%s "nohup numactl %s %s -r %s -i %s -m %s --hostfile %s > /tmp/gkfs_daemon.log 2>&1 &"' \
                      % (pssh, numactl, daemon_path, rootdir, metadir, mountdir, nodelist)

    else:
        if len(numactl) == 0:
            cmd_str = '%s "nohup %s -r %s -i %s -m %s --hosts %s > /tmp/adafs_daemon.log 2>&1 &"' \
            cmd_str = '%s "nohup %s -r %s -i %s -m %s --hosts %s > /tmp/gkfs_daemon.log 2>&1 &"' \
                      % (pssh, daemon_path, rootdir, metadir, mountdir, nodelist)
        else:
            cmd_str = '%s "nohup numactl %s %s -r %s -i %s -m %s --hosts %s > /tmp/adafs_daemon.log 2>&1 &"' \
            cmd_str = '%s "nohup numactl %s %s -r %s -i %s -m %s --hosts %s > /tmp/gkfs_daemon.log 2>&1 &"' \
                      % (pssh, numactl, daemon_path, rootdir, metadir, mountdir, nodelist)

    if PRETEND:
@@ -134,7 +134,7 @@ def init_system(daemon_path, rootdir, metadir, mountdir, nodelist, cleanroot, nu
            time.sleep(1)

    # Check adafs logs for errors
    cmd_chk_str = '%s "head -5 /tmp/adafs_daemon.log"' % pssh
    cmd_chk_str = '%s "head -5 /tmp/gkfs_daemon.log"' % pssh
    if PRETEND:
        print('Pretending: {}'.format(cmd_chk_str))
    else:
+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ void init_preload() {
    init_cwd();
    CTX->log()->debug("Current working directory: '{}'", CTX->cwd());
    if (get_daemon_pid() == -1 || CTX->mountdir().empty()) {
        std::cerr << "ADA-FS daemon not running or mountdir could not be loaded. Check adafs_preload.log" << std::endl;
        std::cerr << "GekkoFS daemon not running or mountdir could not be loaded. Check logs for more details" << std::endl;
        CTX->log()->error("{}() Daemon not running or mountdir not set", __func__);
        exit(EXIT_FAILURE);
    } else {