Comment 0 for bug 1679425

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

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.

## 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