Nethserver upgrade issues with the yum

[root@server ~]# yum reinstall yum
Loaded plugins: changelog, fastestmirror, nethserver_events
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 375, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 170, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 295, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
File “/usr/share/yum-cli/cli.py”, line 2311, in setupYumConfig
if not self.base.conf.usercache and os.geteuid() != 0:
AttributeError: ‘YumConf’ object has no attribute ‘usercache’
[root@server ~]#

pm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -Uvh --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
doesn’t change anything

[root@server ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda 508G 437G 66G 87% /
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 1.3G 14G 9% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
tmpfs 3.0G 0 3.0G 0% /run/user/0
[root@server ~]#

there is enough free space.

Did you try to set in yum.conf?

 usercache=0

Or

 usercache=1

I did it with “yum --setopt usercache=1 check-update” Nethserver upgrade issues with the yum before , and set it with your advice, doesn’t change anything.

Sorry to bother you again with more command requests, just trying to figure it out but this is a hard nut to crack.

List mostly python related packages:

rpm -qa *py*

Verify most of python related packages (if just returns something about cleanup.sh it’s ok):

rpm -qaV *py*

Did you find anything relevant in the logs?

rpm -qa py

[root@server ~]# rpm -qa py
python2-gflags-2.0-5.el7.noarch
python-lockfile-0.9.1-4.el7.centos.noarch
python-ipaddress-1.0.16-2.el7.noarch
python2-certbot-0.25.1-1.el7.noarch
snappy-1.1.0-3.el7.x86_64
python-zope-event-4.0.3-2.el7.noarch
pyparsing-1.5.6-9.el7.noarch
python-enum34-1.0.4-1.el7.noarch
python2-requests-2.6.0-0.el7.noarch
python2-pyasn1-modules-0.1.9-7.el7.noarch
python2-google-api-client-1.6.3-1.el7.noarch
pytalloc-2.1.10-1.el7.x86_64
python-dateutil-1.5-7.el7.noarch
python2-rsa-3.4.1-1.el7.noarch
rpm-python-4.11.3-32.el7.x86_64
python2-cryptography-1.7.2-2.el7.x86_64
python-chardet-2.2.1-1.el7_1.noarch
newt-python-0.52.15-4.el7.x86_64
python2-pyasn1-0.1.9-7.el7.noarch
python-sssdconfig-1.16.0-19.el7.noarch
python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
pyxattr-0.5.1-5.el7.x86_64
python2-mock-1.0.1-9.el7.noarch
python-httplib2-0.9.2-1.el7.noarch
python-fasteners-0.9.0-2.el7.noarch
python2-future-0.16.0-6.el7.noarch
python-idna-2.4-1.el7.noarch
libsemanage-python-2.5-11.el7.x86_64
python2-configargparse-0.11.0-1.el7.noarch
python-slip-0.4.0-4.el7.noarch
python-urlgrabber-3.10-8.el7.noarch
python-firewall-0.4.4.4-14.el7.noarch
python-zope-interface-4.0.5-4.el7.x86_64
python-ndg_httpsclient-0.3.2-1.el7.noarch
python-requests-2.6.0-1.el7_1.noarch
libselinux-python-2.5-12.el7.x86_64
python-urllib3-1.10.2-5.el7.noarch
python2-simplejson-3.10.0-1.el7.x86_64
python2-boto-2.45.0-3.el7.noarch
python2-PyDrive-1.3.1-3.el7.noarch
python-backports-1.0-8.el7.x86_64
pygpgme-0.3-9.el7.x86_64
python-IPy-0.75-6.el7.noarch
audit-libs-python-2.8.1-3.el7.x86_64
python-zope-component-4.1.0-3.el7.noarch
python-requests-toolbelt-0.8.0-1.el7.noarch
python-configobj-4.7.2-7.el7.noarch
pytz-2016.10-2.el7.noarch
python-gobject-base-3.22.0-1.el7_4.1.x86_64
python2-acme-0.25.1-1.el7.noarch
python-perf-3.10.0-862.3.3.el7.x86_64
python-linux-procfs-0.4.9-3.el7.noarch
python-pycparser-2.14-1.el7.noarch
python2-paramiko-1.16.1-2.el7.noarch
python-six-1.9.0-2.el7.noarch
python2-parsedatetime-2.4-5.el7.noarch
python2-pyrfc3339-1.0-2.el7.noarch
pyOpenSSL-0.13.1-3.el7.x86_64
python2-psutil-2.2.1-3.el7.x86_64
python2-uritemplate-3.0.0-1.el7.noarch
python-cffi-1.6.0-5.el7.x86_64
dbus-python-1.1.1-9.el7.x86_64
python2-ecdsa-0.13-4.el7.noarch
python-setuptools-0.9.8-7.el7.noarch
python2-josepy-1.1.0-1.el7.noarch
python-tdb-1.3.15-1.el7.x86_64
python-ply-3.4-11.el7.noarch
python2-crypto-2.6.1-15.el7.x86_64
python2-keyring-5.0-3.el7.noarch
python-iniparse-0.4-9.el7.noarch
python2-six-1.9.0-0.el7.noarch
python-libs-2.7.5-68.el7.x86_64
python-decorator-3.4.0-3.el7.noarch
policycoreutils-python-2.5-22.el7.x86_64
python-pyudev-0.15-9.el7.noarch
python-GnuPGInterface-0.3.2-11.el7.noarch
python-pycurl-7.19.0-19.el7.x86_64
python-schedutils-0.4-6.el7.x86_64
python2-dialog-3.3.0-6.el7.noarch
python-slip-dbus-0.4.0-4.el7.noarch
pyliblzma-0.5.3-11.el7.x86_64
python2-oauth2client-4.0.0-2.el7.noarch
python-2.7.5-68.el7.x86_64
[root@server ~]#

rpm -qaV py

[root@server ~]# rpm -qaV py
.M… d /usr/share/doc/python-ply-3.4/example/cleanup.sh

Thanks for giving advices, because i want to resolve the issues. Otherwise i will probably move Nexcloud to the newly installed nethserver with all users , and then reinstall email server.

New suggestions would be great

Looking into it.
Do you happen to use SDL / PUIAS repo?

No, just in case unstalled(2017) it first in Linode , then moved it to local virtuall environment in Moscow. It’s worked fine, no extra manipulations.

Nothing wrong with the python packages.

Found an actual similar issue:

https://access.redhat.com/solutions/3469361

there is no /usr/lib/python2.7/site-packages/rhn/SSL.py file in the system .

You’re right, it’s just a similar issue and they solved it by adapting the code, in your case it’s

Maybe you found a bug. I just wanted to point out that there seem to be no easy solutions in these cases.

You may try to comment out these lines at line 2311 in /usr/share/yum-cli/cli.py:

#            if not self.base.conf.usercache and os.geteuid() != 0:
#                self.base.conf.cache = 1
#            #  Treat users like root as much as possible:
#            elif not self.base.setCacheDir():
#                self.base.conf.cache = 1
#            if opts.cacheonly:
#                self.base.conf.cache = 1

And then:

yum clean all
yum update
1 Like

Not the same but similar issues:

2 Likes

If cache has not been cleared, does a yum command using only cached data work?

yum -C list yum