Description of problem: Customer is unable to patch solaris machines through Satellite for certain solaris patches. For example - they must apply solaris patch PSE400SOL049 to their machines. Unfortunately, this is not possible because it does not match our predefined regex for patch names in the RHN solaris client, which has regex PNAMERE = re.compile("([^ ]+)-([0-9][0-9])") on line 32 of /opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py. The problem is 3rd party ISVs don't necessarily adhere to this format. For example, Citrix does not. Sample traceback: [$?] \! # up2date --showall | grep SUNWxwfnt Updating cache... ######################################## [100%] Updating cache... ######################################## [100%] Traceback (most recent call last): File "/opt/redhat/rhn/solaris/usr/bin/up2date", line 236, in ? main(sys.argv[1:]) File "/opt/redhat/rhn/solaris/usr/bin/up2date", line 209, in main exitcode = iface.run(opts.command, opts.argv) File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/interfaces/up2date/interface.py", line 209, in run pkgs = self.getRHNPackages(latest=True) File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/interfaces/up2date/interface.py", line 56, in getRHNPackages if reload: self._ctrl.reloadChannels() File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/control.py", line 375, in reloadChannels self._cache.load() File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py", line 78, in load for info in self.getInfoList(): File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py", line 157, in getInfoList info = parsePatchLine(entry.rstrip()) File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py", line 515, in parsePatchLine info = createPatchInfo(patch, packages, requires, obsoletes, conflicts) File "/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py", line 550, in createPatchInfo (name, prvversion) = m.groups() AttributeError: 'NoneType' object has no attribute 'groups' def createPatchInfo(patch, packages, requires, obsoletes, conflicts): info = {"provides": [], "depends": [], "conflicts": [], "upgrades": []} m = PNAMERE.match(patch) (name, prvversion) = m.groups() name = "patch-solaris-" + name This takes the results of a showrev -p, the output of which is: Patch: PSE4000SOL049 Obsoletes: Requires: Incompatibles: Packages: CTXSmf The regex must allow PSE4000SOL049 to pass. Seems we need to either get rid of the regex, or change it to include the more varied patch names. Not sure if there is a Solaris standard for this, so we may be better off letting everything through. If we keep the regex, consider throwing an exception as well, so we don't get traceback & NoneType exceptions in the future. Version-Release number of selected component (if applicable): Red Hat Network (RHN) Satellite & Solaris client 5.2 How reproducible: Always. Steps to Reproduce: 1. Upload solaris patch that does not confirm to the "([^ ]+)-([0-9][0-9])" naming convention - such as PSE400SOL049 - to a solaris-enabled 5.2 satellite in appropriate channel. 2. Register solaris client and try to up2date or up2date --showall. Actual results: up2date fails with above traceback Expected results: up2date succeeds Additional info: Asked but weren't able to get the solaris patch in question to replicate internally.
(In reply to comment #0) > Steps to Reproduce: > 1. Upload solaris patch that does not confirm to the "([^ ]+)-([0-9][0-9])" > naming convention - such as PSE400SOL049 - to a solaris-enabled 5.2 satellite > in appropriate channel. > 2. Register solaris client and try to up2date or up2date --showall. Actually you don't have to use RHN to install the patch. The way we came about it is that we patched CTXMS out of band from satellite, but up2date still chokes on the output of showrev -p. Steps to reproduce: 1. Install a weird patch, such as PSE400SOL049 to a solaris machine that is managed by a satellite. 2. run up2date or up2date --showall. > > Actual results: > up2date fails with above traceback > > Expected results: > up2date succeeds
Fixed in spacewalk git in commit 893f1d89a8350fcf34f0f56be9f0743332f73beb
Cherrypicked to satellite.git as 7e4b02e39702590531e19ef13a89369784c0f99c
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Patches with non-standard SUNW_PATCHID now work as expected.
Verified in rhn-solaris-bootstrap-5.4.1-5 and RHATsmart-5.4.1-2