unit ids should be unique

Bug #1174610 reported by Kapil Thangavelu
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Medium
Matthew Williams

Bug Description

juju deploy precise/varnish lb
juju destroy-service lb
juju deploy precise/haproxy lb

the unit id lb/0 is now pointing to something completely different. prior versions of juju.. the new haproxy unit would be lb/1.

Related branches

Revision history for this message
William Reade (fwereade) wrote :

Hmm... I'm not so sure. I think it's important to be able to distinguish between "lb/0" and "lb/0", in the same way it's important to distinguish between "lb" and "lb". Would it be sufficient to add and expose really-unique integer ids per lacking entity? We hope to be able to fix that once we have the API dealt with.

Ofc, it wouldn't be hard to change the unit id sequence, but I need a bit more convincing. It feels inconsistent; and I'd rather not devote time to it if it'll be adequately addressed by other work anyway.

Changed in juju-core:
status: New → Opinion
status: Opinion → Incomplete
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

First fwiw, this is backwards compatibility problem issue. Second, its quite common to associate resources/data to a unit using the unit *id* as both a semantic and unique reference to that allocation. For example associating logging and metric data in an aggregator and visualizer to a unit, ie. like some of our existing monitoring and logging charms. With this change, we're saying that such data would need to be deleted after a relation is broken or that it could be mistakenly associated to a different instance of the same unit id, neither of which is desirable. I don't think exposing another primary key field is particularly helpful, because at this level the semantic value of the unit id is important for human interpretation/correlation of the data, plus an additional primary key would break existing charms that rely on this behavior.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju-core because there has been no activity for 60 days.]

Changed in juju-core:
status: Incomplete → Expired
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

I'm resurrecting this, because its extremely common as a charm author to use a remote unit id as identifier to a locally allocated resource. The lack of uniqueness there is a significant problem, a regression, and cause breakage for extant charms.

Changed in juju-core:
status: Expired → New
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
Curtis Hovey (sinzui)
tags: added: regression
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.18.0
Changed in juju-core:
assignee: nobody → Dimiter Naydenov (dimitern)
status: Triaged → In Progress
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

It can't land until we have 1.16 clients, that access state directly, we need to care about. So postponed until 1.20.

Changed in juju-core:
status: In Progress → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

Curtis marked this one as Regression, but it doesn't quite make sense since we can't actually land this in 1.18, so I'm removing the regression tag.

Changed in juju-core:
milestone: 1.18.0 → 2.0
tags: removed: regression
Revision history for this message
John A Meinel (jameinel) wrote :

Ah, I see. This is a regression relative to python-juju, not to an earlier version of juju-core, so it isn't quite "regression" for what I think we were using it as (stuff that blocks the next release)

Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1174610] Re: unit ids should be unique

its more than just a regression issue, its a loss of identity across
relations which can lead to data loss and corruption. lots of charms use
related unit id for uniquely characterizing data from a remote system.

On Wed, Feb 26, 2014 at 5:46 AM, John A Meinel <email address hidden>wrote:

> Ah, I see. This is a regression relative to python-juju, not to an
> earlier version of juju-core, so it isn't quite "regression" for what I
> think we were using it as (stuff that blocks the next release)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1174610
>
> Title:
> unit ids should be unique
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1174610/+subscriptions
>

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

I agree that it is an important bug, but we are no worse in 1.18 vs 1.16 so
we don't need to block releasing 1.18 on fixing the bug.

John
=:->
On Feb 26, 2014 1:51 PM, "Kapil Thangavelu" <email address hidden>
wrote:

> its more than just a regression issue, its a loss of identity across
> relations which can lead to data loss and corruption. lots of charms use
> related unit id for uniquely characterizing data from a remote system.
>
>
> On Wed, Feb 26, 2014 at 5:46 AM, John A Meinel <<email address hidden>
> >wrote:
>
> > Ah, I see. This is a regression relative to python-juju, not to an
> > earlier version of juju-core, so it isn't quite "regression" for what I
> > think we were using it as (stuff that blocks the next release)
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1174610
> >
> > Title:
> > unit ids should be unique
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/juju-core/+bug/1174610/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1174610
>
> Title:
> unit ids should be unique
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1174610/+subscriptions
>

John A Meinel (jameinel)
Changed in juju-core:
assignee: Dimiter Naydenov (dimitern) → nobody
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → next-stable
tags: added: reliability
Ian Booth (wallyworld)
tags: added: 14.10
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
milestone: next-stable → none
Revision history for this message
Matthew Williams (mattyw) wrote :

Just landed a fix for this bug http://reviews.vapour.ws/r/1425/

Changed in juju-core:
status: Triaged → Fix Committed
milestone: none → 1.25.0
assignee: nobody → Matthew Williams (mattyw)
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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