Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-24786 Satellite displays the CV and LCE values in the Host edit form whereas they are not associated with the host at database level
  3. SAT-25660

[QE] Satellite displays the CV and LCE values in the Host edit form whereas they are not associated with the host at database level

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Hosts - Content
    • Sprint 134, Sprint 135, Sprint 136, Sprint 137, Sprint 138, Sprint 139, Sprint 140, Sprint 141

      Description of problem:

      If a host is associated with a host group and later was unregistered, The stale profile that exists in the satellite, would not have any actual CV and LCE association ( host.content_facet.content_view_environments ) in the database but if edited from WebUI, the same profile will show inherited values from Hostgroup, resulting in inconsistent UI behavior.

      Version-Release number of selected component (if applicable):

      Red Hat Satellite 6.14.3 [ with https://github.com/Katello/katello/pull/10797/files applied ]

      Red Hat Satellite 6.15.0

      How reproducible:

      Always

      Steps to Reproduce:
      1. Create a Satellite 6.14.3 and apply the https://github.com/Katello/katello/pull/10797.patch [ excluding the webpack changes and test case ]

      2. Enable and sync these repos

      Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.8
      Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.9
      Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
      Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8.8
      Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8.9
      Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.8
      Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.9
      Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8
      Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8.8
      Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8.9
      Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs

      3. Create a lifecycle called Test, whose Parent is Library

      4. Add the Repos in point 2, in a CV called RHEL8 and publish + Promote the CV in Library as well as Test environments.

      5. Create a hostgroup that looks something like this:

      1. hammer hostgroup info --name "DHCP-RHEL8-BM"
        Id: 10
        Name: DHCP-RHEL8-BM
        Title: DHCP-RHEL8-BM
        Description:

      Network:
      Subnet ipv4: satellite-subnet-dhcp
      Domain: lab.example.com
      Operating system:
      Architecture: x86_64
      Operating System: RHEL 8.8
      Partition Table: Kickstart default
      PXE Loader: PXELinux BIOS
      Parameters:
      kt_activation_keys => RHEL8
      Locations:
      GSS
      Organizations:
      RedHat
      OpenSCAP Proxy:
      Content View:
      Id: 4
      Name: RHEL8
      Lifecycle Environment:
      Id: 1
      Name: Library
      Content Source:
      Id: 1
      Name: satellite614.lab.example.com
      Kickstart Repository:
      Id: 232

      6. Deploy a Host using this Hostgroup but while creating the host

        • Select the HG
        • Change the Lifecycle to Test
        • Select the OS to RHEL 8.9

      7. Once the host is deployed and built successfully:

        • Edit the host from All Hosts page and note down the CV\LCE\OS\Kickstart repo information
        • Hosts --> All Hosts --> Click open the host --> Details tab --> under the "Provisioning templates" card, click on "Kickstart Default" and note down the media URLs at the top

      8. Ensure that "Delete Host upon unregister" setting is set to false in Satellite settings.

      9. SSH to the host and unregister it using "subscription-manager unregister"

      10. Check the host's CV\LCE\OS\Kickstart repo assignments via rake console.

      foreman-rake console
      h = Host.last
      h.os
      pp h.content_facet
      h.content_facet.content_view_environments
      h.content_views
      h.lifecycle_environments
      exit

      11. Repeat Step 7 to see how the template preview and LCE\CV association for the host looks like

      Actual results:

      Step 7:

        • Expected LCE\CV\OS is associated with the host. HG settings are not overriding them.
        • Kickstart baseOS 8.9 is associated with the host.
        • Also when the template was rendered, we got to see two URLs for BaseOS and Appstream kickstart 8.9 repos as expected as well.

      Step 10:

        • No CV or LCEs are associated with the Host and content_facet.content_view_environments is nil
        • Kickstart repo 8.9 is still associated with the host.

      Step 11:

        • A preview of the kickstart template against that host profile shows just the BaseOS kickstart 8.9 URl and missing the Appstream URL
        • Editing the Host shows, CV and LCE values are set as "RHEL8" and "Library" which is what we had set in the HG. So it is safe to assume that the values are being inherited from HG but showing up as something that is directly assigned to the host.

      Expected results:

      If at the DB level, The unregistered host has no CV or LCE associations present, then in the Host Edit form also,

      • Either the values for CV or LCE would be null or blank
      • Or, if they are expected to be inherited from the HG, then the values needs to show up in a way that can be easily identified i.e. whether they are inherited from HG or set directly on the host.

      Additional info:

      Please check the support case 03796000 and the discussion on the same for additional information

      QE Tracker for https://issues.redhat.com/browse/SAT-24786
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2277130
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2277133

            rhn-support-visawant Vijaykumar Sawant
            satellite-focaccia-bot Focaccia Bot
            Vijaykumar Sawant Vijaykumar Sawant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d