From a50903a30c5710529046bc19196ed42ce07e78b0 Mon Sep 17 00:00:00 2001 From: Manuel Montecelo Date: Wed, 9 Jun 2021 14:51:56 +0200 Subject: [PATCH] TT#105151 Stop adding "net.ifnames=0" to grub config This is commit cd50e4934cf4ab80149420d66cbce5191f620d07 applied again. As explained in ab62171c49c46fae2b7150ebc9e9d2e0a36843e1, 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 --- templates/scripts/includes/deployment.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index bfa91bd..0566365 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -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