hydra-queue-runner: Support running in a NixOS container

[?]
Sep 25, 2019, 3:26 PM
2GRQJZT6YNH32ZAXX3OALH7Z3XU3YTPH4SBTMG5ZZ373KHYFXZ7AC

Dependencies

  • [2] PW4TLMWS Sync with latest Nix
  • [3] G7KWXSFM Distinguish build step states
  • [4] 2BPAQMDH hydra-queue-runner: better error message if nix-store can not be started
  • [5] IKJBYIGY Update to reflect BinaryCacheStore changes
  • [6] EVSK5TBB Fix version test
  • [7] 5AIYUMTB Basic remote building
  • [8] PLA4FYMZ Fix regression caused by ee2e9f53
  • [9] BYVRA54Q Temporarily disable machines on any exception, not just connection failures
  • [10] LSUX6IQR Update to latest nixUnstable
  • [11] SL3WSRAC hydra-queue-runner: Limit memory usage
  • [12] 73YR46NJ hydra-queue-runner: Write directly to a binary cache
  • [13] VZKB5CIE Workaround for RemoteStore not supporting cmdBuildDerivation yet
  • [14] 7VQ4ALFY Update "make check" for the new queue runner
  • [15] FITVNQ2S Keep track of the time we spend copying to/from build machines
  • [16] EFWDY2V7 Support testing build determinism
  • [17] 5CNQUQ77 Bump Nix
  • [18] 4VYY2ADP Allow the machines file to specify host public keys
  • [19] BG6PEOB2 Make the output size limit configurable
  • [*] HJOEIMLR Refactor

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 51
    [5.297][4.21:68]()
    if (machine->sshName == "localhost") {
    [5.297]
    [4.68]
    if (machine->isLocalhost()) {
  • replacement in src/hydra-queue-runner/build-remote.cc at line 193
    [5.917][5.917:973]()
    if (GET_PROTOCOL_MINOR(remoteVersion) >= 1)
    [5.917]
    [5.973]
    // Always send the derivation to localhost, since it's a
    // no-op anyway but we might not be privileged to use
    // cmdBuildDerivation (e.g. if we're running in a NixOS
    // container).
    if (GET_PROTOCOL_MINOR(remoteVersion) >= 1 && !machine->isLocalhost())
  • replacement in src/hydra-queue-runner/build-remote.cc at line 243
    [5.2491][2.0:100]()
    copyClosure(ref<Store>(localStore), destStore, step->drv.inputSrcs, NoRepair, NoCheckSigs);
    [5.2491]
    [5.3876]
    if (localStore != std::shared_ptr<Store>(destStore))
    copyClosure(ref<Store>(localStore), destStore, step->drv.inputSrcs, NoRepair, NoCheckSigs);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 247
    [5.2581][5.2581:2639]()
    if (/* machine->sshName != "localhost" */ true) {
    [5.2581]
    [5.0]
    if (!machine->isLocalhost()) {
  • replacement in src/hydra-queue-runner/build-remote.cc at line 389
    [5.7000][5.7000:7058]()
    if (/* machine->sshName != "localhost" */ true) {
    [5.7000]
    [3.356]
    result.accessor = destStore->getFSAccessor();
    if (!machine->isLocalhost() || localStore != std::shared_ptr<Store>(destStore)) {
  • edit in src/hydra-queue-runner/build-remote.cc at line 436
    [5.8736][5.678:679](),[5.678][5.678:679](),[5.679][5.8737:8795]()
    result.accessor = destStore->getFSAccessor();
  • edit in src/hydra-queue-runner/state.hh at line 277
    [21.4328]
    [21.4328]
    bool isLocalhost()
    {
    return sshName == "localhost";
    }