Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1896785

Summary: After upgrade the Satellite tfm-rubygem-foreman_remote_execution-cockpit package the WebConsole stop to work.
Product: Red Hat Satellite Reporter: Rudnei Bertol Jr. <rbertolj>
Component: PackagingAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: akarimi, aruzicka, ehelms, lstejska
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_remote_execution-4.1.0-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1908862 (view as bug list) Environment:
Last Closed: 2021-04-21 13:18:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rudnei Bertol Jr. 2020-11-11 14:26:27 UTC
Description of problem:

Once upgrade the Satellite the package tfm-rubygem-foreman_remote_execution-cockpit is being upgraded. However, it is breaking the symbolic link of the file '/usr/sbin/foreman-cockpit-session'.

Once the symbolic link is broken the WebConsole service stop to work on the Satellite 6

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

Satellite 6.7.5

How reproducible:

A complete reproduce is available on the Additional info.

NOTE: We cannot reproduce on Satellite 6.8, as we do have just one version for the packages available.


Steps to Reproduce:
1. Downgrade the packages tfm-rubygem-foreman_remote_execution-cockpit and tfm-rubygem-foreman_remote_execution
2. Upgrade one of those packages


Actual results:

The file '/usr/sbin/foreman-cockpit-session' is managed by the rpm tfm-rubygem-foreman_remote_execution and the file '/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.3/extra/cockpit/foreman-cockpit-session' is managed by the rpm tfm-rubygem-foreman_remote_execution-cockpit, if both packages are not upgraded together the symbolic link will break.

Expected results:

The files should be dependent on each other. If you upgrade one of those packages both should be upgraded together.


Additional info:

~~~
[root@bombsat67 ~]# rpm -qa |grep tfm-rubygem-foreman_remote_execution
tfm-rubygem-foreman_remote_execution-cockpit-2.0.10.2-1.el7sat.noarch
tfm-rubygem-foreman_remote_execution_core-1.3.0-1.el7sat.noarch
tfm-rubygem-foreman_remote_execution-2.0.10.2-1.el7sat.noarch

[root@bombsat67 ~]# yum upgrade tfm-rubygem-foreman_remote_execution --disableplugin=foreman-protector
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package tfm-rubygem-foreman_remote_execution.noarch 0:2.0.10.2-1.el7sat will be updated
---> Package tfm-rubygem-foreman_remote_execution.noarch 0:2.0.10.3-1.el7sat will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================
 Package                                                    Arch                         Version                                 Repository                                              Size
==============================================================================================================================================================================================
Updating:
 tfm-rubygem-foreman_remote_execution                       noarch                       2.0.10.3-1.el7sat                       rhel-7-server-satellite-6.7-rpms                       1.6 M

Transaction Summary
==============================================================================================================================================================================================
Upgrade  1 Package

Total download size: 1.6 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-satellite-6.7-rpms
tfm-rubygem-foreman_remote_execution-2.0.10.3-1.el7sat.noarch.rpm                                                                                                      | 1.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : tfm-rubygem-foreman_remote_execution-2.0.10.3-1.el7sat.noarch                                                                                                              1/2 
  Cleanup    : tfm-rubygem-foreman_remote_execution-2.0.10.2-1.el7sat.noarch                                                                                                              2/2 
  Verifying  : tfm-rubygem-foreman_remote_execution-2.0.10.3-1.el7sat.noarch                                                                                                              1/2 
  Verifying  : tfm-rubygem-foreman_remote_execution-2.0.10.2-1.el7sat.noarch                                                                                                              2/2 

Updated:
  tfm-rubygem-foreman_remote_execution.noarch 0:2.0.10.3-1.el7sat                                                                                                                             

Complete!

[root@bombsat67 ~]# ls -lht /usr/sbin/foreman-cockpit-session
lrwxrwxrwx. 1 root root 116 Nov 11 08:34 /usr/sbin/foreman-cockpit-session -> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.2/extra/cockpit/foreman-cockpit-session

[root@bombsat67 ~]# ls -lht /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.2/extra/cockpit/foreman-cockpit-session
ls: cannot access /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.2/extra/cockpit/foreman-cockpit-session: No such file or directory

[root@bombsat67 ~]# ls -lht /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.3/extra/cockpit/foreman-cockpit-session
-rwxrwxr-x. 1 root root 7.7K Oct  1 11:04 /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.3/extra/cockpit/foreman-cockpit-session

[root@bombsat67 ~]# rpm -qa |grep tfm-rubygem-foreman_remote_execution
tfm-rubygem-foreman_remote_execution-cockpit-2.0.10.2-1.el7sat.noarch
tfm-rubygem-foreman_remote_execution-2.0.10.3-1.el7sat.noarch
tfm-rubygem-foreman_remote_execution_core-1.3.0-1.el7sat.noarch

[root@bombsat67 ~]# rpm -qf /usr/sbin/foreman-cockpit-session
tfm-rubygem-foreman_remote_execution-cockpit-2.0.10.2-1.el7sat.noarch

[root@bombsat67 ~]# rpm -qf /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.2/extra/cockpit/foreman-cockpit-session
error: file /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.2/extra/cockpit/foreman-cockpit-session: No such file or directory

[root@bombsat67 ~]# rpm -qf /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-2.0.10.3/extra/cockpit/foreman-cockpit-session
tfm-rubygem-foreman_remote_execution-2.0.10.3-1.el7sat.noarch
~~~

Comment 1 Lukas Pramuk 2021-01-25 11:09:47 UTC
VERIFIED.

@Satellite 6.9.0 Snap9
tfm-rubygem-foreman_remote_execution-cockpit-4.2.1-1.el7sat.noarch

by following manual reproducer:

# rpm -e tfm-rubygem-foreman_remote_execution
error: Failed dependencies:
	tfm-rubygem(foreman_remote_execution) >= 4.2.0 is needed by (installed) tfm-rubygem-foreman_ansible-6.0.1-1.el7sat.noarch
	tfm-rubygem(foreman_remote_execution) >= 3.0 is needed by (installed) tfm-rubygem-katello-3.18.1.3-1.el7sat.noarch
	tfm-rubygem(foreman_remote_execution) is needed by (installed) satellite-6.9.0-0.3.beta.el7sat.noarch
	tfm-rubygem-foreman_remote_execution = 4.2.1-1.el7sat is needed by (installed) tfm-rubygem-foreman_remote_execution-cockpit-4.2.1-1.el7sat.noarch

>>> tfm-rubygem-foreman_remote_execution-cockpit now requires matching version of tfm-rubygem-foreman_remote_execution so that symlink referencing a file in another rpm (tfm-rubygem-foreman_remote_execution) cannot be broken when

/usr/sbin/foreman-cockpit-session -> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-4.2.1/extra/cockpit/foreman-cockpit-session

Comment 4 errata-xmlrpc 2021-04-21 13:18:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 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-2021:1313