Bug 1784293 - package gofer-2.12.5-5.el8sat.noarch requires /usr/bin/python2
Summary: package gofer-2.12.5-5.el8sat.noarch requires /usr/bin/python2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-17 07:45 UTC by Sandro Bonazzola
Modified: 2020-04-14 13:39 UTC (History)
9 users (show)

Fixed In Version: gofer-2.12.5-6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:39:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sandro Bonazzola 2019-12-17 07:45:09 UTC
On RHEL 8.1 with sat-tools from 6.6:
package gofer-2.12.5-5.el8sat.noarch requires /usr/bin/python2

while installing RHV 4.4 this is the only package requiring python2 on the system.

Please update gofer to run with python3 instead.

Comment 2 Lukas Pramuk 2020-03-07 13:39:24 UTC
FailedQA.

@Satellite 6.7.0 Snap14
gofer-2.12.5-5.el8sat.noarch


# yum install gofer
...

Error: 
 Problem: conflicting requests
  - nothing provides /usr/bin/python2 needed by gofer-2.12.5-5.el8sat.noarch


>>> gofer-2.12.5-6.el8sat.noarch is missing in Tools 6.7 RHEL8 candidate repos (while RHEL7 repos were updated with gofer-2.12.5-6.el7sat.noarch )

Comment 3 Lukas Pramuk 2020-03-07 13:47:01 UTC
Tools 6.7 RHEL8 composes contains redundant python2-gofer-2.12.5-5.el8sat.noarch.rpm being superseded by python3-gofer-2.12.5-5.el8sat.noarch.rpm

Comment 4 Evgeni Golov 2020-03-09 09:41:00 UTC
The fixed gofer package should be available since snap 14, but it isn't. We'll look into that.

Comment 5 Lukas Pramuk 2020-03-18 00:14:52 UTC
FailedQA.

@Satellite 6.7.0 Snap16
gofer-2.12.5-6.el8sat.noarch

# yum install gofer

Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides /usr/bin/python32 needed by gofer-2.12.5-6.el8sat.noarch

>>> oops, gofer-2.12.5-6.el8sat.noarch requires /usr/bin/python32 (instead it shall require /usr/bin/python3 being provided by python36 rpm)

# yum provides /usr/bin/python3
Updating Subscription Management repositories.
python36-3.6.8-1.module+el8+2710+846623d6.x86_64 : Interpreter of the Python programming language
Repo        : rhel-8-for-x86_64-appstream-rpms
Matched from:
Filename    : /usr/bin/python3

Comment 6 Lukas Pramuk 2020-03-18 00:22:55 UTC
More information:

Python2 gofer # rpm -qRp gofer-2.12.5-5.el8sat.noarch.rpm
/bin/sh
/bin/sh
/bin/sh
/usr/bin/python2
config(gofer) = 2.12.5-5.el8sat
python2-gofer = 2.12.5
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
systemd
systemd
systemd

Python3 gofer # rpm -qRp gofer-2.12.5-6.el8sat.noarch.rpm
/bin/sh
/bin/sh
/bin/sh
/usr/bin/python32              <- bug, should be python3
config(gofer) = 2.12.5-6.el8sat
python3-gofer = 2.12.5
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
systemd
systemd
systemd

Comment 7 Lukas Pramuk 2020-03-30 13:03:23 UTC
FailedQA.

@Satellite 6.7.0 Snap17
gofer-2.12.5-7.el8sat.noarch

# yum install gofer
...
Running transaction
  Preparing        :                                                                                                1/1 
  Installing       : python3-gofer-2.12.5-7.el8sat.noarch                                                           1/2 
  Installing       : gofer-2.12.5-7.el8sat.noarch                                                                   2/2 
  Running scriptlet: gofer-2.12.5-7.el8sat.noarch                                                                   2/2 
  Verifying        : python3-gofer-2.12.5-7.el8sat.noarch                                                           1/2 
  Verifying        : gofer-2.12.5-7.el8sat.noarch                                                                   2/2 
Installed products updated.

Installed:
  gofer-2.12.5-7.el8sat.noarch                           python3-gofer-2.12.5-7.el8sat.noarch                          

Complete!

>>> gofer is installed successfully and no longer requires python2

