Lost Unit when specifying constraints incorrectly

Bug #1545713 reported by Tom Barber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth
2.1
Fix Released
High
Ian Booth

Bug Description

This may be a bug or it may just be me being dumb, but I can't remove my unit, so I'm gonna log it anyway.

Running latest trunk:

juju deploy mysql --constraints="instance-type=m4.large,root-disk=250G"

I ran that, which is incorrect as I didn't know if constraints were comma delimited or just have a space. Well now I know because I have a stuck unit:

ID

                                    WORKLOAD-STATE AGENT-STATE VERSION MACHINE PORTS PUBLIC-ADDRESS MESSAGE
mysql/1

                                    error lost cannot assign unit "mysql/1" to machine: cannot assign unit "mysql/1" to new machine or container: cannot assign unit "mysql/1" to new ma
chine: invalid constraint value: instance-type=m4.large,root-disk=250G
valid values are: [m1.small m1.medium m1.large m1.xlarge m4.large m4.xlarge m4.2xlarge m4.4xlarge m4.10xlarge m3.medium m3.large m3.xlarge m3.2xlarge c1.medium c1.xlarge cc2.8xlarge c3.large c3.xlarge c3.2xlarge c3.4xlarge c3.8xlarge cg1
.4xlarge g2.2xlarge m2.xlarge m2.2xlarge m2.4xlarge cr1.8xlarge r3.large r3.xlarge r3.2xlarge r3.4xlarge r3.8xlarge hi1.4xlarge i2.xlarge i2.2xlarge i2.4xlarge i2.8xlarge hs1.8xlarge t1.micro t2.micro t2.small t2.medium c4.large c4.xlarg
e c4.2xlarge c4.4xlarge c4.8xlarge]

So, it correctly realised I specified an instance type that makes no sense, but instead of failing, I can't remove it:

juju destroy-unit mysql/1

does nothing,

juju destroy-service mysql

similarly just leaves my "lost" agent hanging in my status.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Cheryl Jennings (cherylj) wrote :

I see the same thing, and this seems to be a regression from 1.25 behavior as we get further along in deploying the unit before erroring out.

Deploy from 1.25:
$ juju deploy mysql --constraints="instance-type=m4.large,root-disk=250G"
Added charm "cs:trusty/mysql-34" to the environment.
ERROR invalid constraint value: instance-type=m4.large,root-disk=250G
valid values are: [ ... ]

Deploy from 2.0:
$ juju deploy mysql --constraints="instance-type=m4.large,root-disk=250G"
Added charm "cs:trusty/mysql-34" to the model.
Deploying charm "cs:trusty/mysql-34" with the charm series "trusty".

juju remove-service / remove-unit return with no errors, but the service / unit still exists (in a Dying state in the DB)

tags: added: destroy-service regression
tags: added: 2.0-count
affects: juju-core → juju
Changed in juju:
milestone: none → 2.1.0
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Fix for bug # 1654928, also fixes this issue.

Changed in juju:
status: Triaged → Fix Committed
assignee: nobody → Ian Booth (wallyworld)
milestone: 2.1.0 → 2.1-rc1
no longer affects: juju/2.2
Changed in juju:
milestone: 2.1-rc1 → 2.2.0-alpha1
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.

Other bug subscribers

Remote bug watches

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