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:
parent
e81d38c02b
commit
00d30496ca
2 changed files with 28 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue