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

networking/samba - RFE #98

Closed jmazanek closed 6 years ago

jmazanek commented 6 years ago
jmazanek commented 6 years ago

Resolves issue : https://github.com/upgrades-migrations/preupgrade-assistant-modules/issues/79

jmazanek commented 6 years ago

How to test:

  1. On source system install the samba-common package.

  2. Run the preupgrade-asssitant with this build of the modules.

  3. Pre-upgrade results:

    • New log_medium_risk message informing user about possible incompatibilities in samba configuration should be printed in p-a result.
    • New message informing user about post-upgrade script and how to get the more detailed information after upgrade is appended to $SOLUTION_FILE.
    • The post-upgrade script is created in /root/preupgrade/postupgrade.d/smb/ directory.
  4. Upgrade the system using r-u-t.

  5. Post-upgrade results:

    • In the post-upgrade phase, post-upgrade script is run and checks the compatibility of the samba configuration file.
jmazanek commented 6 years ago

Corrected post-upgrade script to check a presence of "samba-common-tools. Please review. Texts reviewed.

AloisMahdal commented 6 years ago

Can you please confirm, @jmazanek

  1. Pre-upgrade results:

    • New log_medium_risk message informing user about possible incompatibilities in samba configuration should be printed in p-a result.
    • New message informing user about post-upgrade script and how to get the more detailed information after upgrade is appended to $SOLUTION_FILE.
    • The post-upgrade script is created in /root/preupgrade/postupgrade.d/smb/ directory.
  2. Post-upgrade results:

    • In the post-upgrade phase, post-upgrade script is run and checks the compatibility of the samba configuration file.

Are all these results triggered merely by installing the samba-common? (Ie. do we need to actually add some directives?)

If so, I assume these should be already observed in the samba tests we have. (I assume the samba-common is dependency of all samba-related stuff.)

jmazanek commented 6 years ago

@AloisMahdal all that should be triggered just by the package installed. No configuration changes are necessary

AloisMahdal commented 6 years ago

qa_ack: module integration test should be relatively easy; try with/without samba-common installed and check XML using test library.

Thanks, @jmazanek for quick answer.

tcerna commented 6 years ago

Ahoj @jmazanek , there should be check for this line: SMB_CFG=$(smbstatus -v | awk -F' = ' '$1 == "using configfile" { print $2 }')

If package samba is installed, everything works well. But if samba is not installed and samba-common is (no dependency between these packages), it fails. Other output of module seems well, but I'l investigate it deeply.

current output is: /root/preupgrade/RHEL6_7/networking/samba/check: line 31: smbstatus: command not found

jmazanek commented 6 years ago

@tcerna fixed in a new build

tcerna commented 6 years ago

Thank you Kubo, for your fix.

Verified it in preupgrade-assistant-el6toel7-0.7.6-0.201809111503Z.PR98.el6_8.noarch. Used new test case /CoreOS/preupgrade-assistant-el6toel7/ast/networking-samba for testing of pre-upgrade process (set packages and services, check risks and preupg results). Also upgrade test case /CoreOS/samba/Preupgrade was run and it worked as expected.