TT#105151 Stop adding "net.ifnames=0" to grub config

This is commit cd50e4934c applied again.

As explained in ab62171c49, the original
change had to be reverted because even if things work perfectly fine, in
the case of Vagrant machines (or when passing "vagrant" parameter to the
script) the udev-rules for persistent-net devices get removed, so then
the network interfaces get "random" names and the configuration in
/etc/network/interfaces doesn't match, the network is not brought up.

This removal happens in the case of {ce,pro,carrier}-trunk.mgm machines
of our tests, which shouldn't be needed, and also in the images created
for Vagrant machines, which is understandable because the machines could
be brought up with different PCIIDs in different versions of VirtualBox,
or due to some other difference -- not sure how we can ensure that the
PCIIDs as written in the udev-rules files will work in that case.

But in principle this change must go ahead when we solve these problems,
so submitting it again to be ready.

Change-Id: Ib39481a2608aa56e6ec6c9255e290787a6ce3af7
mr10.0
Manuel Montecelo 4 years ago
parent d6b5097a86
commit a50903a30c

@ -195,19 +195,6 @@ ensure_recent_package_versions() {
done
}
set_custom_grub_boot_options() {
echo "Adjusting default GRUB boot options (enabling net.ifnames=0)"
sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 net.ifnames=0"/' "${TARGET}/etc/default/grub"
echo "Invoking update-grub"
grml-chroot "${TARGET}" update-grub
if [ -d "${TARGET}/etc/.git" ]; then
echo "Commit /etc/default/grub changes using etckeeper"
grml-chroot "${TARGET}" etckeeper commit "/etc/default/grub changes"
fi
}
die() {
echo "$@" >&2
set_deploy_status "error"
@ -2263,8 +2250,6 @@ EOT
grml-chroot "${TARGET}" /bin/bash /tmp/retrieve_authorized_keys.sh
fi
set_custom_grub_boot_options
if "$VAGRANT" ; then
echo "Bootoption vagrant present, executing vagrant_configuration."
vagrant_configuration

Loading…
Cancel
Save