Bug 1009841 - spacecmd sometimes fails in configchannel_backup
Summary: spacecmd sometimes fails in configchannel_backup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space21
TreeView+ depends on / blocked
 
Reported: 2013-09-19 09:47 UTC by Michele Baldessari
Modified: 2018-12-03 19:59 UTC (History)
0 users

Fixed In Version: spacecmd-2.1.20.1
Clone Of:
Environment:
Last Closed: 2014-03-04 13:08:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Michele Baldessari 2013-09-19 09:47:08 UTC
Description of problem:
spacecmd -d -s satellitexxx -uxxxx  configchannel_backup foo-std20-config-base
DEBUG: : False
DEBUG: Read configuration from /root/.spacecmd/config
DEBUG: Loading configuration section [spacecmd]
DEBUG: Current Configuration: {'username': 'xxxx', 'server': 'xxxxx'}
DEBUG: Configuration section [xxxxx] does not exist
DEBUG: Connecting to https://xxxxx/rpc/api
DEBUG: Server API Version = 10.11
INFO: Spacewalk Username: xxxx
Spacewalk Password: 
DEBUG: Loading cache from /root/.spacecmd/xxxxx/ssm
DEBUG: /root/.spacecmd/xxxxx/ssm does not exist
DEBUG: : False
DEBUG: Loading cache from /root/.spacecmd/xxxxxx/systems
DEBUG: /root/.spacecmd/xxxxxx/systems does not exist
DEBUG: Loading cache from /root/.spacecmd/xxxxxx/errata
DEBUG: /root/.spacecmd/xxxxxx/errata does not exist
DEBUG: Loading cache from /root/.spacecmd/xxxxxx/packages_short
DEBUG: /root/.spacecmd/xxxxxx/packages_short does not exist
DEBUG: Loading cache from /root/.spacecmd/xxxxxx/packages_long
DEBUG: /root/.spacecmd/xxxxxx/packages_long does not exist
DEBUG: Loading cache from /root/.spacecmd/xxxxxx/packages_by_id
DEBUG: /root/.spacecmd/xxxxxx/packages_by_id does not exist
INFO: Connected to https://xxxxxx/rpc/api as xxxxxx
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/at.allow
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/bashrc
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.allow
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.daily/foo-authorized_keys
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.daily/foo-satellite_refresh
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.daily/foo-tmpwatch
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.hourly/foo-configreplace
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/cron.weekly/foo-blacklistinfo
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/hosts
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/init.d/functions
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/init/control-alt-delete.conf
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/issue
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/issue.net
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/login.defs
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/logrotate.conf
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/logrotate.d/foo-logs
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/logrotate.d/syslog
Output Path:   /root/spacecmd-backup/configchannel/2013-09-09/foo-std20-config-base/etc/mail/sendmail.cf
ERROR: argument 1 must be string or read-only character buffer, not None
Traceback (most recent call last):
  File "/usr/bin/spacecmd", line 133, in ?
    shell.print_result(shell.onecmd( precmd ), precmd)
  File "/usr/lib64/python2.4/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.4/site-packages/spacecmd/configchannel.py", line 270, in do_configchannel_backup
    of.write( details.get('contents') )
TypeError: argument 1 must be string or read-only character buffer, not None


Version-Release number of selected component (if applicable):
1.9.4

How reproducible:
Not always. Not sure what is triggering it.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Milan Zázrivec 2013-12-13 15:48:25 UTC
Not quite sure why would server return None instead of '' here, nonetheless,
the following fix will address the problem on spacecmd's end:

spacewalk.git master: dea26dd6f4ffc1f86655274b536d4d041237194e

Comment 2 Matej Kollar 2014-01-17 12:16:09 UTC
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.

Comment 3 Matej Kollar 2014-03-04 13:08:25 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 4 Matej Kollar 2014-03-04 13:09:06 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21


Note You need to log in before you can comment on or make changes to this bug.