Bug 1004536 - traceback "TypeError: cannot concatenate 'str' and 'NoneType' objects" in spacewalk-sync-setup when logging
traceback "TypeError: cannot concatenate 'str' and 'NoneType' objects" in spa...
Status: CLOSED DUPLICATE of bug 1458440
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Grant Gainey
Red Hat Satellite QA List
Depends On: 1001615 1458440
  Show dependency treegraph
Reported: 2013-09-04 17:31 EDT by Grant Gainey
Modified: 2017-10-03 15:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1001615
Last Closed: 2017-10-03 15:07:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Grant Gainey 2013-09-04 17:31:38 EDT
+++ This bug was initially created as a clone of Bug #1001615 +++

Description of problem:
I was playing with spacewalk-sync-setup and observed a traceback.

How reproducible:

Steps to Reproduce:
1. # spacewalk-sync-setup --ct --ss=<fqdn> --sl=<user> --sp=<pass>

Actual results:
Traceback (most recent call last):
  File "/usr/bin/spacewalk-sync-setup", line 610, in <module>
    master_cnx = connectTo(master_info)
  File "/usr/bin/spacewalk-sync-setup", line 299, in connectTo
    logging.info("Connecting to " + info['login'] + "@" + info['fqdn'])
TypeError: cannot concatenate 'str' and 'NoneType' objects

I believe this attempts to say me I have not provided master login info (server/user/pass), so maybe this is related or might be treated as similar issue falling into "insufficient input options verification" description:

# spacewalk-sync-setup --ct
Traceback (most recent call last):
  File "/usr/bin/spacewalk-sync-setup", line 605, in <module>
    config = setupConfig(options)
  File "/usr/bin/spacewalk-sync-setup", line 207, in setupConfig
    initializeConfig(opt, handle)
  File "/usr/bin/spacewalk-sync-setup", line 142, in initializeConfig
    hdr = hdr.replace('SLAVE', opt.slave)
TypeError: expected a character buffer object

Expected results:
There should be no traceback.
Comment 1 Grant Gainey 2013-09-04 17:54:32 EDT
Need to think about, at startup, "what do we have" and "what are we being asked to do".  Because the user can specify on the command-line, in config-files, or both, the answer can be complicated.


* What do we need to connect to master for?
  * Create master-template file
  * Create slave-template file
  * Apply change to master

* What do we need to connect to slave for?
  * Create slave-template file
  * Apply change to slave

* What are we being asked to do?
  * Create template(s)?
  * dry-run changes?
  * apply changes?
  * get CA-CERT?

We definitely need to add a validateAvailableInput(options, config) method that can look at what the app has available and what it's being asked to do, and produce human-useful error codes.
Comment 2 Grant Gainey 2017-10-03 15:07:35 EDT

*** This bug has been marked as a duplicate of bug 1458440 ***

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