Containers registered with MAAS use wrong name

Bug #1513165 reported by Cheryl Jennings
66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Tim Penhey
juju-core
Won't Fix
High
Unassigned
1.25
Won't Fix
High
Unassigned

Bug Description

With the "address-allocation" feature flag enabled, Juju will register LXC containers and KVM machines as devices on MAAS 1.8+.

However, the containers are registered with their juju-assigned machine name, rather than the hostname picked for the containers.

For example, containers will show up on MAAS as: machine-0-lxc-0.maas. But, the container has a hostname of: juju-machine-0-lxc-0, so it cannot resolve itself.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: sts
Changed in juju-core:
milestone: none → 2.0-beta1
Revision history for this message
Billy Olsen (billy-olsen) wrote :

In the latest 1.25.3 code, it appears that there is some integration to use the MAAS auto-naming in order to ensure there aren't namespace collisions across multiple juju environments sharing the same MAAS but the same problem such as resolving itself continues to exist.

An example from running code from trunk, my container in MAAS is called stupendous-banana-juju-machine-1-lxc-0.seg but the container within juju is named juju-machine-1-lxc-0.

Revision history for this message
Leonardo Borda (lborda) wrote :

Ideally we should be able to define a hostname at the device level and use it through out all the layers.

The use case is that one wants to deploy its lxc machines and then name them after the service it's providing (eg. rabbit-mq-ha01) so they can easily track and see their logs through a central log server.
Currently it's pretty hard to identify that server name machine-0-lxc-0.maas has rabbit-mq running on it.

tags: added: sts-needs-review
Changed in juju-core:
assignee: nobody → Jorge Niedbalski (niedbalski)
assignee: Jorge Niedbalski (niedbalski) → nobody
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta1 → 2.0-beta2
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta2 → 2.0-beta3
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta3 → 2.0-beta4
Changed in juju-core:
milestone: 2.0-beta4 → 2.0.1
Revision history for this message
Leonardo Borda (lborda) wrote :

The fact that the lxc machines don't have a hostname set properly in /etc/hosts affects keepalived service

Changed in juju-core:
milestone: 2.0.1 → 2.0-rc1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta5 → 2.0-rc1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta6 → 2.0-beta7
Changed in juju-core:
assignee: nobody → Dimiter Naydenov (dimitern)
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta7 → 2.0-beta8
Revision history for this message
Tim Penhey (thumper) wrote :

Oh... Kay... been looking at this and I have found the root cause, and what needs to be done to remedy it.

Fundamentally, the provider is not passing the hostname of the container down to MAAS for MAAS to be able to set the DNS records. The problem here is that the hostname is not known at the site that needs to pass it down to MAAS.

What needs to happen is the following:
 * the container Manager interface needs to gain a method that will return the Hostname given a machine id.
 * the provisioner code then needs to call this, and pass the hostname into the prepareOrGetContainerInterfaceInfo function. This function needs to pass the hostname through to the apiserver PrepareContainerInterfaceInfo method.
 * this then needs to pass it through to the environs interface method that the providers support
 * the maas provider needs to then pass the hostname through to the device creation call.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

Note: This is easily reproducible by deploying rabbitmq-server into a container. RabbitMQ is hyper-sensitive to a/ptr record sanity. If it can't resolve forward and reverse, it fails installation on the package level. That'll be a simple way to know when this is resolved, as an indicator that name resolution is sane again.

Tim Penhey (thumper)
Changed in juju-core:
assignee: Dimiter Naydenov (dimitern) → Tim Penhey (thumper)
status: Triaged → In Progress
Chris Gregan (cgregan)
tags: added: cdo-qa-blocker
Tim Penhey (thumper)
Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
John George (jog) wrote :

Can this bug be made critical or raise up in the work queue? As Ryan points out above, RabbitMQ fails to install, which blocks deployment of important workload bundles such as Openstack.

Revision history for this message
Bert JW Regeer (bertjwregeer) wrote : Re: [Bug 1513165] Re: Containers registered with MAAS use wrong name

The rabbitmq charm has been updated because on MaaS 2.0 the containers have two PTR records and was causing even more issues.

I believe it also fixes it for this bug. I don't have a bug number handy.

Bert

> On May 31, 2016, at 13:26, John George <email address hidden> wrote:
>
> Can this bug be made critical or raise up in the work queue? As Ryan
> points out above, RabbitMQ fails to install, which blocks deployment of
> important workload bundles such as Openstack.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1513165
>
> Title:
> Containers registered with MAAS use wrong name
>
> Status in juju-core:
> Fix Committed
> Status in juju-core 1.25 series:
> Triaged
>
> Bug description:
> With the "address-allocation" feature flag enabled, Juju will register
> LXC containers and KVM machines as devices on MAAS 1.8+.
>
> However, the containers are registered with their juju-assigned
> machine name, rather than the hostname picked for the containers.
>
> For example, containers will show up on MAAS as:
> machine-0-lxc-0.maas. But, the container has a hostname of: juju-
> machine-0-lxc-0, so it cannot resolve itself.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1513165/+subscriptions

Revision history for this message
Andrew McDermott (frobware) wrote :
Revision history for this message
Bert JW Regeer (bertjwregeer) wrote :

I was referring to this bug report: https://bugs.launchpad.net/charms/+source/rabbitmq-server/+bug/1584902 which fixes the bug in the RabbitMQ charm. This should fix the issue that Ryan pointed out.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Related bug 1593185 (misconfigured hostname/FQDN but on the lxd-provider, likely also in general).

affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta8 → none
milestone: none → 2.0-beta8
Changed in juju-core:
importance: Undecided → High
status: New → Triaged
Changed in juju-core:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.