Juju 3 client with juju 2.9 controllers

The instructions listed here seem not to work with the juju 3.x client https://docs.openstack.org/charm-guide/latest/admin/ops-change-keystone-password.html#obtain-the-current-password
juju run --unit keystone/leader leader-get admin_passwd
returns: ERROR option provided but not defined: --unit

juju run keystone/leader leader-get admin_passwd
returns: ERROR argument "admin_passwd" must be of the form key.key.key...=value

juju version
3.0.2-osx-amd64

there didn’t seem to be a way to brew install juju@2.9.x

Essentially I have 3 questions

  1. Is there an updated syntax to use with the juju 3.x client to accomplish the documented command: juju run --unit keystone/leader leader-get admin_passwd
  2. If there is not an updated syntax to use with the 3.x client, what is the recommended method to brew install the 2.9.x juju client?
  3. Is there something else that we’re completely missing?
1 Like

confirmed

➜  ~ juju version
3.0.2-genericlinux-amd64
➜  ~ juju run keystone/0 leader-get admin_passwd
ERROR argument "admin_passwd" must be of the form key.key.key...=value

thankfully for snap you can switch channels without too much trouble and I was able to run the command afterwards.

sudo snap refresh juju --channel latest/stable --classic
or 
sudo snap refresh juju --channel 2.9/stable --classic

as far as Brew goes, it looks like they only have 3.02 https://formulae.brew.sh/formula/juju#default

for juju version 3+ i have found this command works.

juju exec --unit keystone/leader leader-get admin_passwd