Description of problem: You are unable to transfer organization with "/" in name using Splice and what is worse, when you attempt to, you get your SAM to inconsistent state. Version-Release number of selected component (if applicable): SAM 1.3 snapshot #4 katello-headpin-all-1.4.3-11.el6sam_splice.noarch spacewalk-splice-tool-0.40-1.el6sam.noarch splice-0.144-1.el6sam.noarch ruby193-rubygem-splice_reports-0.0.8-1.el6sam.noarch How reproducible: always Steps to Reproduce: 1. On Satellite 5.6.0 create organization to "AC/DC" 2. Setup sync through Splice to SAM 1.3 snapshot #4 3. As swreport user run spacewalk-splice-checkin Actual results: Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 97, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 139, in spacewalk_sync kps.update_owners(org_list) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 66, in update_owners self.katello_client.create_org_admin_role_permission(kt_org_label=orgs[org_id]) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 227, in create_org_admin_role_permission role = self.rolesapi.create(name="Org Admin Role for %s" % kt_org_label, description="generated from spacewalk") File "/usr/lib/python2.6/site-packages/katello/client/api/user_role.py", line 30, in create return self.server.POST(path, {"role": data})[1] File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 454, in POST return self._request('POST', path, body=body, multipart=multipart, custom_headers=custom_headers) File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 250, in _request return self._process_response(connection.getresponse()) File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 308, in _process_response raise ServerRequestError(response.status, response_body, None) katello.client.server.ServerRequestError: (422, {u'displayMessage': u'Validation failed: Name cannot contain characters >, <, or /', u'errors': [u'Validation failed: Name cannot contain characters >, <, or /']}, None) Expected results: Should work Additional info: Problem is, that once you run this again, you will get: Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 97, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 141, in spacewalk_sync kps.update_roles(sw_user_list) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 166, in update_roles self.katello_client.grant_org_admin(kt_user=kt_users[kt_username], kt_org_label=sw_user_org) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 239, in grant_org_admin self.userapi.assign_role(user_id=kt_user['id'], role_id=oa_role['id']) TypeError: 'NoneType' object is unsubscriptable This is because role for this organization do not exist.
Milan, I have it currently set up to log an error message and abort. If you run it from the command-line, you will see: -bash-4.1$ spacewalk-splice-checkin --spacewalk-sync --report_input=/tmp Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 97, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 225, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 153, in spacewalk_sync raise Exception("Invalid org names found. Check /var/log/splice/spacewalk-splice-tool.log for more detail.") Exception: Invalid org names found. Check /var/log/splice/spacewalk-splice-tool.log for more detail. and in the log: 2013-09-04 15:59:53,706 ERROR: PID 17015 spacewalk_splice_tool.checkin checkin:check_for_invalid_org_names:115 org names may not contain '/' character: Org/Two It also checks for '<' and '>' Once the underlying katello bug is fixed, I can remove the filter. Is this what you had in mind in comment #2? NOTE: I was getting cron emails from this warning: /usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py:45: SyntaxWarning: name 'CERT_DIR' is used prior to global declaration global CERT_DIR I am going to fix that as well in this commit.
> Is this what you had in mind in comment #2?(In reply to Chris Duryee from comment #3) precisely, thank you!
aeae0635 spacewalk-splice-tool 0.41+
Reproduced with snapshot #4; org name: "Testing/Org" [root@ec2-54-253-143-184 ~]# sudo -u splice spacewalk-splice-checkin [Errno 13] Permission denied: '/var/log/splice/splice.log' Unable to initialize logging config with: /etc/splice/logging/basic.cfg Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 97, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 141, in spacewalk_sync kps.update_roles(sw_user_list) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 166, in update_roles self.katello_client.grant_org_admin(kt_user=kt_users[kt_username], kt_org_label=sw_user_org) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 236, in grant_org_admin self.userapi.assign_role(user_id=kt_user['id'], role_id=oa_role['id'])
# spacewalk-splice-tool-0.41-1.el6sam.noarch solves the issue [root@ec2-54-253-143-184 ~]# rpm -q spacewalk-splice-tool spacewalk-splice-tool-0.41-1.el6sam.noarch [root@ec2-54-253-143-184 ~]# sudo -u splice spacewalk-splice-checkin Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 97, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 225, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 154, in spacewalk_sync raise Exception("Invalid org names found. Check /var/log/splice/spacewalk_splice_tool.log for more detail.") Exception: Invalid org names found. Check /var/log/splice/spacewalk_splice_tool.log for more detail. [root@ec2-54-253-143-184 ~]# tail /var/log/splice/spacewalk_splice_tool.log 2013-09-03 16:33:09,144 INFO: PID 6583 spacewalk_splice_tool.checkin checkin:splice_sync:187 fetching deleted systems... 2013-09-03 16:33:09,209 INFO: PID 6583 spacewalk_splice_tool.checkin checkin:splice_sync:191 uploading to splice... 2013-09-03 16:33:09,209 INFO: PID 6583 spacewalk_splice_tool.splice_push splice_push:_build_server_metadata:57 building server metadata 2013-09-03 16:33:09,210 INFO: PID 6583 spacewalk_splice_tool.splice_push splice_push:upload_to_rcs:119 sending metadata to server 2013-09-03 16:33:12,483 INFO: PID 6583 spacewalk_splice_tool.checkin checkin:splice_sync:193 Upload was successful 2013-09-03 16:33:12,483 INFO: PID 6583 spacewalk_splice_tool.checkin checkin:main:211 run complete 2013-09-05 11:56:44,832 INFO: PID 12281 spacewalk_splice_tool.checkin checkin:main:220 run starting 2013-09-05 11:56:44,833 INFO: PID 12281 spacewalk_splice_tool.checkin checkin:spacewalk_sync:138 Started capturing system data from spacewalk 2013-09-05 11:56:44,833 INFO: PID 12281 spacewalk_splice_tool.checkin checkin:spacewalk_sync:146 retrieving data from spacewalk 2013-09-05 11:56:46,221 ERROR: PID 12281 spacewalk_splice_tool.checkin checkin:check_for_invalid_org_names:115 org names may not contain '/' character: Testing/Org
Verified with Snapshot 6: # sudo -u splice spacewalk-splice-checkin Traceback (most recent call last): File "/usr/bin/spacewalk-splice-checkin", line 100, in <module> checkin.main(opts) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 225, in main spacewalk_sync(options) File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 154, in spacewalk_sync raise Exception("Invalid org names found. Check /var/log/splice/spacewalk_splice_tool.log for more detail.") Exception: Invalid org names found. Check /var/log/splice/spacewalk_splice_tool.log for more detail. [root@ec2-54-216-163-158 ~]# tail -10 /var/log/splice/spacewalk_splice_tool.log 2013-09-13 10:02:53,967 INFO: PID 24636 spacewalk_splice_tool.checkin checkin:splice_sync:206 fetching deleted systems... 2013-09-13 10:02:54,160 INFO: PID 24636 spacewalk_splice_tool.checkin checkin:splice_sync:210 uploading to splice... 2013-09-13 10:02:54,161 INFO: PID 24636 spacewalk_splice_tool.splice_push splice_push:_build_server_metadata:57 building server metadata 2013-09-13 10:02:54,161 INFO: PID 24636 spacewalk_splice_tool.splice_push splice_push:upload_to_rcs:119 sending metadata to server 2013-09-13 10:02:54,378 INFO: PID 24636 spacewalk_splice_tool.checkin checkin:splice_sync:212 Upload was successful 2013-09-13 10:02:54,378 INFO: PID 24636 spacewalk_splice_tool.checkin checkin:main:230 run complete 2013-09-13 10:03:12,738 INFO: PID 24836 spacewalk_splice_tool.checkin checkin:main:220 run starting 2013-09-13 10:03:12,739 INFO: PID 24836 spacewalk_splice_tool.checkin checkin:spacewalk_sync:138 Started capturing system data from spacewalk 2013-09-13 10:03:12,739 INFO: PID 24836 spacewalk_splice_tool.checkin checkin:spacewalk_sync:146 retrieving data from spacewalk 2013-09-13 10:03:15,161 ERROR: PID 24836 spacewalk_splice_tool.checkin checkin:check_for_invalid_org_names:115 org names may not contain '/' character: Testing/Org
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1390.html