juju run --all does not work with local provider

Bug #1426118 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Medium
Unassigned

Bug Description

$ juju run --all uname
- MachineId: "0"
  ReturnCode: 255
  Stderr: "Permission denied (publickey,password).\r\n"
  Stdout: ""
- MachineId: "1"
  Stdout: 'Linux

'
- MachineId: "2"
  Stdout: 'Linux

'

Presumably this is caused by juju attempting to ssh into machine 0 (i.e. localhost) as ubuntu.
$ juju ssh 0
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Permission denied (publickey,password).
ERROR subprocess encountered error code 255

Revision history for this message
Ian Booth (wallyworld) wrote :

For local provider, juju ssh and juju run etc have to be executed as sudo.

Changed in juju-core:
status: Triaged → Invalid
Revision history for this message
Aaron Bentley (abentley) wrote :

Sudo does not appear to help:
$ sudo juju run --all uname
[sudo] password for abentley:
- MachineId: "0"
  ReturnCode: 255
  Stderr: "Permission denied (publickey,password).\r\n"
  Stdout: ""
- MachineId: "1"
  Stdout: 'Linux

'
- MachineId: "2"
  Stdout: 'Linux

'
Even if sudo is required, juju should either automatically sudo like it does for bootstrap, or error with a clear message.

Changed in juju-core:
status: Invalid → Triaged
Revision history for this message
Ian Booth (wallyworld) wrote :

The difference with bootstrap is that the automatic sudo is part of the local provider infrastructure. juju ssh and run are generic commands that are provider independent. I don't think it will be practical to hack in an auto sudo feature for these commands. For local provider, some log files also require sudo to read; it's just how local is at the moment until user space lxc can be supported.

Revision history for this message
Aaron Bentley (abentley) wrote :

Can these commands even work if they're provider-independent? How would they know not to log in as "ubuntu"? (My laptop has no ubuntu user, of course.)

Revision history for this message
Ian Booth (wallyworld) wrote :

The containers are created with an ubuntu user. Hence juju ssh works on all providers since the creation of the ubuntu user in the running images can be assumed.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 1426118] Re: juju run --all does not work with local provider

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Machine 0 isn't *in* a container.

On 2015-03-02 09:00 AM, Ian Booth wrote:
> The containers are created with an ubuntu user. Hence juju ssh
> works on all providers since the creation of the ubuntu user in the
> running images can be assumed.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU9HRYAAoJEK84cMOcf+9hARgIAIpsbMRhrVgE/g33S1/tmGpi
ifUGTJJXX9vclUQRyOkaYfwn+cJnQe1t/ymUAlzJtF9FWK5nTp2uHCChIbc5BPtl
L2bg7oe7EDzvM0MKzHcomSyGiIUzSCANVaSc0trn0v3bfQe127QsgAkMA3p+z+yW
tKGGzuyV6GMWM1fq4X1GmSUFX6wvbTYtng3Hzzjb9+rMFi6iL3NpVkEa75yWvhyN
j6go9WaVe4A6e8EYXLHwX6bW0KkVzia1dV399sfqkdXRcZ0u4yN4v1wfrOh0QxRg
NFrNInuNjJUSlLRG0som7KiGplsyPRhopyS3n9XRtoPdfDvGWpxlooYsrznieys=
=8FGd
-----END PGP SIGNATURE-----

Curtis Hovey (sinzui)
Changed in juju-core:
status: Triaged → Won't Fix
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.