[Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
Eric Griswold
Eric.Griswold at ipreo.com
Fri May 25 14:20:37 UTC 2018
Errata.py file exists. Here is the contents, this was all default from install:
#!/usr/bin/python
# Client code for Update Agent
# Copyright (c) 1999--2012 Red Hat, Inc. Distributed under GPLv2.
#
# Author: Adrian Likins <alikins at redhat.com
#
import sys
sys.path.append("/usr/share/rhn/")
from up2date_client import rhnserver
from up2date_client import up2dateAuth
from up2date_client import pkgUtils
from actions import packages
__rhnexport__ = [
'update']
# action version we understand
ACTION_VERSION = 2
def __getErrataInfo(errata_id):
s = rhnserver.RhnServer()
return s.errata.getErrataInfo(up2dateAuth.getSystemId(), errata_id)
def update(errataidlist, cache_only=None):
packagelist = []
if type(errataidlist) not in [type([]), type(())]:
errataidlist = [ errataidlist ]
for errataid in errataidlist:
tmpList = __getErrataInfo(errataid)
packagelist = packagelist + tmpList
current_packages_with_arch = {}
current_packages ={}
for p in pkgUtils.getInstalledPackageList(getArch=1):
current_packages_with_arch[p['name']+p['arch']] = p
current_packages[p['name']] = p
u = {}
# only update packages that are currently installed
# since an "applicable errata" may only contain some packages
# that actually apply. aka kernel. Fun fun fun.
if len(packagelist[0]) > 4:
# Newer sats send down arch, filter using name+arch
for p in packagelist:
if current_packages_with_arch.has_key(p[0]+p[4]):
u[p[0]+p[4]] = p
elif current_packages_with_arch.has_key(p[0]+"noarch"):
u[p[0]+p[4]] = p
elif p[4] == "noarch" and current_packages.has_key(p[0]):
u[p[0]] = p
else:
# 5.2 and older sats + hosted dont send arch
for p in packagelist:
if current_packages.has_key(p[0]):
u[p[0]] = p
# XXX: Fix me - once we keep all errata packages around,
# this is the WRONG thing to do - we want to keep the specific versions
# that the user has asked for.
packagelist = map(lambda a: u[a], u.keys())
if packagelist == []:
data = {}
data['version'] = "0"
data['name'] = "errata.update.no_packages"
data['erratas'] = errataidlist
return (39,
"No packages from that errata are available",
data)
return packages.update(packagelist, cache_only)
def main():
print update([23423423])
if __name__ == "__main__":
main()
-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Paschedag, Robert
Sent: Friday, May 25, 2018 10:10 AM
To: spacewalk-list at redhat.com; Robert Paschedag <robert.paschedag at web.de>
Subject: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
With errata.update it's just the same as with packages.checkNeedUpdate
So you need to have a /usr/share/rhn/actions/errata.py file, which contains the function "update"
And this "update" function also needs to be "exported" within "errata.py"
Robert
-----Ursprüngliche Nachricht-----
Von: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> Im Auftrag von Eric Griswold
Gesendet: Freitag, 25. Mai 2018 15:53
An: spacewalk-list at redhat.com; Robert Paschedag <robert.paschedag at web.de>
Betreff: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
There are some lines missing compared to yours, but 'checkNeedUpdate' is there:
# mark this module as acceptable
__rhnexport__ = [
'update',
'remove',
'refresh_list',
'fullUpdate',
'checkNeedUpdate',
'runTransaction',
'verify'
]
I ran a rhn_check while attempting to push package updates, and received a bit more...but still without a solution. Note the second to last line -- it specified the action 'errata.update' is unsupported. I am not sure if a config file is incorrect somewhere.
"
rhn_check -vvvvvv
D: opening db environment /var/lib/rpm cdb:0x401
D: opening db index /var/lib/rpm/Packages 0x400 mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Providename 0x400 mode=0x0
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>errata.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><int>2048</int></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 1170}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1527184084.85 with expiration of 1527187684.85 seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1527184084.85', 'X-RHN-Auth': 'htg9ENf4lgJetBoLDXDNcKHgnZH+s1qyb1e1Bvfmp3E=', 'X-RHN-Auth-Channels': [['centos7_x86_64', '20180517152915', '1', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>errata.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><int>2048</int></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 1170}
D: handle_action actionid = 1170, version = 2
D: do_call errata.update([2048],){'cache_only': None}
D: Attempt to call an unsupported action errata.update([2048],)
D: Sending back response(6, 'Invalid function call attempted', {}) "
Thanks,
Eric
-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Paschedag, Robert
Sent: Friday, May 25, 2018 9:43 AM
To: spacewalk-list at redhat.com; Robert Paschedag <robert.paschedag at web.de>
Subject: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
That's strange.
Please check, if "checkNeedUpdate" is "exported" as function in /usr/share/rhn/actions/packages.py
At the beginning
...
# mark this module as acceptable
__rhnexport__ = [
'update',
'remove',
'refresh_list',
'fullUpdate',
'checkNeedUpdate',
'runTransaction',
'verify',
'verifyAll',
'setLocks'
]
...
Because...if I comment the "checkNeedUpdate" line above, I get the exact same error
rhn_check -vvv
D: getSystemId invoked
D: getSystemId invoked
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool:private
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Providename rdonly:nofsync mode=0x0
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: getSystemId invoked
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Attempt to call an unsupported action packages.checkNeedUpdate('rhnsd=1',)
D: local action status: (6, 'Invalid function call attempted', {})
D: rpcServer: Calling XMLRPC registration.welcome_message
D: getSystemId invoked
D: May free Score board((nil))
Cheers
Robert
-----Ursprüngliche Nachricht-----
Von: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> Im Auftrag von Eric Griswold
Gesendet: Freitag, 25. Mai 2018 13:56
An: spacewalk-list at redhat.com; Robert Paschedag <robert.paschedag at web.de>
Betreff: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
Robert --
That file exists as well.
grep checkNeedUpdate /usr/share/rhn/actions/packages.py
'checkNeedUpdate',
def checkNeedUpdate(rhnsd=None, cache_only=None):
rpm -qf /usr/share/rhn/actions/packages.py
yum-rhn-plugin-2.0.1-10.el7.noarch
-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Paschedag, Robert
Sent: Friday, May 25, 2018 7:51 AM
To: spacewalk-list at redhat.com; Robert Paschedag <robert.paschedag at web.de>
Subject: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
OK.
My mistake. Was not the file "/usr/share/rhn/actions/errata.py" but "/usr/share/rhn/actions/packages.py"
grep checkNeedUpdate /usr/share/rhn/actions/packages.py
'checkNeedUpdate',
def checkNeedUpdate(rhnsd=None, cache_only=None):
rpm -qf /usr/share/rhn/actions/packages.py
zypp-plugin-spacewalk-0.9.16-25.3.1
(This is on an older SLES system)
Robert
-----Ursprüngliche Nachricht-----
Von: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> Im Auftrag von Eric Griswold
Gesendet: Donnerstag, 24. Mai 2018 17:15
An: Robert Paschedag <robert.paschedag at web.de>; spacewalk-list at redhat.com; spacewalk-list at redhat.com
Betreff: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
Hi Robert,
Thank you for the information.
rhn-actions-control is all enabled:
[client]$ rhn-actions-control --report
deploy is enabled
diff is enabled
upload is enabled
mtime_upload is enabled
run is enabled
/usr/share/rhn/actions/ contains
-rw-r--r--. 1 root root 2364 Apr 10 22:05 errata.py -rw-r--r--. 2 root root 2196 Apr 10 22:05 errata.pyc -rw-r--r--. 2 root root 2196 Apr 10 22:05 errata.pyo -rw-r--r--. 1 root root 20398 Apr 10 22:05 packages.py -rw-r--r--. 1 root root 16680 Apr 10 22:05 packages.pyc -rw-r--r--. 1 root root 16598 Apr 10 22:05 packages.pyo
-----Original Message-----
From: Robert Paschedag [mailto:robert.paschedag at web.de]
Sent: Thursday, May 24, 2018 11:09 AM
To: spacewalk-list at redhat.com; Eric Griswold <Eric.Griswold at ipreo.com>; spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing
Am 24. Mai 2018 16:49:39 MESZ schrieb Eric Griswold <Eric.Griswold at ipreo.com>:
>This is the outcome of 'rhn_check -vvv' on the client
>
>D: opening db environment /var/lib/rpm cdb:0x401
>D: opening db index /var/lib/rpm/Packages 0x400 mode=0x0
>D: locked db index /var/lib/rpm/Packages
>D: opening db index /var/lib/rpm/Providename 0x400 mode=0x0
>D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>D: Attempt to call an unsupported action
>packages.checkNeedUpdate('rhnsd=1',)
>D: local action status: (6, 'Invalid function call attempted', {})
>D: rpcServer: Calling XMLRPC registration.welcome_message
>D: closed db index /var/lib/rpm/Providename
>D: closed db index /var/lib/rpm/Packages
>D: closed db environment /var/lib/rpm
>
>From: Eric Griswold
>Sent: Wednesday, May 23, 2018 8:07 AM
>To: 'spacewalk-list at redhat.com' <spacewalk-list at redhat.com>
>Subject: Spacewalk 2.8 - Pushing Errata Patches Failing
>
>Hello -
>
>I am new to spacewalk, but am running into some issues pushing patches
>from my spacewalk server. I imported an internal repo to the spacewalk
>server. I then added two test clients to the inventory. The server is
>successfully able to see the clients and all of their information. My
>Errata list is populated with CentOS advisories. When I attempt to push
>the errata patches to the clients, they fail.
>
>The error I am receiving on failure: 'Invalid function call attempted'
>
>/var/spacewalk/systemlogs is emtpy. I am not finding much in
>/var/log/rhn/ I'm not sure where else I should be searching for logs.
>
>Appreciate any support here & where I should be hunting logs for this
>software.
>
>Thanks,
>Eric
>
>
>
>********* Confidential Disclaimer *********
>
>This e-mail message and any attachments are confidential.
>Dissemination, distribution or copying of this e-mail or any
>attachments by anyone other than the intended recipient is prohibited.
>If you are not the intended recipient, please notify Ipreo immediately
>by replying to this e-mail, and destroy all copies of this e-mail and
>any attachments. If you have received this e-mail as part of a
>marketing communication and you would like to unsubscribe from future
>marketing communications, please review our privacy
>policy<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%
>2Finfo.ipreo.com%2FIpreo-Private-Policy.html&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C3464ef5953d54897069908d5c18941a7%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636627717613392312&sdata=VXY9bEqUOAl1gi1eJMtUhIhQADzPaP870tKyXMXZbD8%3D&reserved=0> for more information.
Please look, if you have your rhn-actions installed and enabled.
Check rhn-actions-control and /usr/share/rhn/actions/ for presents of errata.py.
Robert
--
sent from my mobile device
********* Confidential Disclaimer *********
This e-mail message and any attachments are confidential. Dissemination, distribution or copying of this e-mail or any attachments by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify Ipreo immediately by replying to this e-mail, and destroy all copies of this e-mail and any attachments. If you have received this e-mail as part of a marketing communication and you would like to unsubscribe from future marketing communications, please review our privacy policy<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Finfo.ipreo.com%2FIpreo-Private-Policy.html&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C3464ef5953d54897069908d5c18941a7%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636627717613392312&sdata=VXY9bEqUOAl1gi1eJMtUhIhQADzPaP870tKyXMXZbD8%3D&reserved=0> for more information.
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C3464ef5953d54897069908d5c18941a7%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636627717613392312&sdata=N2AkJcnWCpPg%2BUqu734CalKgC04Z97gcBJvgyMLEtLM%3D&reserved=0
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C4b39ea555afb4b5b07f208d5c2368d71%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628461940246195&sdata=mV6K7%2FiY2fiQKI5Z6oBw66mgfZUJXCGiq2NJOqw%2BUyE%3D&reserved=0
********* Confidential Disclaimer *********
This e-mail message and any attachments are confidential. Dissemination, distribution or copying of this e-mail or any attachments by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify Ipreo immediately by replying to this e-mail, and destroy all copies of this e-mail and any attachments. If you have received this e-mail as part of a marketing communication and you would like to unsubscribe from future marketing communications, please review our privacy policy<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Finfo.ipreo.com%2FIpreo-Private-Policy.html&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C4b39ea555afb4b5b07f208d5c2368d71%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628461940246195&sdata=jeZUiD57VJDhndQgJaMTKzWfTwRYQdxNnDkFbYyejmo%3D&reserved=0> for more information.
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list&data=02%7C01%7CPaschedag.Netlution%40swr.de%7C4b39ea555afb4b5b07f208d5c2368d71%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628461940246195&sdata=mV6K7%2FiY2fiQKI5Z6oBw66mgfZUJXCGiq2NJOqw%2BUyE%3D&reserved=0
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list&data=02%7C01%7CPaschedag.Netlution%40swr.de%7Cfb67cd1c9fa9419c171b08d5c246dac8%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628531963234386&sdata=kx9jvou90sdxKyzpml4tRxlrvLaKkaESB%2BPmf1W9%2B6s%3D&reserved=0
********* Confidential Disclaimer *********
This e-mail message and any attachments are confidential. Dissemination, distribution or copying of this e-mail or any attachments by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify Ipreo immediately by replying to this e-mail, and destroy all copies of this e-mail and any attachments. If you have received this e-mail as part of a marketing communication and you would like to unsubscribe from future marketing communications, please review our privacy policy<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Finfo.ipreo.com%2FIpreo-Private-Policy.html&data=02%7C01%7CPaschedag.Netlution%40swr.de%7Cfb67cd1c9fa9419c171b08d5c246dac8%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628531963234386&sdata=h9aaQsqXa%2FOr1jGiSLE5KNy51EWkEO37kT9KkMvfvCQ%3D&reserved=0> for more information.
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list&data=02%7C01%7CPaschedag.Netlution%40swr.de%7Cfb67cd1c9fa9419c171b08d5c246dac8%7Cbcca095d88d442f88260cc216b81f62d%7C0%7C1%7C636628531963234386&sdata=kx9jvou90sdxKyzpml4tRxlrvLaKkaESB%2BPmf1W9%2B6s%3D&reserved=0
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list
********* Confidential Disclaimer *********
This e-mail message and any attachments are confidential. Dissemination, distribution or copying of this e-mail or any attachments by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify Ipreo immediately by replying to this e-mail, and destroy all copies of this e-mail and any attachments. If you have received this e-mail as part of a marketing communication and you would like to unsubscribe from future marketing communications, please review our privacy policy<http://info.ipreo.com/Ipreo-Private-Policy.html> for more information.
More information about the Spacewalk-list
mailing list