Closed jmazanek closed 6 years ago
Made a new build to reflect the issue https://github.com/upgrades-migrations/preupgrade-assistant-modules/issues/72. Summary edited
As discussed off-line with @tcerna , only the upgrade inhibition needs to be tested, as the rest is either tested by the customer or is sufficiently verified by the code review.
How to test:
@tcerna , thanks to your testing, I have spotted additional bug, that wasn't previously caught. The logic would be incorrect if there were exactly 1 ifcfg-ethX with HWADDR and exactly 1 ifcfg-ethX without HWADDR. It probably escaped my attention, because I tested everything on systems with 2+ ifaces. Can you please test now with a new build and in addition to the steps described in the comment above, also check that the message "preupg.risk.HIGH: You use multiple network devices with old style 'ethX' names." is printed every time there are multiple ifcfg files with DEVICE value and file extension matching the interface name? ( regardless of number of HWADDR directives) @bocekm can you please review this change?
Verified in: preupgrade-assistant-2.6.0-1.el6.noarch preupgrade-assistant-el6toel7-0.7.4-0.201806111315Z.PR92.el6_8.noarch
1] Have machine with two network interfaces, both have set HWADDR directive, no directive MACADDR is set
run preupg and see result of 'Ethernet Interface naming':
preupg.risk.SLIGHT: You use one network device with an old style 'ethX' name.
preupg.log.INFO: On the target system, the eth0 interface will become net0.
preupg.log.INFO: On the target system, the eth1 interface will become net1.
preupg.risk.HIGH: You use multiple network devices with old style 'ethX' names.
run redhat-upgrade-tool, it ended correctly with possibility of reboot and updade to rhel-7.5:
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface net0:
Determining IP information for net0... done.
[ OK ]
Finished. Reboot to start upgrade.
2] Have machine with two network interfaces, both have set HWADDR and MACADDR directives
run preupg and see result of 'Ethernet Interface naming':
preupg.risk.SLIGHT: You use one network device with an old style 'ethX' name.
preupg.risk.HIGH: Comment out the MACADDR directive in the ifcfg files and run the Preupgrade Assistant again to enable the upgrade.
preupg.risk.HIGH: You use multiple network devices with old style 'ethX' names.
run redhat-upgrade-tool, it ended correctly with exit code 1. it stopped on script invalid_config_check because of directive MACADDR:
Invalid network configuration detected, stopping upgrade
Following preupgrade script(s) failed:
/root/preupgrade/preupgrade-scripts/invalid_config_check.sh exited with status 1
exiting
3] Verified also output of this module from preupg tool. There were two ethernet interfaces where one has set only MACADDR directive and second only HWADDR directive
preupg.risk.SLIGHT: You use one network device with an old style 'ethX' name.
preupg.risk.SLIGHT: /etc/sysconfig/network-scripts/ifcfg-eth1 is old style ethX name without HWADDR, its name can change after the upgrade.
preupg.risk.HIGH: Comment out the MACADDR directive in the ifcfg files and run the Preupgrade Assistant again to enable the upgrade.
preupg.risk.HIGH: You use multiple network devices with old style 'ethX' names.
Resolves #72