Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-3072

Stop the Conversion Task when convert2rhel.ini was edited

      Goal: 

      • In case the customer had convert2rhel installed prior to executing the Pre-conversion analysis or the Conversion Task and they created/edited a config file for convert2rhel (convert2rhel.ini), the Tasks shall not proceed with the convert2rhel execution.
      • The reason is that the config file is currently used only for entering RHSM credentials. And when convert2rhel find any credentials in the ini file, it uses them for (re-)registration to RHSM. But when running convert2rhel through the Insights Tasks, we can't let convert2rhel re-register the system because it would lead to a different RHSM UUID which is used as a host identifier by Insights and with that the rhcd communication between the host and Insights would break.

      Acceptance Criteria:

      • Before the conversion script (HMS-2015) calls convert2rhel, it looks at whether the /etc/convert2rhel.ini has been edited or whether /.convert2rhel.ini exists
        • If either is true, stop the conversion with an error message telling the user through Insights Tasks UI that they need to either remove the ini file(s)
        • Checking the /etc/convert2rhel.ini for edits can be done by `rpm -Va` and looking for '5' marking MD5 hash mismatch
      • This check is added also to the pre-conversion analysis script (HMS-2892)

        1. image-2023-11-30-10-43-30-866.png
          95 kB
          Andrea Waltlova
        2. image-2023-11-30-10-44-29-644.png
          82 kB
          Andrea Waltlova
        3. image-2023-11-30-10-52-00-444.png
          79 kB
          Andrea Waltlova
        4. Screenshot from 2023-12-12 10-51-57.png
          198 kB
          Martin Litwora
        5. Screenshot from 2023-12-19 17-17-06.png
          180 kB
          Martin Litwora
        6. Screenshot from 2023-12-19 17-24-31.png
          164 kB
          Martin Litwora

              awaltlov@redhat.com Andrea Waltlova
              mbocek@redhat.com Michal Bocek
              Martin Litwora Martin Litwora
              None
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: