Juju doesn't detect lxd container IP address changes

Bug #1575764 reported by Dan Watkins
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fix Committed

Bug Description

After doing a deploy using the lxd backend, I modified the lxd bridge configuration to change the DHCP range allowed. This lead to some containers re-DHCP'ing and getting new IP addresses.

However, `juju status` continued to show the old IP address both for the machine and the service (meaning that I could no longer access the service using the new IP address).

Revision history for this message
John A Meinel (jameinel) wrote :

I believe if you bounce the Juju agents, we'll redetect the IP addresses and update our settings. We don't currently update IP addresses periodically, but we do notice on startup.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.0-beta7
tags: added: juju-release-support lxd-provider
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta7 → 2.0-beta8
Changed in juju-core:
milestone: 2.0-beta8 → 2.0-rc1
Changed in juju-core:
milestone: 2.0-rc1 → 2.0.0
Changed in juju-core:
milestone: 2.0.0 → 2.1.0
affects: juju-core → juju
Changed in juju:
milestone: 2.1.0 → none
milestone: none → 2.1.0
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Removing 2.1 milestone as we will not be addressing this issue in 2.1.

Changed in juju:
milestone: 2.1.0 → none
Revision history for this message
Drew Freiberger (afreiberger) wrote :

In relation to this issue, I think there's a wider implication of issues in charm relations if units get an IP address change either by OP's lxd bridge IP change or by DHCP renewal gaining a different IP address.

What does juju provide to a charm author that would allow for relation ips to be updated? I'm wondering if on unit startup if *-relation-changed should be called on all relations. Unfortunately, I think there are some edge cases where one might set an ip in the relation data only on relation-joined and not on relation-changed.

Consider the above in context of the cinder-ceph relation to ceph-mon/ceph or nova-compute relation to ceph-mon/ceph where ceph-mon provides it's IPs in private-address to the consumer services and if a ceph-mon had an address change, juju might be able to connect to the new IP by virtue of restarting the jujud-unit agent, but the relation-data may be stale if the address changed.

I read through the juju documentation on hooks and lifecycle and seems that start, config-changed, and update-status are called on unit startup, but nothing in regards to relations.

tags: added: canonical-bootstack
Revision history for this message
Joseph Phillips (manadart) wrote :

This has been fixed since.

Changed in juju:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers