juju-deployer errors if it cannot determine model

Bug #1679425 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-deployer
Won't Fix
Wishlist
Unassigned

Bug Description

The following use case is important as juju-deployer is used for validating bundles, without actually deploying them. If a user has a model/environment configured, it works fine. But in a CI scenario where there will be no model or controller when doing bundle and charm config validation, the following is the experience.

## With Juju 1.25.x:
(mojo) root@foo:~/openstack-charm-testing# juju-deployer -vd next.yaml -b
Traceback (most recent call last):
  File "/root/bot-control/tools/mojo-openstack/.tox/mojo/bin/juju-deployer", line 11, in <module>
    sys.exit(main())
  File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/cli.py", line 140, in main
    run()
  File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/cli.py", line 163, in run
    env_name = get_env_name(options.juju_env)
  File "/root/bot-control/tools/mojo-openstack/.tox/mojo/local/lib/python2.7/site-packages/deployer/utils.py", line 402, in get_env_name
    with open(os.path.join(juju_home, 'environments.yaml')) as fh:
IOError: [Errno 2] No such file or directory: '/root/.juju/environments.yaml'

-

## With Juju 2.1.x:
(mojo) root@foo:~/openstack-charm-testing# juju-deployer -vd next.yaml -b
2017-04-03 22:45:38 [ERROR] deployer.utils: Command (juju switch) Output:

 ERROR no currently specified model

2017-04-03 22:45:38 [INFO] deployer.cli: Deployment stopped. run time: 0.03

Tags: uosci
Revision history for this message
Ryan Beisner (1chb1n) wrote :

The "-b" option is described as:

  -b, --branch-only Update vcs branches and exit.

Which has no need or reason to interact with a Juju model or controller.

description: updated
Revision history for this message
Tom Haddon (mthaddon) wrote :

Marking as won't fix given the age of the bug, and that native juju bundles would be used for this now.

Changed in juju-deployer:
status: New → Won't Fix
importance: Undecided → Wishlist
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.