[07:01] <kjackal> Good morning Juju world!
[08:37] <cnf> ohai
[08:56] <Naz> 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] <kjackal> hi Naz, are you able to ssh into the machine?
[09:02] <kjackal> Naz: if the machine is stuck on provisioning you can retry-rpovisioning
[09:03] <kjackal>  juju retry-provisioning
[09:03] <kjackal> if you can ssh into the machine all juju logs should under /var/log/juju
[09:07] <Naz> 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] <kjackal> ok... so if it does not have an Ip.... I would look at the console of you cloud(?) provider?
[09:09] <kjackal> Naz: ^
[09:09] <admcleod> Naz: you could also try debug-log without any switches, or all-machines.log on the controller
[09:12] <Naz> Yes, for example: id: 19       State: pending  10.187.111.207  juju-8aa58b-19  xenial
[09:13] <Naz> Even If the ip address is allocated, I still cannot ssh it until it's started.. In fact:
[09:13] <Naz> juju ssh 19 ERROR retrieving SSH host keys for "19": keys not found
[09:13] <Naz> Hi Admcleod, let me try please, one sec
[09:14] <Naz> @Kjackal, I am working on local Cloud (LXD)
[09:16] <Naz> @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] <Naz> @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] <Zic> lazyPower: hi, respawning the cluster which had the race-condition on etcd unit, crossfingered \o/
[09:18] <kjackal> 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] <kjackal> Naz: you sill probably need something like sudo lxc list and sudo lxc exec -- /bin/sh (I hope)
[09:21] <Naz> @Kjackal, let me try it please :)
[09:25] <Naz> @Kjackal, HP:/var/log/lxd/juju-8aa58b-19$ ll  [09:25] <Naz> @Kjackal, $more lxc.log [09:26] <kjackal> Naz: so you see the container in lxc list?
[09:27] <Naz> @kjackal, yes, I see it in lxc list
[09:27] <kjackal> can you get a shell inside the container?
[09:28] <kjackal> Naz: something like lxc execute juju-8aa58b-19 -- /bin/sh (I hope)
[09:29] <Naz> @kjackal: last line is [09:29] <Naz> $ lxc execute juju-8aa58b-19 -- /bin/sh ---> Usage: lxc <command> [options]  [09:30] <Naz> ok
[09:30] <kjackal> Naz: lxc exec  juju-8aa58b-19 -- /bin/bash
[09:30] <Naz> it should be lxc-execute
[09:31] <Naz> $ 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] <kjackal> can you please try lxc exec ?
[09:31] <Naz> Yes, :) lxc exec  juju-8aa58b-19 -- /bin/bash [09:33] <Naz> I got the shell inside the machine although its pending !, now what? :)
[09:34] <kjackal> Naz: is there anything interesting under /var/logs?
[09:34] <kjackal> do you have network interfaces up?
[09:36] <Naz> @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] <kjackal> :)
[09:41] <Naz> @Admcleod, I didnt find all-machines.log neither of the host nor on the controller: [09:41] <Naz> Thank you Kjackal and Thank you Admcleod.
[16:09] <erik_lonroth> 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] <erik_lonroth> tuck" situation so I don't end up in a debug cycle that takes forever?
[17:16] <Budgie^Smore> o/ juju world
[17:28] <Catalys> Does the charm of openstack-base support configurating the root password injection too?
[17:36] <Budgie^Smore> Catalys for the underlying system? or for the UI?
[17:36] <Budgie^Smore> OpenStack UI*
[17:54] <Catalys> 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] <Catalys> Budgie^Smore That said the dashboard says it has it on by default though.
[17:56] <Budgie^Smore> 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] <Catalys> 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] <Catalys> Budgie^Smore Normally I would run "juju config compute-nova" to change a setting though.
[18:00] <Catalys> https://docs.openstack.org/admin-guide/compute-admin-password-injection.html
[18:04] <Budgie^Smore> Catalys ah yes
[18:04] <Budgie^Smore> Catalys been a long time since I cared about passwords like that :)
[18:08] <Catalys> 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] <Catalys> 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] <Budgie^Smore> 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] <Catalys> Budgie^Smore Do you mean turn off the retrieve password option or injection :)?
[18:15] <Budgie^Smore> 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] <Catalys> 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] <Catalys> Budgie^Smore That said there is cloud-init though.
[18:17] <Budgie^Smore> 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
[19:09] <Catalys> 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] <Catalys> Budgie^Smore It gets a IP from the DHCP server, feel free to jump in if you've got an idea though.