Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-25217

update run after self-upgrade uses inappropriate Y+1 update scenario

    • None
    • None
    • None
    • None
    • Yes

      Description of problem:
      satellite-maintain update run after self-upgrade uses inappropriate Y+1 update scenario
       

      How reproducible:
      determinictic
       

      Is this issue a regression from an earlier version:
      yes
       

      Steps to Reproduce:
      1. Plan and prepare for an upgrade by running self-upgrade
      # satellite-maintain self-upgrade

      2. Change your mind and try to yet update on current satellite version (before continuning in upgrade)
      # satellite-maintain update run

      >>> applying Y+1 update scenario on Y satellite version

      Actual behavior:
      [Describe the issue in detail, including what is happening and where]
      inappropriate Y+1 update scenario is applied

      Expected behavior:
      [Describe what should be happening instead]
      update prevents to apply Y+1 scenario
      Business Impact / Additional info:

       

            [SAT-25217] update run after self-upgrade uses inappropriate Y+1 update scenario

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Critical: Satellite 6.16.0 release), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:8906

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Critical: Satellite 6.16.0 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:8906

            VERIFIED.

            @Satellite 6.16.0 Snap 2.0
            rubygem-foreman_maintain-1.7.3-1.el8sat.noarch

            using the following manual reproducer:
            1) self-upgrade (to 6.16)

            # dnf repolist 
            Updating Subscription Management repositories.
            repo id                                                                                repo name
            Satellite_Engineering_Satellite_6_16_Composes_Satellite_Maintenance_6_16_RHEL8         Satellite Maintenance 6.16 RHEL8
            rhel-8-for-x86_64-appstream-rpms                                                       Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
            rhel-8-for-x86_64-baseos-rpms                                                          Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
            
            # satellite-maintain self-upgrade  --maintenance-repo-label Satellite_Engineering_Satellite_6_16_Composes_Satellite_Maintenance_6_16_RHEL8
            Running Enables the specified version's maintenance repository and,
            updates the satellite-maintain packages
            ================================================================================
            Update package(s) rubygem-foreman_maintain, satellite-maintain:       [OK]
            --------------------------------------------------------------------------------
            
            # rpm -q rubygem-foreman_maintain
            rubygem-foreman_maintain-1.7.3-1.el8sat.noarch
            

            2) try to run update for 6.16 while Satellite is still 6.15

            # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages
            Checking for new version of satellite-maintain...
            Nothing to update, can't find new version of satellite-maintain.
            
            This version of satellite-maintain only supports 6.16,
            but the installed version of Satellite is 6.15.
            
            Therefore the update command is not available right now.
            
            Please install a version of satellite-maintain that supports 6.15
            or perform an upgrade to 6.16 using the upgrade command.
            
            # echo $?
            78
            

            >>> inappropriate version update is not allowed and a user is messaged about the reason

            Lukas Pramuk added a comment - VERIFIED. @Satellite 6.16.0 Snap 2.0 rubygem-foreman_maintain-1.7.3-1.el8sat.noarch using the following manual reproducer: 1) self-upgrade (to 6.16) # dnf repolist Updating Subscription Management repositories. repo id repo name Satellite_Engineering_Satellite_6_16_Composes_Satellite_Maintenance_6_16_RHEL8 Satellite Maintenance 6.16 RHEL8 rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) # satellite-maintain self-upgrade --maintenance-repo-label Satellite_Engineering_Satellite_6_16_Composes_Satellite_Maintenance_6_16_RHEL8 Running Enables the specified version's maintenance repository and, updates the satellite-maintain packages ================================================================================ Update package(s) rubygem-foreman_maintain, satellite-maintain: [OK] -------------------------------------------------------------------------------- # rpm -q rubygem-foreman_maintain rubygem-foreman_maintain-1.7.3-1.el8sat.noarch 2) try to run update for 6.16 while Satellite is still 6.15 # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages Checking for new version of satellite-maintain... Nothing to update, can't find new version of satellite-maintain. This version of satellite-maintain only supports 6.16, but the installed version of Satellite is 6.15. Therefore the update command is not available right now. Please install a version of satellite-maintain that supports 6.15 or perform an upgrade to 6.16 using the upgrade command. # echo $? 78 >>> inappropriate version update is not allowed and a user is messaged about the reason

            Lukas Pramuk added a comment - - edited

            FailedQA.

            @Satellite Stream Snap 70
            rubygem-foreman_maintain-1.6.14-1.el8sat.noarch

            using the following manual reproducer:
            1) self-upgrade (to 6.16)

            # dnf repolist 
            Updating Subscription Management repositories.
            repo id                                                                                repo name
            Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8     Satellite Maintenance Stream RHEL8
            rhel-8-for-x86_64-appstream-rpms                                                       Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
            rhel-8-for-x86_64-baseos-rpms                                                          Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
            
            # satellite-maintain self-upgrade  --maintenance-repo-label Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8
            Running Enables the specified version's maintenance repository and,
            updates the satellite-maintain packages
            ================================================================================
            Update package(s) rubygem-foreman_maintain, satellite-maintain:       [OK]
            --------------------------------------------------------------------------------
            
            # rpm -q rubygem-foreman_maintain
            rubygem-foreman_maintain-1.6.14-1.el8sat.noarch
            

            2) try to run update for 6.16 while Satellite is still 6.15

            # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages
            Checking for new version of satellite-maintain...
            Nothing to update, can't find new version of satellite-maintain.
            --------------------------------------------------------------------------------
            Update finished.
            
            # echo $?
            0
            

            >>> there shouldn't be a message "Update finished." when no update is performed.

            >>> user is not prompted why an update process is being skipped - something like "You should run upgrade first ... before running update"

            Lukas Pramuk added a comment - - edited FailedQA. @Satellite Stream Snap 70 rubygem-foreman_maintain-1.6.14-1.el8sat.noarch using the following manual reproducer: 1) self-upgrade (to 6.16) # dnf repolist Updating Subscription Management repositories. repo id repo name Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8 Satellite Maintenance Stream RHEL8 rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) # satellite-maintain self-upgrade --maintenance-repo-label Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8 Running Enables the specified version's maintenance repository and, updates the satellite-maintain packages ================================================================================ Update package(s) rubygem-foreman_maintain, satellite-maintain: [OK] -------------------------------------------------------------------------------- # rpm -q rubygem-foreman_maintain rubygem-foreman_maintain-1.6.14-1.el8sat.noarch 2) try to run update for 6.16 while Satellite is still 6.15 # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages Checking for new version of satellite-maintain... Nothing to update, can't find new version of satellite-maintain. -------------------------------------------------------------------------------- Update finished. # echo $? 0 >>> there shouldn't be a message "Update finished." when no update is performed. >>> user is not prompted why an update process is being skipped - something like "You should run upgrade first ... before running update"

            I am going to FAIL this bug then. I don't like running 6.16.z update scenario prior running 6.16 upgrade scenario.

            We better discus this behavior live at Wed Sync up.

            Lukas Pramuk added a comment - I am going to FAIL this bug then. I don't like running 6.16.z update scenario prior running 6.16 upgrade scenario. We better discus this behavior live at Wed Sync up.

            Eric Helms added a comment -

            No - because it's valid to update the Satellite even if its with the newer foreman-maintain. This is also a hard scenario to detect since update checks the current Satellite version on the box.

            Eric Helms added a comment - No - because it's valid to update the Satellite even if its with the newer foreman-maintain. This is also a hard scenario to detect since update checks the current Satellite version on the box.

            Lukas Pramuk added a comment - - edited

            ehelms@redhat.com I don't feel like I am verifying this bug

            Are your changes also covering to prevent the following steps to be performed ?
            1. self-upgrade (to 6.16)
            2. update

            # dnf repolist 
            Updating Subscription Management repositories.
            repo id                                                                                                                                                   repo name
            Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8                                                                        Satellite Maintenance stream RHEL8
            rhel-8-for-x86_64-appstream-rpms                                                                                                                          Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
            rhel-8-for-x86_64-baseos-rpms                                                                                                                             Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
            
            # satellite-maintain self-upgrade  --maintenance-repo-label Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8
            Running Enables the specified version's maintenance repository and,
            updates the satellite-maintain packages
            ================================================================================
            Update package(s) rubygem-foreman_maintain, satellite-maintain:       [OK]
            --------------------------------------------------------------------------------
            
            # rpm -qa rubygem*maintain
            rubygem-foreman_maintain-1.6.10-1.el8sat.noarch
            
            # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages
            Checking for new version of satellite-maintain...
            Nothing to update, can't find new version of satellite-maintain.
            Running preparation steps required to run the next scenarios
            ================================================================================
            Check whether all services are running:                               [OK]
            --------------------------------------------------------------------------------
            Check whether system has any non Red Hat repositories (e.g.: EPEL) enabled: 
            - Checking repositories enabled on the system                         [OK]      
            --------------------------------------------------------------------------------
            
            
            Running Checks before updating
            ...
            
            --------------------------------------------------------------------------------
            Update finished.
            

            Lukas Pramuk added a comment - - edited ehelms@redhat.com I don't feel like I am verifying this bug Are your changes also covering to prevent the following steps to be performed ? 1. self-upgrade (to 6.16) 2. update # dnf repolist Updating Subscription Management repositories. repo id repo name Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8 Satellite Maintenance stream RHEL8 rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) # satellite-maintain self-upgrade --maintenance-repo-label Satellite_Engineering_Satellite_stream_Composes_Satellite_Maintenance_stream_RHEL8 Running Enables the specified version's maintenance repository and, updates the satellite-maintain packages ================================================================================ Update package(s) rubygem-foreman_maintain, satellite-maintain: [OK] -------------------------------------------------------------------------------- # rpm -qa rubygem*maintain rubygem-foreman_maintain-1.6.10-1.el8sat.noarch # satellite-maintain update run -y -w repositories-validate,repositories-setup,non-rh-packages Checking for new version of satellite-maintain... Nothing to update, can't find new version of satellite-maintain. Running preparation steps required to run the next scenarios ================================================================================ Check whether all services are running: [OK] -------------------------------------------------------------------------------- Check whether system has any non Red Hat repositories (e.g.: EPEL) enabled: - Checking repositories enabled on the system [OK] -------------------------------------------------------------------------------- Running Checks before updating ... -------------------------------------------------------------------------------- Update finished.

              ehelms@redhat.com Eric Helms
              lpramuk Lukas Pramuk
              Lukas Pramuk Lukas Pramuk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: