newton/trusty lxc package install failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Undecided
|
Jesse Pretorius |
Bug Description
Today when testing an installation with the current head of stable/newton I hit the following failure:
failed: [rantdsp-65-e84d] (item=[u'apparmor', u'apparmor-utils', u'bridge-utils', u'cgmanager', u'cgroup-lite', u'debootstrap', u'dnsmasq', u'git', u'irqbalance', u'language-
{"cache_
Trying it manually got me:
# /usr/bin/apt-get -y -o \"Dpkg:
-t 'trusty-backports'
Reading package lists... Done
Building dependency tree
Reading state information... Done
lxc is already the newest version.
lxc-templates is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up lxc1 (2.0.8-
start: Job failed to start
invoke-rc.d: initscript lxc-net, action "start" failed.
No apport report written because the error message indicates its a followup error from a previous failure.
tes its a followup error from a previous failure.
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of lxc-templates:
lxc-templates depends on lxc1 (= 2.0.8-0ubuntu1~
Package lxc1 is not configured yet.
dpkg: error processing package lxc-templates (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lxc:
lxc depends on lxc1 (>= 2.0.8-0ubuntu1~
Package lxc1 is not configured yet.
dpkg: error processing package lxc (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
lxc1
lxc-templates
lxc
E: Sub-process /usr/bin/dpkg returned an error code (1)
# apt-cache policy lxc
lxc:
Installed: 2.0.8-0ubuntu1~
Candidate: 2.0.8-0ubuntu1~
Version table:
*** 2.0.8-0ubuntu1~
100 http://
100 /var/lib/
2.
500 http://
1.
500 http://
500 http://
1.0.3-0ubuntu3 0
500 http://
from /var/log/
Start-Date: 2017-08-16 12:30:55
Commandline: /usr/bin/apt-get -y -o Dpkg::Options:
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2017-08-16 12:30:56
from /var/log/
dnsmasq: failed to create listening socket for 10.0.3.1: Address already in use
Failed to setup lxc-net.
Failed to setup lxc-net.
lxc-net isn't running
I tried doing the following and the install worked as expected:
echo manual > /etc/init/
Then I realised that dnsmasq should not actually be running in the first place. It's used by neutron and LXC but they both start it up in their own way, so there should be no need for dnsmasq to be running on its own.
I confirmed that it was running:
# ps -ef | grep dns
dnsmasq 1754 1 0 13:02 ? 00:00:00 /usr/sbin/dnsmasq -x /var/run/
g-dist,
Then removed the lxc-net override and put a dnsmasq override in place instead:
# rm -f /etc/init/
# echo manual > /etc/init/
# apt-get purge -y lxc* dnsmasq
# apt-get autoremove -y
I then re-installed LXC again and it worked as expected. Except this time lxc-net had started a dnsmasq instance of its own, which is looks more correct.
# ps -ef | grep dns
lxc-dns+ 18396 1 0 13:22 ? 00:00:00 dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=
-dhcp-range 10.0.3.2,10.0.3.254 --dhcp-
es --dhcp-
I think what needs to happen is that the package dnsmasq (which contains the upstart/systemd init scripts and config as a forwarder) should be removed or replaced with just 'dnsmasq-base' for Ubuntu (which only has the required binaries). This will resolve the conflict between the services and allow the package to install without further workarounds/masks.
It may also make sense to revisit our masking of lxc-net and all the tasks/config associated to see if we can't simplify it to use the service as packaged.
Changed in openstack-ansible: | |
assignee: | nobody → Jesse Pretorius (jesse-pretorius) |
status: | New → In Progress |
Patch in progress: https:/ /review. openstack. org/494212