get_model fails for shared controller

Bug #1625807 reported by Tim Kuhlman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-deployer
Fix Released
Undecided
Tim Kuhlman

Bug Description

When running on a shared controller I get the bug:

Traceback (most recent call last):
  File "/usr/local/bin/juju-deployer", line 9, in <module>
    load_entry_point('juju-deployer==0.9.0', 'console_scripts', 'juju-deployer')()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 140, in main
    run()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 250, in run
    importer.Importer(env, deployment, options).run()
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 301, in run
    self.env.connect()
  File "/usr/lib/python2.7/dist-packages/deployer/env/go.py", line 78, in connect
    self.client = self.client_class.connect(self.name)
  File "/usr/lib/python2.7/dist-packages/jujuclient/environment.py", line 87, in connect
    return connector().run(cls, env_name)
  File "/usr/lib/python2.7/dist-packages/jujuclient/connector.py", line 41, in run
    jhome, data = self.parse_env(env_name)
  File "/usr/lib/python2.7/dist-packages/jujuclient/juju2/connector.py", line 57, in parse_env
    model = self.get_model(controller_name, model_name)
  File "/usr/lib/python2.7/dist-packages/jujuclient/juju2/connector.py", line 96, in get_model
    ['juju', 'show-model', '-m', model, '--format=yaml'])
  File "/usr/lib/python2.7/dist-packages/jujuclient/utils.py", line 21, in check_output
    output = subprocess.check_output(*args, **kw)
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['juju', 'show-model', '-m', 'laptop:mojo-test', '--format=yaml']' returned non-zero exit status 1

Running 'juju show-model -m laptop:mojo-test' does fail, but running 'juju show-model -m laptop:admin/mojo-test' works fine. This corresponds to the output from 'juju models'
"$ juju models
MODEL OWNER STATUS LAST CONNECTION
admin/mojo-test* admin@local available 7 seconds ago
"

The juju user being run as was created with 'juju add-user', granted write to the model and added to the machine above with 'juju register'.

I have tried this with Juju beta15 straight from the xenial repos and with juju beta18 from the devel ppa.

Related branches

Tim Kuhlman (timkuhlman)
Changed in juju-deployer:
assignee: nobody → Tim Kuhlman (timkuhlman)
Changed in juju-deployer:
status: New → In Progress
Changed in juju-deployer:
status: In Progress → Fix Committed
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

New build in ppa:tvansteenburgh/ppa

Changed in juju-deployer:
status: Fix Committed → Fix Released
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.