upgrades-migrations / preupgrade-assistant-modules

Modules for the Preupgrade Assistant tool. Disclaimer: It was fun. R.I.P. :-)
GNU General Public License v3.0
3 stars 11 forks source link

system/initscripts/ifcfg - edit udev rules,style enhancement #92

Closed jmazanek closed 6 years ago

jmazanek commented 6 years ago

Resolves #72

jmazanek commented 6 years ago

Made a new build to reflect the issue https://github.com/upgrades-migrations/preupgrade-assistant-modules/issues/72. Summary edited

jmazanek commented 6 years ago

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:

  1. Install the RHEL 6 system with at least 2 network interfaces with eth* kernel naming.
  2. In one of the relevant ifcfg-eth* config files add the "MACADDR" directive which should trigger inhibit.
  3. Run the preupgrade-assistant analysis - it should end with needs_action result
  4. Run the redhat-upgrade-tool - the upgrade process should be stopped by the pre-upgrade script generated by this fix.
jmazanek commented 6 years ago

@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?

tcerna commented 6 years ago

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

2] Have machine with two network interfaces, both have set HWADDR and MACADDR directives

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