juju userdata should not restart networking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned | ||
juju-core |
Fix Released
|
High
|
Andrew Wilkins | ||
dbus (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
juju-core (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Saucy |
Won't Fix
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
juju fails to deploy charms on Saucy.
[Steps to Reproduce]
On Saucy:
root@foo:~# dpkg-query -W dbus
dbus 1.6.12-0ubuntu10
root@foo:~# status dbus
dbus start/running, process 817
root@foo:~# service networking restart
networking stop/waiting
networking start/running
root@foo:~# status dbus
dbus stop/waiting
Verified on amd64. I believe this also affects armhf.
[Analysis]
Either:
1) dbus shouldn't fail when networking is restarted; or
2) juju should not restart networking in this way as a runcmd in cloud-init userdata, and then expect dbus to work.
The relevant part of juju's userdata is:
- "cat > /etc/network/
br0 inet dhcp\n bridge_ports eth0\nEOF\n"
- sed -i "s/iface eth0 inet dhcp/source \/etc\/
- service networking restart
I assume juju is restarting networking to set up the bridge that it configured; in this case, an "ifdown eth0" and a subsequent "ifup"s as required should suffice. No need to restart everything (eg. lo, etc) which I [rbasak] presume is causing the issue.
Note that dbus appears to silently fail; if it is going to stop, it should do so with a sensible log message.
[Original Description]
I'm running a MAAS and Juju enviornment using 64-bit Ubuntu Server 13.10 for the MAAS node as well as all juju nodes, including the bootstrap node.
I can't seem to deploy any charms to the nodes without the services getting stuck in a 'pending' state. The problem seems to be that upon charm deployment dbus for some reason is stopped, and thus the whole process of deploying the charm gets stuck.
It is almost verbatim of the problem someone appears to have hit on raring, too:
For me, however, it's not just mysql...it's any service I try to deploy.
juju release: 1.16.2-
maas version: 1.4+bzr1693+dfsg-0
Ubuntu OS: 13.10, 64-bit for everything
Steps to reproduce:
1) Set up a maas server using 13.10 with all the latest updates.
2) Install juju-core from the stable ppa (1.16.2 in this case).
3) Enlist and commission some nodes.
4) download some charms locally (I'm in a semi-restricted network environment, so, it's easier for me to pull down the charms locally). For example, bzr branch lp:charms/rabbitmq-server
5) bootstrap the juju environment. Due to restrictions in my network I have to use "juju bootstrap --upload-tools". Firewall blocks the ability to run "juju sync-tools" beforehand.
6) Once the environment is bootstrapped, try to deploy a charm. This is what I used:
juju deploy --repository=
Actual results:
Installation of the OS goes fine, along with the cloud-init after reboot. I can also ssh into the node via juju.
The charm, however, stays in a 'pending' state long after it is deployed on the server.
ssh-ing into the node and looking at /var/log/
This seems to prevent the charm from ever deploying.
Expected results:
OS installs and charm deploys without issue.
Workaround:
I can work around this by ssh-ing into the node and starting dbus by hand. I then go back and re-deploy the charm via juju using:
juju destroy-unit rabbitmq-server/0
juju destroy-service rabbitmq-server
juju deploy --to 1 --repository=
At that point everything starts working again. I can even deploy another charm onto the same machine without problems once dbus is up and going.
I'm not sure what or why dbus is failing to start and I can't tell if dbus was running and it suddenly shut down prior to charm deployment.
I've attached a machine log from an attempt to deploy rabbitmq-server onto a bare metal node using 13.10. The same thing happens to any charm I try to deploy in this manner.
Let me know if you need anything else.
Related branches
- Juju Engineering: Pending requested
-
Diff: 142 lines (+65/-12)5 files modifiedprovider/maas/environ.go (+21/-10)
provider/maas/environ_test.go (+15/-0)
provider/maas/export_test.go (+3/-2)
utils/apt.go (+10/-0)
utils/apt_test.go (+16/-0)
tags: | added: deploy maas-provider |
tags: | added: dbus |
summary: |
- Juju deploy of Charm in MAAS provider failing after successful - bootstrap. Juju status stuck in “Pending” state + Juju deploy of Charm in MAAS fails because dbus fails |
affects: | juju-core → lxc (Ubuntu) |
Changed in juju-core: | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
affects: | juju-core (Ubuntu) → maas |
Changed in maas: | |
status: | Confirmed → New |
Changed in juju-core (Ubuntu Trusty): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju-core (Ubuntu Saucy): | |
status: | New → Triaged |
importance: | Undecided → High |
no longer affects: | dbus (Ubuntu Saucy) |
no longer affects: | dbus (Ubuntu Trusty) |
tags: | added: ubuntu-openstack |
Changed in juju-core: | |
milestone: | none → 1.17.1 |
Changed in juju-core: | |
milestone: | 1.17.1 → 1.18.0 |
Changed in juju-core: | |
milestone: | 1.20.0 → 1.18.0 |
Changed in juju-core: | |
status: | Triaged → In Progress |
assignee: | nobody → Andrew Wilkins (axwalk) |
milestone: | 1.18.0 → 1.17.6 |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
I think this is really a maas + lxc bug. I need to look into this further to understand where the fix really needs to be made.