What is the default username/password of LXC instances (Ubuntu) deployed by Juju via MAAS?

Jeff McLamb mclamb at gmail.com
Tue Sep 22 15:08:03 UTC 2015


Hey Andrew -

Thanks for the info! Turns out editing the rootfs path worked, as you
suggested, as did lxc-attach (good to know).

I am back to normal operation now... I was just in a strange state this
past weekend where I had lost power to my MAAS and Juju
deployment/bootstrap nodes, so I couldn't do what I normally do, which is
'juju ssh ...'

Thanks,

Jeff

On Sat, Sep 19, 2015 at 9:47 PM, Andrew Wilkins <
andrew.wilkins at canonical.com> wrote:

> On Sun, Sep 20, 2015 at 12:17 AM Jeff McLamb <mclamb at gmail.com> wrote:
>
>> Hi all -
>>
>> I am currently in a situation where my juju deployment host and MAAS host
>> (thus DHCP/DNS) are down and I won’t be able to power them back on for a
>> few days.
>>
>> I have manually added entries to /etc/hosts on all of my bare metal
>> machines (so that OpenStack services can resolve names absent the DNS
>> server) but I cannot login to my LXC instances in order to modify
>> /etc/hosts.
>>
>> For whatever reason the keys aren’t in place to directly ssh into each
>> LXC instance from my bare-metal machines. The only option I have is to
>> lxc-console directly into each instance, where I am presented with a login
>> prompt.
>>
>
> You can use "lxc-attach" command to run arbitrary processes within the
> container, without the need for a login.
>
> Is there a default user/pass for these Ubuntu LXC instances deployed by
>> juju (via MAAS?) or some way to inject a file (e.g. replace/mod /etc/hosts)
>> into the container?
>>
>> It appears as though I could just modify
>> /var/lib/lxc/<container>/rootfs/etc/hosts directly, but that seems like it
>> might cause consistency issues? Or maybe doing that followed by an
>> `lxc-stop —name <container> -r` will reboot the container and it will Just
>> Work?
>>
>
> AFAIK editing the file via the rootfs path is fine, and you only need to
> restart the container if some application is caching the host resolution.
>
> FYI the LXC container, if provisioned by Juju, should have the public SSH
> keys of the user who bootstrapped. So you should be able to ssh to the LXC
> container from your client machine if you can ssh to the MAAS node.
>
> I'm not sure what versions of the juju CLI this is true for (definitely
> the most recent), but for a while now "juju ssh" will accept an IP address
> or hostname, and and attempt to ssh to it using a Juju server as a proxy.
> i.e.:
>     juju ssh 10.x.y.z
> will do something like
>     ssh -o ProxyCommand="juju ssh 0" 10.x.y.z
>
> HTH,
> Andrew
>
> Thanks,
>>
>> Jeff
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20150922/71704a3e/attachment.html>


More information about the Juju mailing list