service never comes up with kvm containers in maas

Bug #1292948 reported by Tycho Andersen
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Medium
Unassigned

Bug Description

When using kvm containers on a set of nodes with the maas provider, the service never comes up:

CloudFive:~/packages/cloud-installer/share [master]$ juju status
environment: maas
machines:
  "0":
    agent-state: started
    agent-version: 1.17.4
    dns-name: qch8n.master
    instance-id: /MAAS/api/1.0/nodes/node-795bd39a-a884-11e3-a07a-00ee4c62088d/
    series: precise
  "2":
    agent-state: started
    agent-version: 1.17.4
    dns-name: axeqd.master
    instance-id: /MAAS/api/1.0/nodes/node-54d62d30-a885-11e3-a07a-00ee4c62088d/
    series: precise
    containers:
      2/kvm/0:
        agent-state: started
        agent-version: 1.17.4
        dns-name: 10.0.100.143
        instance-id: juju-machine-2-kvm-0
        series: precise
        hardware: arch=amd64 cpu-cores=1 mem=512M root-disk=8192M
services:
  mysql:
    charm: cs:precise/mysql-36
    exposed: false
    relations:
      cluster:
      - mysql
    units:
      mysql/0:
        agent-state: pending
        agent-version: 1.17.4
        machine: 2/kvm/0
        public-address: 10.0.100.143

probably because of whatever this means in my unit-mysql-0.log: http://paste.ubuntu.com/7097163/

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: kvm maas-provider
tags: added: deploy
Changed in juju-core:
importance: High → Medium
Revision history for this message
Ian Booth (wallyworld) wrote :

The log files contain this error:

cannot get unit's private address: open /var/lib/juju/MAASmachine.txt: no such file or directory

The above file is created by cloud init when the node boostraps.

I believe there's the possibility that MAAS/Juju can be configured such that when Juju needs to create a new node on which to deploy a unit, it may acquire an existing node from a pool of those already running. In this case, because the node is not bootstrapped by Juju, no Juju cloud init scripts are run and hence the required MAASmachine.txt file is not created.

Can you please confirm if this is the case? Right now, there's no easy fix for this situation, other than having things configured such that nodes required by Juju are bootstrapped fresh rather than being pre-allocated and acquired.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

@wallyworld: based on that error message, it looks like the KVM instance thinks it's a MAAS node. It shouldn't be trying to read that file, because it's a provider-independent KVM instance.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

This bug was most likely caused by how we were obtaining addresses for units in 1.17.4. This has been significantly changed and rectified in more recent revisions.

The container instances would call through to the provider code despite being provider-independent. This was hacked around in the MAAS provider code for LXC, but not KVM:
    http://bazaar.launchpad.net/~go-bot/juju-core/trunk/view/2367/provider/maas/environprovider.go#L95

In 1.20 we no longer do things this way, so both LXC and KVM should just work on any provider. I don't recall exactly which release first had the changes; let me know if you need me to dig this out.

Changed in juju-core:
status: Triaged → Won't Fix
status: Won't Fix → Invalid
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.