Race conditions may happen

Bug #1525792 reported by Lei Wang
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-deployer
Incomplete
Low
Unassigned

Bug Description

While using juju-deployer to deploy an environment with yaml file, and put openstack services into the containers. Chances are that some of the containers may not be able to created due to the race conditions.

$ juju status
"24":
    agent-state: started
    agent-version: 1.26-alpha2
    dns-name: computron.maas
    instance-id: /MAAS/api/1.0/nodes/node-cc90fd10-94aa-11e5-9b5b-525400355405/
    series: wily
    containers:
      24/lxc/0:
        agent-state: error
        agent-state-info: 'failed to retrieve the template to clone: template container
          "juju-wily-lxc-template" did not stop'
        instance-id: pending
        series: wily
      24/lxc/1:
        agent-state: error
        agent-state-info: lxc container cloning failed
        instance-id: pending
        series: wily
      24/lxc/2:
        agent-state: error
        agent-state-info: lxc container cloning failed
        instance-id: pending
        series: wily
      24/lxc/3:
        agent-state: error
        agent-state-info: lxc container cloning failed
        instance-id: pending
        series: wily
      24/lxc/4:
        agent-state: error
        agent-state-info: lxc container cloning failed
        instance-id: pending
        series: wily
      24/lxc/5:
        agent-state: error
        agent-state-info: lxc container cloning failed
        instance-id: pending
        series: wily
      24/lxc/6:
        agent-state: started
        agent-version: 1.26-alpha2
        dns-name: 10.231.64.170
        instance-id: juju-machine-24-lxc-6
        series: wily
        hardware: arch=amd64
      24/lxc/7:
        agent-state: started
        agent-version: 1.26-alpha2
        dns-name: 10.231.64.84
        instance-id: juju-machine-24-lxc-7
        series: wily
        hardware: arch=amd64
....

ubuntu@computron:~$ sudo lxc-ls
juju-machine-24-lxc-6 juju-machine-24-lxc-7 juju-wily-lxc-template

ubuntu@computron:~$ sudo lxc-info --name juju-wily-lxc-template
Name: juju-wily-lxc-template
State: STOPPED

ubuntu@computron:~$ sudo lxc-info --name juju-machine-24-lxc-7
Name: juju-machine-24-lxc-7
State: RUNNING
PID: 20357
IP: 10.0.3.1
IP: 10.231.64.84
CPU use: 54.91 seconds
BlkIO use: 16.00 KiB
Memory use: 616.50 MiB
KMem use: 0 bytes
Link: veth1TOM1S
 TX bytes: 2.57 MiB
 RX bytes: 85.18 MiB
 Total bytes: 87.76 MiB

ubuntu@computron:~$ sudo lxc-clone juju-wily-lxc-template test
locale: Cannot set LC_ALL to default locale: No such file or directory
Created container test as copy of juju-wily-lxc-template

ubuntu@computron:~$ sudo lxc-ls
juju-machine-24-lxc-6 juju-machine-24-lxc-7 juju-wily-lxc-template test

ubuntu@computron:~$ sudo lxc-info --name test
Name: test
State: STOPPED

ubuntu@computron:~$ sudo lxc-start --name test

ubuntu@computron:~$ sudo lxc-info --name test
Name: test
State: RUNNING
PID: 74124
IP: 10.231.64.172
CPU use: 0.60 seconds
BlkIO use: 424.00 KiB
Memory use: 30.33 MiB
KMem use: 0 bytes
Link: veth3U8J1J
 TX bytes: 1.33 KiB
 RX bytes: 2.50 KiB
 Total bytes: 3.84 KiB

In that case, I can clone the template manually, but juju-deployer fail to create because of the template is not stopped, so I guess there might be race condition in this situation

Tags: cpe-onsite
Lei Wang (raywang)
description: updated
tags: added: cpec
Revision history for this message
Ante Karamatić (ivoks) wrote :

I don't think this is an issue anymore with lxd. Marking as Incomplete, but reopen if you think this is still the case.

tags: added: cpe-onsite
removed: cpec
Changed in juju-deployer:
status: New → Incomplete
Tom Haddon (mthaddon)
Changed in juju-deployer:
importance: Undecided → Low
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.