maas-cli stack trace if .maascli.db unreadable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
High
|
Unassigned |
Bug Description
The maas command line client is brittle to unexpected inputs. On trusty, I tried to run the 'sudo maas createsuperuser' command that I used on precise, quantal, and saucy, but it failed. I wanted detailed help, so I ran 'maas -h', and that dumped a stack trace because the file /home/ubuntu/
I expected the 'createsuperuser' command to be useful -- hints about its replacement would be welcome.
I expected a simple error message if a database file isn't readable rather than a stack trace.
I expected some simple help regardless of database ownership.
I expected the advice about getting help to be usable with copy-and-paste.
Thanks
Here's my full transcript:
ubuntu@
usage: /usr/lib/
/usr/lib/
ubuntu@
Traceback (most recent call last):
File "/usr/lib/
"__main__", fname, loader, pkg_name)
File "/usr/lib/
exec code in run_globals
File "/usr/lib/
main()
File "/usr/lib/
parser = prepare_
File "/usr/lib/
api.
File "/usr/lib/
with ProfileConfig.
File "/usr/lib/
return self.gen.next()
File "/usr/lib/
os.
OSError: [Errno 13] Permission denied: '/home/
ubuntu@
Error: no arguments given.
Run /usr/lib/
ubuntu@
-bash: /usr/lib/
ubuntu@
-rw-r--r-- 1 root root 362 Apr 15 16:06 /usr/lib/
ubuntu@
Traceback (most recent call last):
File "/usr/lib/
"__main__", fname, loader, pkg_name)
File "/usr/lib/
exec code in run_globals
File "/usr/lib/
main()
File "/usr/lib/
parser = prepare_
File "/usr/lib/
api.
File "/usr/lib/
with ProfileConfig.
File "/usr/lib/
return self.gen.next()
File "/usr/lib/
os.
OSError: [Errno 13] Permission denied: '/home/
ubuntu@
-rw------- 1 root root 3072 May 14 23:11 /home/ubuntu/
ubuntu@
usage: /usr/lib/
....
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: maas 1.5+bzr2252-
ProcVersionSign
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.1
Architecture: amd64
Date: Wed May 14 23:14:12 2014
Ec2AMI: ami-000008a2
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.large
Ec2Kernel: aki-0000022a
Ec2Ramdisk: ari-0000022a
PackageArchitec
ProcEnviron:
TERM=rxvt-unicode
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: maas
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
- maas command line client brittle to unexpected inputs + maas-cli stack trace if .maascli.db unreadable |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: maas-cli |
tags: |
added: cli removed: maas-cli |
Changed in maas: | |
milestone: | none → 2.3.0 |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.x |
On 15/05/14 09:22, Seth Arnold wrote: .maascli. db was owned by root. I tried running a bare
> Public bug reported:
>
> The maas command line client is brittle to unexpected inputs. On trusty,
> I tried to run the 'sudo maas createsuperuser' command that I used on
> precise, quantal, and saucy, but it failed. I wanted detailed help, so I
> ran 'maas -h', and that dumped a stack trace because the file
> /home/ubuntu/
> 'maas' to get help, and that gave an error message with instruction to
> run a command that isn't actually executable.
>
> I expected the 'createsuperuser' command to be useful -- hints about its
> replacement would be welcome.
On this page maas.ubuntu. com/docs1. 5/install. html
http://
It says to run "sudo maas-region-admin createadmin ..."
Is there any reason you missed that that we can help to fix?
(In the last release, the maas command was renamed to maas-region-admin,
and maas-cli to maas, which has caused some confusion)
> I expected a simple error message if a database file isn't readable
> rather than a stack trace.
>
> I expected some simple help regardless of database ownership.
This should have happened without the stacktrace, and is the real bug
here. I will amend the title accordingly.
> I expected the advice about getting help to be usable with copy-and-
> paste.
Please file a separate bug for that.
(Also please file bugs on the upstream maas project)