juju fails when requesting an IP for a container when retrying after lxd forkstart

Bug #1670873 reported by Jason Hobbs
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.1
Fix Released
High
John A Meinel

Bug Description

juju is trying to start a container, hits a lxd forkstart error, then retries, but gets an error trying to reserve an IP for the container with MAAS, because it already reserved an IP before hitting the lxd forkstart error. This causes the container to end up without a MAAS allocated IP, which in 2.1.0 causes it to show up with a private LXD IP.

http://pastebin.ubuntu.com/24133363/

jam says this would result in an error/failed provisioning in 2.1.1, but that it still needs to be fixed to reuse the original IP address juju got from maas.

Here is the broader log: http://paste.ubuntu.com/24133373/

Here is juju status: http://paste.ubuntu.com/24133383/ - it's 3/lxd/1 with the problem.

This is with 2.1.0.1 controller.

Tags: oil oil-2.0
description: updated
description: updated
Revision history for this message
John A Meinel (jameinel) wrote :

I don't know that we'll actually try to fix this for 2.1, but it does seem like a small valid fix. We may punt and just roll it all into 2.2, but I'll fix it targeting 2.1 and we can decide whether its worth a release there.

Changed in juju:
assignee: nobody → John A Meinel (jameinel)
importance: Undecided → High
milestone: none → 2.2.0
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

As noted in bug #1671181 I think the ordering was:

Juju is trying to create a container, it talks to MAAS to register a new 'device' with its MAC address. It then goes to launch the container, and would get a failure from 'lxd forkstart' in this particular case.

It then set the container to failed provisioning, but was prepared to retry provisioning the container.

Juju then tried again to provision the container, and it would go to register the 'new' device with MAAS, but MAAS would return "Node with this Hostname already exists". (bug #1656326 meant that this error would get suppressed and then juju would fall back to using lxdbr0 and you would just end up with a container that would be on the wrong bridge.)

John A Meinel (jameinel)
summary: - juju requesting an IP for a container when retrying after lxd forkstart
+ juju fails when requesting an IP for a container when retrying after lxd
+ forkstart
Revision history for this message
John A Meinel (jameinel) wrote :

https://github.com/juju/juju/pull/7078 is a PR against 2.2 that should fix this bug.

The actual code changes were developed against the 2.1 branch, which means it should be possible to land it in 2.1 if we feel it is worthwhile.

Changed in juju:
status: Triaged → In Progress
Changed in juju:
milestone: 2.2-beta1 → 2.2-alpha1
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
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.