Fix root creation when the root already exists but is owned by another user

[?]
Oct 19, 2017, 10:28 AM
INVXGPNKOM33VJULCY7CKPSVAIHSV4EYM4TT3QVL4VBGTMPJ6HHAC

Dependencies

  • [2] YXYXJDMB hydra-queue-runner: Write GC roots for outputs paths
  • [3] BRAESISH Warn if PostgreSQL appears stalled
  • [4] MHVIT4JY Split hydra-queue-runner.cc more
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] EPWEMRI2 Allow determinism checking for entire jobsets
  • [*] HJOEIMLR Refactor

Change contents

  • replacement in src/hydra-queue-runner/builder.cc at line 267
    [2.52][2.52:114]()
    writeFile(rootsDir + "/" + baseNameOf(path), "");
    [2.52]
    [2.114]
    addRoot(path);
  • edit in src/hydra-queue-runner/builder.cc at line 476
    [3.14591]
    void State::addRoot(const Path & storePath)
    {
    auto root = rootsDir + "/" + baseNameOf(storePath);
    if (!pathExists(root)) writeFile(root, "");
    }
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 843
    [7.2402]
    [7.2402]
    addRoot("/nix/store/rk9lahzm21qm0zjclv6mz0m4hy77wk14-vm-test-run-unnamed.drv");
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 225
    [2.301][2.301:367]()
    writeFile(rootsDir + "/" + baseNameOf(path), "");
    [2.301]
    [2.367]
    addRoot(path);
  • edit in src/hydra-queue-runner/state.hh at line 537
    [8.9109]
    [8.9109]
    void addRoot(const nix::Path & storePath);