landscape-config shouldn't accept empty --computer-title

Bug #1459641 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Invalid
Medium
Unassigned

Bug Description

We had a case where a user was registering a computer using a command line like this:

# landscape-config --account-name=andreas --url=https://staging.landscape.canonical.com/message-system --ping-url=http://staging.landscape.canonical.com/ping --computer-title=$variable

Due to a mistake, $variable was empty. Turns out the landscape-config tool doesn't complain. It fails later on when trying to register, and there are no useful logs about the failure:

(...)

Tags:
 * Stopping landscape-client daemon [fail]
 * Starting the landscape-client daemon [ OK ]
Please wait...

Request a new registration for this computer now? (Y/n):
Traceback (most recent call last):
Failure: landscape.lib.amp.MethodCallError: timeout

Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: landscape.lib.amp.MethodCallError: timeout

It just stalls there, you have to ctrl-c it, at which point you get:
Failure: landscape.lib.amp.MethodCallError: timeout
^CTraceback (most recent call last):
  File "/usr/bin/landscape-config", line 13, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/landscape/configuration.py", line 768, in main
    result = register(config, reactor)
  File "/usr/lib/python2.7/dist-packages/landscape/configuration.py", line 685, in register
    assert len(results) == 1, "We expect exactly one result."
AssertionError: We expect exactly one result.
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 837, in _cbDeferred
    self.errback(failure.Failure(FirstError(result, index)))
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 423, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/landscape/configuration.py", line 645, in got_error
    raise SystemExit
exceptions.SystemExit:
root@nsn7:~#

tags: removed: kanban
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

Landscape Team

Changed in landscape-client:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.