I'm trying to spin up a new host to replace an old one, and I'm getting these weird failures on some Systemd.nspawned
properties:
mount: mount point /var/lib/container/nginx-primary/proc does not exist
** warning: user error (chroot ["/var/lib/container/nginx-primary","/usr/local/propellor/chroot/_var_lib_container_nginx-primary.shim/propellor","--continue","ChrootChain \"onyx.fusionapp.com\" \"/var/lib/container/nginx-primary\" True True"] exited 127)
onyx.fusionapp.com nspawned nginx-primary ... failed
chroot: failed to run command â/usr/local/propellor/chroot/_var_lib_container_nginx-primary.shim/propellorâ: No such file or directory
onyx.fusionapp.com nspawned apache-svn ... failed
onyx.fusionapp.com nspawned mail-relay ... failed
There's some weird race condition since sometimes the message about .../proc does not exist
shows up, and sometimes I get "failed" with no other error output. On further investigation, it turns out that debootstrap
is not installed on the remote system. Inserting an Apt.installed ["debootstrap"]
before the nspawned
properties seems to have fixed it; but looking at the code, I don't fully understand why it isn't being installed by Debootstrap.built
.
AFAICS,
Debootstrap.built
will always depend onDebootstrap.installed
.Maybe remove debootstrap and check if adding the
Debootstrap.installed
property gets debootstrap installed; perhaps that property was somehow not working for you.Indeed, your guess was correct:
Debootstrap.installed
printsdebootstrap installed ... ok
even on the first run, but in fact it is not installed. I believe this patch fixes the problem:diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index 59850c4..f9737ca 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -100,7 +100,7 @@ extractSuite (System (FreeBSD _) _) = Nothing installed :: RevertableProperty Linux Linux installed = install <!> remove where - install = check (isJust <$> programPath) $ + install = check (isNothing <$> programPath) $ (aptinstall `pickOS` sourceInstall) `describe` "debootstrap installed"