Skip to content

Commit

Permalink
upgrader: Inject --no-hostonly again if no initramfs-args
Browse files Browse the repository at this point in the history
Fixes: e901153

Fedora Silverblue doesn't specify any `initramfs-args` in the
treefile.   The above commit then caused us to omit `--no-hostonly`
which completely fails today because we sandbox dracut off
from seeing the real hardware and the host filesystems, so
it omits a lot of modules.

It wasn't noticed because Fedora CoreOS does always specify
arguments in the treefile.

Closes: #2343
  • Loading branch information
cgwalters authored and openshift-merge-robot committed Dec 10, 2020
1 parent 36614ae commit 0c29f51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/daemon/rpmostree-sysroot-upgrader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,16 @@ perform_local_assembly (RpmOstreeSysrootUpgrader *self,
for (char **it = args; it && *it; it++)
g_ptr_array_add (initramfs_args, g_strdup (*it));
}
else
{
/* If no initramfs-args were specified on the server side, for backwards compatibility
* let's still assume `--no-hostonly`; losing that will break things because
* we intentionally don't leak the system state to dracut.
* See https://discussion.fedoraproject.org/t/downgrading-kernel-on-silverblue/1928
* https://github.com/coreos/rpm-ostree/issues/2343
*/
g_ptr_array_add (initramfs_args, g_strdup ("--no-hostonly"));
}
}

/* If *just* the kernel changed, all we need to do is run depmod here.
Expand Down

0 comments on commit 0c29f51

Please sign in to comment.