Page MenuHomePhabricator

debdeploy: show help message if invoked with no arguments
Closed, ResolvedPublic

Description

When invoked with no arguments, debdeploy fails with the following error message:

12:48:16 ema@neodymium.eqiad.wmnet:~
$ sudo debdeploy
Traceback (most recent call last):
  File "/usr/sbin/debdeploy", line 350, in <module>
    main()
  File "/usr/sbin/debdeploy", line 328, in main
    if opt.serverlist:
AttributeError: 'Namespace' object has no attribute 'serverlist'

It should instead display the output of --help:

13:01:56 ema@neodymium.eqiad.wmnet:~
$ sudo debdeploy --help
usage: debdeploy [-h] [--verbose]
                 {query_deps,deploy,query_restart,query_version} ...

optional arguments:
  -h, --help            show this help message and exit
  --verbose             Enable verbose output, e.g. show full apt output in
                        status-deploy and status-rollback

Command:
  Valid commands

  {query_deps,deploy,query_restart,query_version}
    query_deps          Query for necessary restarts after a library or
                        interpreter upgrade
    deploy              Install a software update
    query_restart       Query necesssary service restarts after library update
    query_version       Query the installed versions of packages

Details

Related Gerrit Patches:

Event Timeline

ema created this task.Oct 24 2018, 1:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 24 2018, 1:03 PM
ema triaged this task as Low priority.Oct 24 2018, 1:04 PM

Interesting, that's some fallout from the Python 3 migration, will have a look.

Change 484430 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/debs/debdeploy@master] Ensure debdeploy exits cleanly when called without any arguments

https://gerrit.wikimedia.org/r/484430

Change 484430 merged by Jbond:
[operations/debs/debdeploy@master] Ensure debdeploy exits cleanly when called without any arguments

https://gerrit.wikimedia.org/r/484430

Mentioned in SAL (#wikimedia-operations) [2019-01-16T15:41:01Z] <jbond42> "Import new debdeploy 0.0.99.7 packages for stretch T207845

Mentioned in SAL (#wikimedia-operations) [2019-01-16T15:56:08Z] <jbond42> Import new debdeploy 0.0.99.7 packages for jessie T207845

Mentioned in SAL (#wikimedia-operations) [2019-01-16T15:59:17Z] <jbond42> Import new debdeploy 0.0.99.7 packages for buster T207845

Mentioned in SAL (#wikimedia-operations) [2019-01-16T16:02:55Z] <jbond42> Import new debdeploy 0.0.99.7 packages for trusty T207845

Mentioned in SAL (#wikimedia-operations) [2019-01-17T14:36:22Z] <jbond42> rolling out update for debdeploy 0.0.99.6-1 -> 0.0.99.7-1 T207845

jbond closed this task as Resolved.Jan 18 2019, 1:09 PM

The new package has now been deployed please re-open if there are further issues

Thanks John