I have two machines in my MAAS environment

  • First one is Juju bootstrap machine, while second one is normal node.
  • Both of them are in running state.
  • I deployed mysql with "juju deploy mysql" and issue "juju status" command to find that a new machine had been added with instance-id=pending and series=trusty.
  • After few moments, that machine went into error state. Following is the output of my juju status command
    agent-state: started 
    agent-version: 1.20.11 
    dns-name: juju.maas 
    instance-id: /MAAS/api/1.0/nodes/node-84c0dada-6aa0-11e4-8b62-52540059ce08/ 
    series: trusty 
    hardware: arch=amd64 cpu-cores=1 mem=1024M tags=virtual 
    state-server-member-status: has-vote
    agent-state: started
    agent-version: 1.20.11
    dns-name: node0.maas 
    instance-id: /MAAS/api/1.0/nodes/node-796b82da-6aea-11e4-860c-52540059ce08/ 
    series: trusty 
    hardware: arch=amd64 cpu-cores=2 mem=2048M tags=virtual 
    agent-state-info: 'cannot run instances: gomaasapi: got error back from server: 
      409 CONFLICT (No matching node is available.)' 
    instance-id: pending 
    series: trusty 
    charm: cs:trusty/mysql-11 
    exposed: false 
      - mysql 
        agent-state: pending
        machine: "4"

My question: Why Juju creates new "machine"? What is the defination of "machine" here? Is it an LXC container?

NOTE: I setup my MAAS with VMs.


What is a machine in Juju?

What a machine is, is context-sensitive. A machine is an instance of the provider. If you're using digitalocean as your provider, a machine will be a digitalocean VPS. If you're using the local provider, it will be an LXC container. Or in your case, you're using MAAS as a provider, it is a MAAS machine (a VM in your case).

Why did juju create a new machine?

The default behaviour of deploy is to create a new machine for every unit it deploys. You can deploy a charm to a specific machine with juju deploy mysql --to 3. This will deploy the mysql charm to machine 3. More information on deploying charms to specific machines.

If you do not use the --to option, juju will ask a new machine from the provider, MAAS in your case. If the provider does not have any machines ready, it will give an error. This is the error you get. MAAS does not have any machines ready.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.