Question

Has anyone gotten the Nutanix virt-who rpm to work on RHEL 6.x and Satellite v6.x?

  • 3 August 2020
  • 2 replies
  • 751 views

I am trying to install the Nutanix virt-who v1.1 rpm on RHEL 6.10 to talk to Red Hat Satellite v6.3.  I have installed the virt-who rpm with its dependencies except for systemd (which does not exist for RHEL v6), installed Python 2.7 from the Software collections rpm, set the “scl enable python27 bash” in /etc/rc.d/rc.local,  changed the virt-who script to point to that instead of /usr/bin/python, but it fails to run.  I have determined that the failure is do the the ‘require’ in the python script not finding the virt-who libraries.  To replicate that, I can run “pip -v list” and see that virt-who is not listed.

Has anyone gotten past this?

 

Thanks,

mark


2 replies

Userlevel 2
Badge +4

@MarkJGreene  Kindly share output for 

yum info virt-who
cat /etc/virt-who.conf
virt-who --one-shot
cat /etc/virt-who.d/virt-who.conf

 

The virt-who command fails:

# virt-who
Traceback (most recent call last):
  File "/usr/bin/virt-who", line 11, in <module>
    load_entry_point('virt-who==0.25.4', 'console_scripts', 'virt-who')()
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 371, in get_distribution
    if isinstance(dist,Requirement): dist = get_provider(dist)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 243, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virt-who==0.25.4
 

The rpm installed all of the software under /usr/lib/python2.7/site-packages/virtwho, and did so because that is default for RHEL v7; I think if I can figure where to put the symlink under the actual python installation under /opt/rh/python27, then I can make it all work.  I but I don't know where to put the link, and how many files and directories need to be linked.

 

It all comes down to the rpm being developed for RHEL 7 & 8 and not RHEL 6, and RHEL 6 handling the Python 2.7 installation as a one-off from the Software Collections repo.


Here is the rpm info:
# rpm -q virt-who
virt-who-0.25.4-1.el7.noarch

# rpm -q virt-who --info
Name        : virt-who                     Relocations: (not relocatable)
Version     : 0.25.4                            Vendor: (none)
Release     : 1.el7                         Build Date: Wed 28 Aug 2019 02:02:25 PM EDT
Install Date: Tue 28 Jul 2020 04:15:53 PM EDT      Build Host: amsatellite.corp.nutanix.com
Group       : System Environment/Base       Source RPM: virt-who-0.25.4-1.el7.src.rpm
Size        : 996492                           License: GPLv2+
Signature   : (none)
URL         : https://github.com/candlepin/virt-who
Summary     : Agent for reporting virtual guest IDs to subscription-manager
Description :
Agent that collects information about virtual guests present in the system and
report them to the subscription manager.
 

# rpm -qa |grep python27
python27-python-setuptools-0.9.8-4.el6.noarch
python27-PyYAML-3.10-14.el6.x86_64
python27-runtime-1.1-25.el6.x86_64
python27-python-2.7.17-2.el6.x86_64
python27-python-pip-8.1.2-2.el6.noarch
python27-python-libs-2.7.17-2.el6.x86_64

 

]# yum list installed|grep python27
python27-PyYAML.x86_64             3.10-14.el6             @rhel-x86_64-server-6-rhscl-1
python27-python.x86_64             2.7.17-2.el6            @rhel-x86_64-server-6-rhscl-1
python27-python-libs.x86_64        2.7.17-2.el6            @rhel-x86_64-server-6-rhscl-1
python27-python-pip.noarch         8.1.2-2.el6             @rhel-x86_64-server-6-rhscl-1
python27-python-setuptools.noarch  0.9.8-4.el6             @rhel-x86_64-server-6-rhscl-1
python27-runtime.x86_64            1.1-25.el6              @rhel-x86_64-server-6-rhscl-1  ← this is the Red Hat Software Collections Repository; it is the only means by which Red Hat supplies Python v2.7 for RHEL v6.
 

[root@surfdev greenemj]# rpm -q python27-python-2.7.17-2.el6.x86_64 --info
Name        : python27-python              Relocations: (not relocatable)
Version     : 2.7.17                            Vendor: Red Hat, Inc.
Release     : 2.el6                         Build Date: Fri 15 Nov 2019 03:09:33 PM EST
Install Date: Tue 28 Jul 2020 04:03:11 PM EDT      Build Host: x86-vm-28.build.eng.bos.redhat.com
Group       : Development/Languages         Source RPM: python27-python-2.7.17-2.el6.src.rpm
Size        : 78691                            License: Python
Signature   : RSA/8, Fri 15 Nov 2019 04:44:41 PM EST, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.python.org/
Summary     : An interpreted, interactive, object-oriented programming language
 

 

Reply