Situation.
$ juju bootstrap -e local --upload-tools
failed because /usr/bin/mongod is not installed, see LP #1271937
$ juju destroy-environment -y local
fails because the environment is not bootstrapped
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
ERROR state/api: websocket.Dial wss://10.0.3.1:17070/: dial tcp 10.0.3.1:17070: connection refused
$ juju destroy-environment -y local --force
works, but does not stop the jujud processes
ubuntu@winton-02:~/src/launchpad.net/juju-core$ pstree
init─┬─acpid
├─atd
├─cron
├─dbus-daemon
├─dnsmasq
├─7*[getty]
├─irqbalance
├─rsyslogd───3*[{rsyslogd}]
├─sshd───sshd───sshd───bash───tmux
├─systemd-logind
├─systemd-udevd
├─tmux─┬─bash───vim───{vim}
│ └─bash─┬─juju─┬─sudo───bash───bash───jujud───6*[{jujud}] // oops
│ │ └─6*[{juju}]
│ └─pstree
├─upstart-file-br
├─upstart-socket-
└─upstart-udev-br
ubuntu@winton-02:~/src/launchpad.net/juju-core$ pgrep -lf jujud
15368 jujud
ubuntu@winton-02:~/src/launchpad.net/juju-core$ sudo !!
sudo pgrep -lf jujud
15368 jujud
15516 sudo
ubuntu@winton-02:~/src/launchpad.net/juju-core$ cat /proc/15368/cmdline
/home/ubuntu/.juju/local/tools/1.17.5.1-trusty-ppc64/jujudbootstrap-state--data-dir/home/ubuntu/.juju/local--env-configYWRtaW4tc2VjcmV0OiAiIgphZ2VudC12ZXJzaW9uOiAxLjE3LjUuMQphcGktcG9ydDogMTc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cG9ydDogNjUxNAp0ZXN0LW1vZGU6IGZhbHNlCnRvb2xzLW1ldGFkYXRhLXVybDogIiIKdG9vbHMtdXJsOiAiIgp0eXBlOiBsb2NhbAo=--debug
So, now we can bootstrap again and have TWO sets of local provider processes running
ubuntu@winton-02:~/src/launchpad.net/juju-core$ pgrep -lf juju
15310 juju
15368 jujud
15521 juju
15579 jujud
This will not end well
top - 00:06:40 up 2 days, 23:09, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 82 total, 1 running, 76 sleeping, 5 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
KiB Mem: 8255588 total, 1005912 used, 7249676 free, 88848 buffers
KiB Swap: 0 total, 0 used, 0 free. 685768 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15310 ubuntu 20 0 370348 78212 12620 T 0.0 0.9 0:10.98 juju
15368 root 20 0 403920 34504 11592 T 0.0 0.4 0:00.16 jujud
^ T state, ooh err.