# service goferd start
# service goferd status
Redirecting to /bin/systemctl status goferd.service
● goferd.service - Gofer Agent
   Loaded: loaded (/usr/lib/systemd/system/goferd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-03-30 08:59:06 EDT; 1min 4s ago
  Process: 901 ExecStart=/usr/bin/env ${PYTHON} /usr/bin/goferd --foreground (code=exited, status=127)
 Main PID: 901 (code=exited, status=127)

Mar 30 08:59:06 satellite.example.com systemd[1]: Started Gofer Agent.
Mar 30 08:59:06 satellite.example.com env[901]: /usr/bin/env: ‘/usr/bin/python’: No such file or directory
Mar 30 08:59:06 satellite.example.com systemd[1]: goferd.service: Main process exited, code=exited, status=127/n/a
Mar 30 08:59:06 satellite.example.com systemd[1]: goferd.service: Failed with result 'exit-code'.

>>> goferd service fails to start

>>> gofer rpm should require '/usr/bin/python3'

Comment 8 Lukas Pramuk 2020-03-30 13:06:33 UTC
Additional info:

# rpm -qR gofer
/bin/sh
/bin/sh
/bin/sh
/usr/libexec/platform-python      <-- BUG requires platform-python but then uses python3 (it should be /usr/bin/python3)
config(gofer) = 2.12.5-7.el8sat
python3-gofer = 2.12.5
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
systemd
systemd
systemd

Comment 9 Mike McCune 2020-03-30 21:06:16 UTC
This worked fine for me:

# rpm -q redhat-release
redhat-release-8.1-3.3.el8.x86_64

# rpm -q gofer python3-gofer
gofer-2.12.5-7.el8sat.noarch
python3-gofer-2.12.5-7.el8sat.noarch

# file /usr/libexec/platform-python 
/usr/libexec/platform-python: symbolic link to ./platform-python3.6

# file /usr/libexec/platform-python3.6
/usr/libexec/platform-python3.6: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=90dcc8790c0d2180e09d2c0f01dedb99f54e85f5, stripped

# systemctl status goferd
● goferd.service - Gofer Agent
   Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-03-30 17:01:09 EDT; 2min 37s ago
 Main PID: 17735 (python3)
    Tasks: 9 (limit: 23981)
   Memory: 32.0M
   CGroup: /system.slice/goferd.service
           └─17735 /usr/bin/python3 /usr/bin/goferd --foreground

Packages installed just fine from the UI using katello-agent/gofer on EL8:

- Task Details
- Action Type
    Install package for hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com
- Result: success
- Details: zsh-5.5.1-6.el8_1.2.x86_64


Can we get access to your test client?

Comment 11 Lukas Pramuk 2020-03-31 12:45:22 UTC
Avoid installing katello-agent as it resolves the packaging issue for gofer rpm.

In situation where there is only gofer rpm (without katello-agent) installed it fails as I reported.

Comment 12 Lukas Pramuk 2020-03-31 12:53:21 UTC
[Service]
Environment=PYTHON=/usr/bin/python
EnvironmentFile=/etc/sysconfig/goferd
ExecStart=/usr/bin/env ${PYTHON} /usr/bin/goferd --foreground
Restart=on-abort

goferd service uses "/usr/bin/env /usr/bin/python /usr/bin/goferd --foreground"

vs.

while gofer rpm requires /usr/libexec/platform-python 

 

python2 gofer rpm required /usr/bin/python2 
while python3 gofer rpm requires /usr/libexec/platform-python and it should be /usr/bin/python3

Comment 13 Eric Helms 2020-03-31 13:05:57 UTC
Checking if I read correctly. If katello-agent is installed then the pathing is fine and everything works correctly. If you just install gofer (which is not a supported scenario) then the pathing for python is incorrect?

If that is true, we can clean this up in a later release as I think what we care about the most is whether katello-agent works or not.

Comment 14 Mike McCune 2020-03-31 14:17:28 UTC
we don't support installing gofer standalone without katello-agent. this is something we should clean up but not block 6.7 GA as long as katello-agent + gofer are working together.

Lukas, if you can confirm that the agent functionality is working as expected, we can move this off of 6.7

Comment 15 Stephen Wadeley 2020-04-06 13:04:58 UTC
Hello

testing on behalf of Lukas

I registered a RHEL8.1 system to Sat6.7 latest snap

Subscribed to repos[1] inc. tools from 6.6

While installing katello-agent it failed on installing dependency python3-setuptools. I had to try a few times to install that and resync the repository 'Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8'. Then I could install katelo0-agetn as expected.


In the Content Hosts web UI I see:
Katello Agent
    Installed 


From the Task tab I could install vim.

Label:Actions::Katello::Host::Package::Install
Duration:15 seconds

On the Content Host:

[root@rhel8-1 ~]# systemctl status goferd
● goferd.service - Gofer Agent
   Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-04-06 14:54:43 CEST; 8min ago
 Main PID: 5824 (python3)
    Tasks: 9 (limit: 23368)
   Memory: 76.7M
   CGroup: /system.slice/goferd.service
           └─5824 /usr/bin/python3 /usr/bin/goferd --foreground

Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:213 - timer: sack setup: 738 ms
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [INFO][worker-0] __file__:162 -  Installed: vim-common-2:8.0.1763-13.el8.x86_64 vim-filesystem-2:8.0.1763-13.el8.noarch v>
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:477 - Cleaning up.
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:1257 - /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-39534f5dc20d23f7/packages/vim-common-8.0.17>
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:1257 - /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-39534f5dc20d23f7/packages/vim-enhanced-8.0.>
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:1257 - /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-39534f5dc20d23f7/packages/vim-filesystem-8.>
Apr 06 15:01:21 rhel8-1.example.com goferd[26878]: [DDEBUG][worker-0] dnf:1257 - /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-39534f5dc20d23f7/packages/gpm-libs-1.20.7-1>
Apr 06 15:01:21 rhel8-1.example.com goferd[5824]: [INFO][worker-0] gofer.agent.rmi:144 - Request: 04a35964-1c12-45cf-8ae2-82b4ba2636a2 processed in: 11.381 (seconds)
Apr 06 15:01:22 rhel8-1.example.com goferd[5824]: [INFO][worker-0] gofer.agent.rmi:190 - Request: 04a35964-1c12-45cf-8ae2-82b4ba2636a2, committed
Apr 06 15:01:22 rhel8-1.example.com goferd[5824]: [INFO][worker-0] gofer.messaging.adapter.proton.connection:131 - closed: proton+amqps://dell-r330-12.gsslab.brq.redhat.com>
lines 1-19/19 (END)


Thank you




[1] [root@rhel8-1 ~]# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://dell-r330-12.gsslab.brq.redhat.com/pulp/repos/Default_Organization/Library/content/dist/rhel8/$releasever/x86_64/baseos/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://dell-r330-12.gsslab.brq.redhat.com/pulp/repos/Default_Organization/Library/content/dist/rhel8/$releasever/x86_64/appstream/os
Enabled:   1

Repo ID:   satellite-tools-6.6-for-rhel-8-x86_64-rpms
Repo Name: Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (RPMs)
Repo URL:  https://dell-r330-12.gsslab.brq.redhat.com/pulp/repos/Default_Organization/Library/content/dist/layered/rhel8/x86_64/sat-tools/6.6/os
Enabled:   1

Comment 16 Stephen Wadeley 2020-04-07 18:21:26 UTC
Hello

I should have added, that on my test host, I have:

[root@rhel8-1 ~]# rpm -q gofer
gofer-2.12.5-5.el8sat.noarch

Comment 17 Stephen Wadeley 2020-04-07 18:39:09 UTC
Hello

My test in comment 15 confirms Mike's test in comment 9

But the issue in comment 0 still exists, so as per comment 13 and comment 14, it should be re-evaluated another time.

Thank you

Comment 19 Mike McCune 2020-04-07 19:44:19 UTC
/usr/libexec/platform-python is a valid replacement for the requires, if the package requires that path, the original issue is solved as we are no longer requiring python2

Comment 24 Stephen Wadeley 2020-04-08 07:53:22 UTC
Hello

Testing again on a new RHEL8 VM, this time with the correct 6.7 RHEL8 tools repo

[root@dell-r330-12 ~]# rpm -q satellite
satellite-6.7.0-7.el7sat.noarch

[root@rhel8-1 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.1 (Ootpa

[root@rhel8-1 ~]# rpm -q katelo-agent
package katelo-agent is not installed

[root@rhel8-1 ~]# rpm -q gofer
package gofer is not installed
[root@rhel8-1 ~]# yum install gofer
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                           94 kB/s | 2.8 kB     00:00    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                              79 kB/s | 2.4 kB     00:00    
Tools 6.7 RHEL8                                                                   8.8 kB/s | 2.1 kB     00:00    
Dependencies resolved.
==================================================================================================================
 Package         Arch     Version            Repository                                                      Size
==================================================================================================================
Installing:
 gofer           noarch   2.12.5-7.el8sat    Sat6-CI_Red_Hat_Satellite_Tools_6_7_Composes_Satellite_Tools    56 k
Installing dependencies:
 python3-gofer   noarch   2.12.5-7.el8sat    Sat6-CI_Red_Hat_Satellite_Tools_6_7_Composes_Satellite_Tools   202 k

Transaction Summary
==================================================================================================================
Install  2 Packages

Total download size: 258 k
Installed size: 653 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): gofer-2.12.5-7.el8sat.noarch.rpm                                           115 kB/s |  56 kB     00:00    
(2/2): python3-gofer-2.12.5-7.el8sat.noarch.rpm                                   279 kB/s | 202 kB     00:00    
------------------------------------------------------------------------------------------------------------------
Total                                                                             355 kB/s | 258 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                          1/1 
  Installing       : python3-gofer-2.12.5-7.el8sat.noarch                                                     1/2 
  Installing       : gofer-2.12.5-7.el8sat.noarch                                                             2/2 
  Running scriptlet: gofer-2.12.5-7.el8sat.noarch                                                             2/2 
  Verifying        : gofer-2.12.5-7.el8sat.noarch                                                             1/2 
  Verifying        : python3-gofer-2.12.5-7.el8sat.noarch                                                     2/2 
Installed products updated.

Installed:
  gofer-2.12.5-7.el8sat.noarch                        python3-gofer-2.12.5-7.el8sat.noarch                       

Complete!
[root@rhel8-1 ~]# 



(In reply to Mike McCune from comment #19)
> /usr/libexec/platform-python is a valid replacement for the requires, if the
> package requires that path, the original issue is solved as we are no longer
> requiring python2



[root@rhel8-1 ~]# rpm -qR gofer | grep python
/usr/libexec/platform-python
python3-gofer = 2.12.5
[root@rhel8-1 ~]#

Comment 25 Bryan Kearney 2020-04-14 13:39:10 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, 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-2020:1454


Note You need to log in before you can comment on or make changes to this bug.