Heuristically detect if a build may have failed due to a full disk

This will allow Hydra to detect that a build should not be marked as
"permanently failed", allowing it to be retried later.
This commit is contained in:
Eelco Dolstra 2014-02-17 14:15:56 +01:00
parent e81d38c02b
commit 00d30496ca
2 changed files with 28 additions and 5 deletions

View file

@ -456,8 +456,8 @@ void LocalStore::makeStoreWritable()
if (getuid() != 0) return;
/* Check if /nix/store is on a read-only mount. */
struct statvfs stat;
if (statvfs(settings.nixStore.c_str(), &stat) !=0)
throw SysError("Getting info of nix store mountpoint");
if (statvfs(settings.nixStore.c_str(), &stat) != 0)
throw SysError("getting info about the Nix store mount point");
if (stat.f_flag & ST_RDONLY) {
if (unshare(CLONE_NEWNS) == -1)