[07:01] Good morning Juju world! === frankban|afk is now known as frankban [08:37] ohai [08:56] Hi, I am deploying a charm in Juju, and watching Juju debug-log status. Z Message for related unit is waiting for machine &state of z machine is Pending. Normally, after z machine starts; logs in z watch debug-log starts flowing. My question is : How to check the logs of the undergoing actions prior having the machine started , I mean the logs of machine STARTING-UP? (PS: juju ssh -m controller 0 and tail -f /var/log/juju/logsink.log is wai [09:02] hi Naz, are you able to ssh into the machine? [09:02] Naz: if the machine is stuck on provisioning you can retry-rpovisioning [09:03]  juju retry-provisioning [09:03] if you can ssh into the machine all juju logs should under /var/log/juju [09:07] Hi Kjackal, Thank you for your reply. In fact, I am interested in seeing the logs prior allocating the IP Address for the machine, i.e. the machine is still in state PENDING [09:09] ok... so if it does not have an Ip.... I would look at the console of you cloud(?) provider? [09:09] Naz: ^ [09:09] Naz: you could also try debug-log without any switches, or all-machines.log on the controller [09:12] Yes, for example: id: 19 State: pending 10.187.111.207 juju-8aa58b-19 xenial [09:13] Even If the ip address is allocated, I still cannot ssh it until it's started.. In fact: [09:13] juju ssh 19 ERROR retrieving SSH host keys for "19": keys not found [09:13] Hi Admcleod, let me try please, one sec [09:14] @Kjackal, I am working on local Cloud (LXD) [09:16] @Admcleod, where is the all-machines.log? In fact, after sshing into the controller, I get ubuntu@juju-b99076-0:/var/log/juju$ ll total 48172 drwxr-xr-x 2 syslog adm 5 May 16 13:13 ./ drwxrwxr-x 8 root syslog 23 May 25 06:25 ../ -rw------- 1 syslog syslog 0 May 16 13:13 audit.log -rw------- 1 syslog syslog 47220599 May 29 09:15 logsink.log -rw------- 1 syslog syslog 1846025 May 29 09:07 machine-0.log [09:17] @Admcleod, where is the all-machines.log? In fact, after sshing into the controller, I get ubuntu@juju-b99076-0:/var/log/juju$ ll ---> audit.log and logsink.log and machine-0.log [09:18] lazyPower: hi, respawning the cluster which had the race-condition on etcd unit, crossfingered \o/ [09:18] Naz: then your lxc logs are under /var/log/lxc (or lxd?) also have a look here to get access to the the lxc contaners spawed by juju http://lzone.de/cheat-sheet/LXC [09:19] Naz: you sill probably need something like sudo lxc list and sudo lxc exec -- /bin/sh (I hope) [09:21] @Kjackal, let me try it please :) [09:25] @Kjackal, HP:/var/log/lxd/juju-8aa58b-19$ ll ====> forkstart.log and lxc.conf and lxc.log and lxc.log.old , all with NOT An UP-TO-DATE Timestamp. [09:25] @Kjackal, $more lxc.log ===> lxc 20170529090737.930 WARN lxc_start - start.c:signal_handler:322 - Invalid pid for SIGCHLD. Received pid 10124, expected pid 10129. [09:26] Naz: so you see the container in lxc list? [09:27] @kjackal, yes, I see it in lxc list [09:27] can you get a shell inside the container? [09:28] Naz: something like lxc execute juju-8aa58b-19 -- /bin/sh (I hope) [09:29] @kjackal: last line is ===> error: unknown command: execute [09:29] $ lxc execute juju-8aa58b-19 -- /bin/sh ---> Usage: lxc [options] ====> Available commands: ---> config - Manage configuration..... [09:30] ok [09:30] Naz: lxc exec juju-8aa58b-19 -- /bin/bash [09:30] it should be lxc-execute [09:31] $ lxc-execute juju-8aa58b-19 -- /bin/sh The program 'lxc-execute' is currently not installed. You can install it by typing: sudo apt install lxc1 [09:31] can you please try lxc exec ? [09:31] Yes, :) lxc exec juju-8aa58b-19 -- /bin/bash ====> Works :) [09:33] I got the shell inside the machine although its pending !, now what? :) [09:34] Naz: is there anything interesting under /var/logs? [09:34] do you have network interfaces up? [09:36] @kjackal, you are the man :), Yes, in the /var/log, there is an up-to-date syslog file that captures the ongoing event while the machine is pending [09:37] :) [09:41] @Admcleod, I didnt find all-machines.log neither of the host nor on the controller: ===> $ sudo find / -name *all-machines.log ===> NOTHING.... But fortunately, now my issue is solved by: lxc exec juju-xyz- -- /bin/bash and tail -f /var/log/syslog [09:41] Thank you Kjackal and Thank you Admcleod. === Spads_ is now known as Spads === freyes__ is now known as freyes [16:09] Hello. I'm trying once again to get a charm python-django get get out of a "stuck" situation. I'm trying the things I've learned by "remove-application", "resolved" etc. But I'm stuck and cant get out of it. Seems my only way forward is to purge the environment (again). This is a pain since it takes a while to re-create the situation and I'm in a debug mode at the moment. Is there any trix you use to get a unit out of a "deadlock/s [16:09] tuck" situation so I don't end up in a debug cycle that takes forever? [17:16] o/ juju world [17:28] Does the charm of openstack-base support configurating the root password injection too? [17:36] Catalys for the underlying system? or for the UI? [17:36] OpenStack UI* [17:54] Budgie^Smore I believe that the dashboard has a variable for the injection in its local_settings.py and compute has it in the nova.conf, so I assume both then. [17:54] Budgie^Smore That said the dashboard says it has it on by default though. [17:56] so which root password are we talking? juju sets up password-less login and injects an ssh key into the underlying os root account [17:57] Budgie^Smore Oh sorry I should have mentioned that I am talking about the root password of instances created by Openstack which runs on Juju :). [17:57] Budgie^Smore Normally I would run "juju config compute-nova" to change a setting though. [18:00] https://docs.openstack.org/admin-guide/compute-admin-password-injection.html [18:04] Catalys ah yes [18:04] Catalys been a long time since I cared about passwords like that :) [18:08] Budgie^Smore Yes I guess SSH keys are the norm but passwords are still easy for development stuff, at least so I feel about it. Btw I did try "juju config openstack-dashboard retrieve-password=true" but that didn't seem to much affect do I have to do something additional to activate that? [18:12] Budgie^Smore And when I ssh into a compute node and add it myself into the config, won't it reset upon reboot though? [18:13] Catalys that has been my experience of "manual" config changes, could the image used to create the VM be turning it off? disclaimer: not a juju dev but like to help if I can :) [18:14] Budgie^Smore Do you mean turn off the retrieve password option or injection :)? [18:15] Catalys no, you can build an image that turns off password login in ssh so regardless of a password injection or not it will fail to log in with a password [18:15] Budgie^Smore Oh true but it doesn't generate a password in the first place, it only seems to inject key pairs at the moment. [18:17] Budgie^Smore That said there is cloud-init though. [18:17] Catalys but even then in the companies I have work in we used keys or certs for all environments (even our work systems only used local passwords), that way no passwords were transmitted across the network, and sshkeys / certs had local passphrases === Spads_ is now known as Spads [19:09] Budgie^Smore Turns out the easiest for now might be using scripts which run post installation, now I move on to figuring out why my external network doesn't work haha. [19:14] Budgie^Smore It gets a IP from the DHCP server, feel free to jump in if you've got an idea though.