[2.0rc1] CLI version command doesn't work

Bug #1557434 reported by Michael Foord on 2016-03-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Gavin Panella
2.0
High
Gavin Panella
Trunk
High
Gavin Panella

Bug Description

Calling version from the command line doesn't work.

$ maas maas version
usage: /usr/bin/maas [-h] COMMAND ...

optional arguments:
  -h, --help show this help message and exit

drill down:
  COMMAND
    list List remote APIs that have been logged-in to.
    login Log in to a remote API, and remember its description and
              credentials.
    logout Log out of a remote API, purging any stored credentials.
    refresh Refresh the API descriptions of all profiles.
    maas Interact with http://172.16.0.2/MAAS/api/2.0/

http://maas.ubuntu.com/

'Namespace' object has no attribute 'execute'

Related branches

Andres Rodriguez (andreserl) wrote :

Hi Michael,

Seems like you need to log in? Can you try login in first?

Changed in maas:
status: New → Incomplete
Michael Foord (mfoord) wrote :

Nope, was logged in.

$ maas login maas http://172.16.0.2/MAAS XXXXX

You are now logged in to the MAAS server at
http://172.16.0.2/MAAS/api/2.0/ with the profile name 'maas'.

For help with the available commands, try:

  maas maas --help

$ maas maas version
usage: /usr/bin/maas [-h] COMMAND ...

optional arguments:
  -h, --help show this help message and exit

drill down:
  COMMAND
    refresh Refresh the API descriptions of all profiles.
    login Log in to a remote API, and remember its description and
              credentials.
    logout Log out of a remote API, purging any stored credentials.
    list List remote APIs that have been logged-in to.
    maas Interact with http://172.16.0.2/MAAS/api/2.0/

http://maas.ubuntu.com/

'Namespace' object has no attribute 'execute'

Michael Foord (mfoord) on 2016-03-30
Changed in maas:
status: Incomplete → New
Michael Foord (mfoord) wrote :

Note that "maas maas version read" works, I was typing the command wrong. The error message is confusing though.

Michael Z. Krog (mic-apaq) wrote :

We experience this too. After upgrading to Version 2.0.0 (rc1+bzr5143) our system is completely broken.

## Using CLI
```
devops@maas:~$ maas list
devops http://10.10.0.2:5240/MAAS/api/2.0/ 2DFfzeg6nLyezsYDGt:GucMNwujbVQRZA8Ksz:makatf7e849fJdATrtKFKYkYNBXQ7MbA
devops@maas:~$ maas devops machines
usage: /usr/bin/maas [-h] COMMAND ...

optional arguments:
  -h, --help show this help message and exit

drill down:
  COMMAND
    list List remote APIs that have been logged-in to.
    refresh Refresh the API descriptions of all profiles.
    logout Log out of a remote API, purging any stored credentials.
    login Log in to a remote API, and remember its description and
                  credentials.
    apikey Used to manage a user's API keys. Shows existing keys unless
                  --generate or --delete is passed.
    createadmin Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.
    devops Interact with http://10.10.0.2:5240/MAAS/api/2.0/

http://maas.io/

'Namespace' object has no attribute 'execute'
```

## Using Web UI
Error occurred
Reload'NoneType' object is not iterable

Gavin Panella (allenap) wrote :

I've figured out the problem here.

In development, a version of argparse from PyPI is installed by zc.buildout: testtools requires unittest2 which requires argparse 1.1. Unfortunately argparse 1.1 on PyPI is substantially different to argparse 1.1 in the Python standard library. Sigh.

This means that this bug never manifests in development, only when installed, and when the command is incomplete, i.e. missing the "read" verb in the OP's case.

Changed in maas:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Gavin Panella (allenap)
Changed in maas:
milestone: none → 2.1.0
summary: - CLI version command doesn't work (2.0)
+ [2.0rc1] CLI version command doesn't work
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers