Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-31955

[RFE] Allow rhc workers to see env vars

    • Icon: Story Story
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.5
    • rhc
    • None
    • ZStream
    • sst_insights
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Approved Blocker
    • None
    • None
    • None

      Description

      When converting a system to RHEL using the convert2rhel utility, customers have a way to override certain pre-conversion analysis checks by setting CONVERT2RHEL_* environment variables. When executing a conversion through insights, convert2rhel is executed by python script that is executed by rhc-worker-script. In this case though convert2rhel doesn't have access to environment variables set on the host.

      Test Instructions

      1. Register a CentOS Linux 7 host to Insights https://console.redhat.com/insights/
      2. Arrange the system so that the pre-conversion analysis hits a conversion inhibitor
        mkdir /lib/modules/3.10.0-1160.102.1.el7.x86_64/kernel/drivers/net/bonding/custom
        mv /lib/modules/3.10.0-1160.102.1.el7.x86_64/kernel/drivers/net/bonding/bonding.ko.xz /lib/modules/3.10.0-1160.102.1.el7.x86_64/kernel/drivers/net/bonding/custom
        depmod
        modprobe bonding -v 
      1. Run the Pre-conversion analysis Task in Insights https://console.redhat.com/insights/tasks/ 
      2. Set the CONVERT2RHEL_ALLOW_UNAVAILABLE_KMODS=1 enviroment variable on the host as suggested in the pre-conversion analysis report, e.g. by exporting it in ~/.bashrc in case the root user has /bin/bash as a default shell.
      3. Run the analysis Task again and see that the inhibitor is detected again/is not overriden.

      Expected Results

      convert2rhel is executed in a context that contains the environment variables set on the system. For that the expectation is that rhc should provide the context to rhc-worker-script.

      Motivation / Justification

      Customers are now ill-advised in the pre-conversion analysis report that they can override conversion inhibitors by setting an environment variable while in fact they can't.

      Additional info

      In the future we want to allow customers to override the inhibitors by ticking a checkbox in the Tasks UI. That's to be defined yet under HMS-2712.

            ldupont@redhat.com Link Dupont
            mbocek@redhat.com Michal Bocek
            CSI Client Tools Bugs Bot CSI Client Tools Bugs Bot
            CSI Client Tools Bugs Bot CSI Client Tools Bugs Bot
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: