juju deploy tags are persistent accross juju deploys

Bug #1433336 reported by Dave Chiluk
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Medium
Unassigned

Bug Description

Testcase
Create a single machine in maas, and assign the tag "bootstrap" to it.
$ juju bootstrap --upload-tools --show-log --debug --constraints tags=bootstrap
$ juju deploy mysql
ubuntu@maas:~⟫ juju status
environment: maas
machines:
  "0":
    agent-state: started
    agent-version: 1.21.3.1
    dns-name: bootstrap01.maas
    instance-id: /MAAS/api/1.0/nodes/node-57b83994-ccce-11e4-aec3-52540027b454/
    series: trusty
    hardware: arch=amd64 cpu-cores=2 mem=2048M tags=virtual,bootstrap,bootstrap01
    state-server-member-status: has-vote
  "1":
    agent-state-info: 'cannot run instances: cannot run instances: gomaasapi: got
      error back from server: 409 CONFLICT (No available node matches constraints:
      tags=bootstrap zone=default)'
    instance-id: pending
    series: trusty
services:
  mysql:
    charm: cs:trusty/mysql-23
    exposed: false
    relations:
      cluster:
      - mysql
    units:
      mysql/0:
        agent-state: pending
        machine: "1"

Mysql fails to deploy because it can't find another node with the bootstrap tag.

Dave Chiluk (chiluk)
description: updated
description: updated
Revision history for this message
Dave Chiluk (chiluk) wrote :

Juju deployed from ppa:juju/stable
ii juju 1.21.3-0ubuntu1~14.04.1~juju1 all next generation service orchestration system
ii juju-core 1.21.3-0ubuntu1~14.04.1~juju1 amd64 Juju is devops distilled - client
ii juju-deployer 0.4.3-0ubuntu1~ubuntu14.04.1~ppa1 all Deploy complex stacks of services using Juju
ii python-jujuclient 0.50.1-2 amd64 Python API client for juju-core

Changed in juju-core:
milestone: none → 1.23
importance: Undecided → High
Revision history for this message
Ian Booth (wallyworld) wrote :

Hey Dave, what you are seeing is Juju working as designed:

when you specify constraints at bootstrap time, these become the default constraints to use (unless otherwise specified) for all subsequent machine deploys. These are called "environment constraints".

For MAAS, tags are most commonly used when choosing machines on which to deploy charms and thus apply for that service only. Or if a tag is used at bootstrap time, it will be used for a cluster of machines tagged as being available for that environment, so that subsequent deploys all use the same tag.

For your use case, that's not normally how MAAS would be set up - as stated above, a number of machines would be tagged. So what you would need to do after bootstrap is adjust the environment constraints:

juju set-constraints tags=

(I think the above works, never done it with empty tags before).

I think there's a usability issue here, rather than a bug as such. I'll re-triage to Medium.

Changed in juju-core:
importance: High → Medium
milestone: 1.23 → none
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
tags: added: sts
removed: cts
Changed in juju-core:
status: Triaged → Invalid
tags: removed: sts
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.