conjure-up / conjure-up

Deploying complex solutions, magically.
https://conjure-up.io
MIT License
452 stars 73 forks source link

Retry creating LXD conjureup network bridges #998

Closed adam-stokes closed 7 years ago

adam-stokes commented 7 years ago

https://sentry.io/canonical-pj/conjure-up/issues/296744258/

Exception: Failed to create LXD conjureup1 network bridge: error: Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.pid --except-interface=lo --interface=conjureup1 --listen-address=10.85.243.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.leases --dhcp-hostsfile=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.hosts --dhcp-range 10.85.243.2,10.85.243.254,1h -s lxd -S /lxd/ -u lxd: dnsmasq: failed to create listening socket for 10.85.243.1: Address already in use

(21 additional frame(s) were not displayed)
...
  File "conjureup/controllers/credentials/common.py", line 21, in finish
    controllers.use('lxdsetup').render()
  File "conjureup/controllers/lxdsetup/gui.py", line 11, in render
    return self.setup(self.ifaces[0])
  File "conjureup/controllers/lxdsetup/common.py", line 70, in setup
    self.lxd_init(iface)
  File "conjureup/controllers/lxdsetup/common.py", line 94, in lxd_init
    cmd()
  File "conjureup/controllers/lxdsetup/common.py", line 211, in setup_bridge_network
    "{}".format(out.stderr.decode()))

Exception: Failed to create LXD conjureup1 network bridge: error: Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.pid --except-interface=lo --interface=conjureup1 --listen-address=10.85.243.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.leases --dhcp-hostsfile=/var/snap/conjure-up/common/lxd/networks/conjureup1/dnsmasq.hosts --dhcp-range 10.85.243.2,10.85.243.254,1h -s lxd -S /lxd/ -u lxd: dnsmasq: failed to create listening socket for 10.85.243.1: Address already in use
adam-stokes commented 7 years ago

Investigate implementing retries for lxc network creation

RainingNight commented 7 years ago

+1

adam-stokes commented 7 years ago

Addressed in edge channel