If you do this xml call with packages that RHN doesn't know about, It will cause a nasty traceback. Instead, send some meaningful info to the client, and log the error in our logs.
Adding to rhn502, this'll reduce tracebacks which will make it easier for the hosted team to find & debug production issues.
If an unknown package name is given in a profile, we will now raise fault 23.
I've examined this further, and it only happens for empty package names. So instead of throwing a fault, the packages are now filtered on empty package name (like other fields on the package)
A quick n' dirty way to test this (like bz 235214) is to append a package with no name to your package profile, like: pkg_list.append(['', '1', '1', '', 'i386']) at line 173 in /usr/share/rhn/up2date_client/rpmUtils.py Then use rhnreg_ks and note that things don't blow up. Your package profile should be uploaded, and not include any packages with empty names.
Tested using: ./test_up2date_checks.py --verbose --server=qa --test=update_packages --username=lethallemur --password=[censored] --os-release=5Client --os-arch=x86_64 --package-profile=./package-profiles/profile-emptyname-x86_64 profile-emptyname-x86_64 looks like: [bretm@potential test]$ cat package-profiles/profile-emptyname-x86_64 (none) 1.0 3 (none) x86_64 a2ps 4.13b 41 (none) x86_64 acl 2.2.23 5 (none) x86_64 [bretm@potential test]$ test harness registers w/out fault, logs show: 2007/06/22 13:07:53 -04:00 30272 172.16.57.213: rhnServer/server_packages.add_package(1007420128, ['', '1.0', '3', '']) 2007/06/22 13:07:53 -04:00 30272 172.16.57.213: rhnServer/server_packages.add_package(1007420128, ['a2ps', '4.13b', '41', '']) 2007/06/22 13:07:53 -04:00 30272 172.16.57.213: rhnServer/server_packages.add_package(1007420128, ['acl', '2.2.23', '5', '']) sqlplus shows: select name from rhnpackagename where id in (select name_id from rhnserverpackage where server_id = 1007420128) SQL> / NAME -------------------------------------------------------------------------------- a2ps acl SQL>
Also, simulated runs for rhel 4as system registration show nothing odd in webqa.
rhn502 released.