ERROR unrecognized command: juju metadata

Bug #1759013 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Incomplete
Low
Unassigned
2.3
Fix Released
High
Christopher Lee

Bug Description

In juju 2.3.5+2.3-287d5f0, the juju metadata command appears to be missing:

http://paste.ubuntu.com/p/Y2szkXkWzD/

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Confirmed for 2.3.4 and version listed above. Not an issue for the tip of develop

Changed in juju:
status: New → Triaged
milestone: none → 2.3.5
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

There seems to be some oddity around a user's path env var and whether juju metadata is a found command when running from snap.

You can run “/snap/juju/current/bin/juju-metadata” as a work around until it's fixed.

Changed in juju:
status: Triaged → In Progress
Revision history for this message
Christopher Lee (veebers) wrote :

juju-metadata is not in any PATH (it can be found in the likes of /snap/juju/3591/bin but that's not normally in any path).

The command will work if juju-metadata is in PATH, but that's a workaround.

Currently working on either putting the wrapper back in place that exposes that path or also install juju-metadata into /snap/bin.

Changed in juju:
assignee: nobody → Christopher Lee (veebers)
Revision history for this message
Christopher Lee (veebers) wrote :

Ok, this has been fixed for the point-release-tracking (candidate) and stable snaps (i.e. 2.3.5+2.3-bbd1ada works).

It has been fixed by using a wrapper script which isn't ideal. I think we should leave this bug open and re-do the fix in a better way.

Some options:
  - Set juju to search for juju.<command-name> in path so that additional commands in the 'app' snap stanza can be found.

  - It seems work is happening in snap/snapcraft to allow for 2 top level commands, which would work here (for now)

  - Make juju-metadata a separate snap to be installed if needed.

Changed in juju:
milestone: 2.3.5 → 2.3.6
Changed in juju:
status: In Progress → Triaged
importance: Undecided → Low
milestone: 2.3.6 → none
tags: added: tech-debt
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

This doesn't works with juju 2.4.x snap

Revision history for this message
Richard Harding (rharding) wrote :

@niedbalski can you specify what version of Juju and which track/channel of the snap you're using? I tested it with the edge and stable channels with success.

Revision history for this message
Raul Ikeda (raulikeda) wrote :

The problem still persists. I am using 2.4.3-bionic-amd64, but tried without success with other channels (edge, beta) or via apt.

Steps to reproduce:

After installed Openstack, created a fresh VM (bionic or xenial), installed juju via snap classic, configured openstack and credentials, and then tried to create an image metadata with juju metadata (reproducing the steps for configuring Openstack in juju).

Error:

ubuntu@client-xenial:~$ juju metadata
ERROR No controllers registered.

Please either create a new controller using "juju bootstrap" or connect to
another controller that you have been given access to using "juju register".

---------------------------------------------------------------------------
Workaround: just do a simple bootstrap localhost (LXD) or register some controller. After juju client is set up with some controller, the juju metadata will work normally.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I am pretty sure that veebers is not working on this bug.

Also I am not sure that this is still an issue - there has been a lot of work done since the report was last looked at. I'll mark as Incomplete for now: if you are still seeing it, please let us know.

Changed in juju:
assignee: Christopher Lee (veebers) → nobody
status: Triaged → Incomplete
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

tags: added: expirebugs-bot
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.