juju-deployer errors if it cannot determine model
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:
Traceback (most recent call last):
File "/root/
sys.
File "/root/
run()
File "/root/
env_name = get_env_
File "/root/
with open(os.
IOError: [Errno 2] No such file or directory: '/root/
-
## With Juju 2.1.x:
(mojo) root@foo:
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
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.