depoloyer/jujuclient broken: show-model flag provided but not defined: -m

Bug #1612026 reported by Curtis Hovey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Undecided
Unassigned
juju-ci-tools
Fix Released
High
Curtis Hovey
juju-deployer
Invalid
Undecided
Unassigned
python-jujuclient
Fix Released
Undecided
Tim Van Steenburgh

Bug Description

As seen at
    http://reports.vapour.ws/releases/issue/56b44302749a566d4a1ab95a
starting in August 11

2016-08-10 23:19:16 [DEBUG] deployer.env: Connecting to environment...
error: flag provided but not defined: -m
Traceback (most recent call last):
  File "/usr/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 88, 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 47, in parse_env
    model = self.get_model(env_name, controller_name, model_name)
  File "/usr/lib/python2.7/dist-packages/jujuclient/juju2/connector.py", line 103, in get_model
    raise EnvironmentNotBootstrapped(env_name)
jujuclient.exc.EnvironmentNotBootstrapped: Environment aws-deployer-bundle:aws-deployer-bundle is not bootstrapped

Commit https://github.com/juju/juju/commit/94ffe7f7647e1c53b9ec59dfe4cffa017a2c11b2
removes "-m" the model is a required arg now

Revision history for this message
Curtis Hovey (sinzui) wrote :

juju-ci-tools get_model_uuid doesn't pass the model arg. It wants to see the uuids for all models. It might need changing too.

Changed in juju-core:
status: Triaged → Incomplete
Changed in juju-deployer:
status: New → Confirmed
Changed in juju-ci-tools:
status: New → Triaged
importance: Undecided → High
Changed in python-jujuclient:
status: New → Fix Committed
assignee: nobody → Tim Van Steenburgh (tvansteenburgh)
Curtis Hovey (sinzui)
Changed in juju-ci-tools:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → Fix Released
Aaron Bentley (abentley)
Changed in juju-ci-tools:
status: Fix Released → Triaged
Revision history for this message
Aaron Bentley (abentley) wrote :

assess_log_forward.py in juju-ci-tools is still affected:
http://reports.vapour.ws/releases/4260/job/functional-log-forward/attempt/76

Curtis Hovey (sinzui)
Changed in juju-ci-tools:
status: Triaged → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-ci-tools:
status: Fix Committed → Fix Released
affects: juju-core → juju
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Confirmed that it works, thanks!

From a UX point of view there's still a small issue in that in case you use beta 16 you'll get this output:

2016-08-31 09:21:08 Command (juju show-model local:default --format=yaml) Output:

 error: unrecognized args: ["local:default"]

It'd be really nice to silence it (at first I thought there was a real problem, but after inspecting the code I realized it's just the effect of the try/except in Connector.get_model).

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

Free, great point and I agree. However, I would expect that message to appear only if running on a release prior to beta16. On beta16 that command should work. Can you confirm which juju release you were running when you saw that error output?

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

@Tim: ah you're right, I was testing with beta15 (the one currently in xenial-updates). I didn't try with beta16, but assuming that the "-m" flag is gone there, yes, it should not print anything.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (3.8 KiB)

I just got a good deployer run with beta16:
$ juju-deployer -Wdv -c xenial-trunk-landscape-dense-maas.yaml -w 180
2016-08-31 10:23:35 [DEBUG] deployer.cli: Using runtime GoEnvironment on vmwarestack-controller:admin@local/controller
2016-08-31 10:23:35 [INFO] deployer.cli: Using deployment xenial-trunk-landscape-dense-maas.yaml
2016-08-31 10:23:35 [INFO] deployer.cli: Starting deployment of xenial-trunk-landscape-dense-maas.yaml
2016-08-31 10:23:35 [DEBUG] deployer.import: Getting charms...
2016-08-31 10:23:35 [DEBUG] deployer.charm: Cache dir /home/andreas/.local/share/juju/.deployer-store-cache/cs_trusty_haproxy
2016-08-31 10:23:35 [DEBUG] deployer.charm: Cache dir /home/andreas/.local/share/juju/.deployer-store-cache/cs_xenial_rabbitmq-server
2016-08-31 10:23:35 [DEBUG] deployer.charm: Cache dir /home/andreas/.local/share/juju/.deployer-store-cache/cs_xenial_postgresql
2016-08-31 10:23:35 [DEBUG] deployer.deploy: Resolving configuration
2016-08-31 10:23:35 [DEBUG] deployer.env: Connecting to environment...
2016-08-31 10:23:41 [DEBUG] deployer.env: Connected to environment
2016-08-31 10:23:41 [INFO] deployer.import: Creating machines...
2016-08-31 10:23:41 [INFO] deployer.import: Machine 0 already exists on environment, skipping creation
2016-08-31 10:23:41 [INFO] deployer.import: Deploying applications...
2016-08-31 10:23:42 [INFO] deployer.import: Deploying application haproxy using cs:trusty/haproxy
2016-08-31 10:23:42 [DEBUG] deployer.import: Refetching status for placement deploys
2016-08-31 10:23:54 [DEBUG] deployer.import: Setting annotations
2016-08-31 10:23:54 [INFO] deployer.import: Deploying application landscape-server using /home/andreas/bundles/mybundles/xenial/landscape-server
2016-08-31 10:23:54 [DEBUG] deployer.import: Refetching status for placement deploys
2016-08-31 10:24:05 [DEBUG] deployer.import: Setting annotations
2016-08-31 10:24:05 [INFO] deployer.import: Deploying application postgresql using cs:xenial/postgresql
2016-08-31 10:24:05 [DEBUG] deployer.import: Refetching status for placement deploys
2016-08-31 10:24:53 [DEBUG] deployer.import: Setting annotations
2016-08-31 10:24:53 [INFO] deployer.import: Deploying application rabbitmq-server using cs:xenial/rabbitmq-server
2016-08-31 10:24:53 [DEBUG] deployer.import: Refetching status for placement deploys
2016-08-31 10:25:06 [DEBUG] deployer.import: Setting annotations
2016-08-31 10:25:12 [DEBUG] deployer.import: Adding units...
2016-08-31 10:25:12 [DEBUG] deployer.import: Application 'haproxy' does not need any more units added.
2016-08-31 10:25:12 [DEBUG] deployer.import: Application 'landscape-server' does not need any more units added.
2016-08-31 10:25:12 [DEBUG] deployer.import: Application 'postgresql' does not need any more units added.
2016-08-31 10:25:12 [DEBUG] deployer.import: Application 'rabbitmq-server' does not need any more units added.
2016-08-31 10:25:12 [DEBUG] deployer.import: Waiting for units before adding relations
2016-08-31 10:29:27 [DEBUG] deployer.env: Delta machine: 0/lxd/0 change:alive
...
2016-08-31 10:43:23 [DEBUG] deployer.env: Connecting to environment...
2016-08-31 10:43:29 [DEBUG] deployer.env: Connected to envi...

Read more...

Changed in python-jujuclient:
status: Fix Committed → Fix Released
Changed in juju-deployer:
status: Confirmed → Invalid
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

Free, Andreas, thanks for the confirmations!

Changed in juju:
status: Incomplete → Fix Released
milestone: none → 2.0-beta17
status: Fix Released → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
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.