Not obvious how to juju run commands which have their own arguments

Bug #1637819 reported by James Troup
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.1
Fix Released
High
Andrew Wilkins

Bug Description

'juju help run' says:

| usage: juju run [options] <commands>

So I try:

 | $ /srv/juju-dist/2.0.0/usr/bin/juju run --application=os-room1,os-room2,os-room3 hostname -f
 | error: flag provided but not defined: -f
 | $

Weird nomenclature, but OK. Let's try the standard "stop parsing
command line options from here":

| $ /srv/juju-dist/2.0.0/usr/bin/juju run --application=os-room1,os-room2,os-room3 -- hostname -f
| error: unrecognized args: ["-f"]
| $

So either, juju should respect '--' or the help text should make it
more obvious how to run commands with 'juju run' which include command
line options, e.g. by putting the string inside quotes.

Tags: usability
Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
milestone: none → 2.1.0-beta2
tags: added: usability
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.1-beta2 → none
Curtis Hovey (sinzui)
Changed in juju:
milestone: none → 2.1-rc1
Changed in juju:
milestone: 2.1-beta4 → 2.1-rc1
Changed in juju:
assignee: Alexis Bruemmer (alexis-bruemmer) → nobody
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.1-rc1 → 2.2.0-alpha1
Revision history for this message
Andrew Wilkins (axwalk) wrote :

FWIW, you can do this:

    juju run --application=os-room1,os-room2,os-room3 'hostname -f'

But that's dumb, and we should support multiple args. I'll fix that.

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

PR into develop (2.2) that included this fix: https://github.com/juju/juju/pull/6934

Changed in juju:
status: Triaged → Fix Committed
assignee: nobody → John A Meinel (jameinel)
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.