Description of problem: If you do spacewalk-splice-checkin --splice-sync --sample_json=<dir> run without <dir> existing, the run will succeed (good), but it will not create the sample_json dir. The script should probably check that the dir exists and has the correct permissions before starting. This prevents users from having to run the script a second time (possibly a lengthy operation) after fixing the error. Version-Release number of selected component (if applicable): 0.19 How reproducible: every time Steps to Reproduce: 1. run spacewalk-splice-checkin --splice-sync --sample_json=<dir that does not exist> Actual results: [root@dhcp129-162 spacewalk-splice-tool]# spacewalk-splice-checkin --splice-sync --sample_json=foo 2013-06-11 16:52:04,334 INFO spacewalk_splice_tool.checkin checkin:main: run starting 2013-06-11 16:52:04,335 INFO spacewalk_splice_tool.checkin checkin:splice_sync: Started syncing system data to splice 2013-06-11 16:58:51,144 INFO spacewalk_splice_tool.checkin checkin:splice_sync: calculating marketing product usage 2013-06-11 17:00:38,504 INFO spacewalk_splice_tool.checkin checkin:splice_sync: uploading to splice... 2013-06-11 17:00:38,505 INFO spacewalk_splice_tool.checkin checkin:build_server_metadata: building server metadata 2013-06-11 17:00:38,519 INFO spacewalk_splice_tool.checkin checkin:write_file: Directory doesn't exist: foo 2013-06-11 17:00:38,520 INFO spacewalk_splice_tool.checkin checkin:write_file: Directory doesn't exist: foo 2013-06-11 17:00:38,520 INFO spacewalk_splice_tool.checkin checkin:upload_to_rcs: sending metadata to server 2013-06-11 17:00:38,564 INFO splice.common.connect connect:_request: Sending 'POST' to '/splice/api//v1/spliceserver/' with headers '{'Content-type': 'application/json', 'Accept': 'application/json'}' 2013-06-11 17:00:41,834 INFO splice.common.connect connect:_request: Received '204' from 'POST /splice/api//v1/spliceserver/' 2013-06-11 17:00:41,835 DEBUG spacewalk_splice_tool.checkin checkin:upload_to_rcs: POST to /v1/spliceserver/: received 204 2013-06-11 17:00:42,257 INFO splice.common.connect connect:_request: Sending 'POST' to '/splice/api//v1/marketingproductusage/' with headers '{'Content-type': 'application/json', 'Accept': 'application/json'}' 2013-06-11 17:00:47,506 INFO splice.common.connect connect:_request: Received '204' from 'POST /splice/api//v1/marketingproductusage/' 2013-06-11 17:00:47,519 DEBUG spacewalk_splice_tool.checkin checkin:upload_to_rcs: POST to /v1/marketingproductusage/: received 204 Upload was successful Expected results: script fails immediately with an error message, so user can fix directory issue Additional info: I marked this as "low" because it is a debugging option that users wouldn't be using frequently.
commit a170572680431783aa2fef20cb9312e1f7ca9ffd sst now checks for the directory and if it's writeable
Verified in spacewalk-splice-tool-0.24-1.el6sam.x86_64 # spacewalk-splice-checkin --splice-sync --sample_json=/the/wrong/path 2013-06-21 09:01:58,914 ERROR __main__ spacewalk-splice-checkin:<module>: Directory /the/wrong/path for sample json does not exist.
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