Looks like juju ssh thinks it is running a remote command, it always exits with the last returncode executed in the remote shell. This is very unexpectd.
THIS IS EXPECTED
$ juju ssh mongodb/0 'ls /bugus'
ls: cannot access /bugus: No such file or directory
Connection to 10.55.32.3 closed.
ERROR exit status 2
THIS IS UNEXPECTED
$ juju ssh mongodb/0
ubuntu@juju-staging-machine-1:~$ ls /bogus
ls: cannot access /bogus: No such file or directory
ubuntu@juju-staging-machine-1:~$ logout
Connection to 10.55.32.3 closed.
ERROR exit status 2
Looks like juju ssh thinks it is running a remote command, it always exits with the last returncode executed in the remote shell. This is very unexpectd.
THIS IS EXPECTED
$ juju ssh mongodb/0 'ls /bugus'
ls: cannot access /bugus: No such file or directory
Connection to 10.55.32.3 closed.
ERROR exit status 2
THIS IS UNEXPECTED juju-staging- machine- 1:~$ ls /bogus juju-staging- machine- 1:~$ logout
$ juju ssh mongodb/0
ubuntu@
ls: cannot access /bogus: No such file or directory
ubuntu@
Connection to 10.55.32.3 closed.
ERROR exit status 2