libvirt/src/network
Michael Chapman a6ec4f472d {domain, network}_conf: disable autostart when deleting config
Undefining a running, autostarted domain removes the autostart link, but
dom->autostart is not cleared. If the domain is subsequently redefined,
libvirt thinks it is already autostarted and will not create the link
even if requested:

  # virsh dominfo example | grep Autostart
  Autostart:      enable

  # ls /etc/libvirt/qemu/autostart/example.xml
  /etc/libvirt/qemu/autostart/example.xml

  # virsh undefine example
  Domain example has been undefined

  # virsh define example.xml
  Domain example defined from example.xml

  # virsh dominfo example | grep Autostart
  Autostart:      enable

  # virsh autostart example
  Domain example marked as autostarted

  # ls /etc/libvirt/qemu/autostart/example.xml
  ls: cannot access /etc/libvirt/qemu/autostart/example.xml: No such file or directory

This commit ensures dom->autostart is cleared whenever the config and
autostart link (if present) are removed.

The bridge network driver cleared this flag itself in networkUndefine.
This commit moves this into virNetworkDeleteConfig for symmetry with
virDomainDeleteConfig, and to ensure it is not missed in future network
drivers.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
2015-03-11 07:16:25 +01:00
..
bridge_driver_linux.c Remove unnecessary curly brackets in rest of src/[a-n]*/ 2014-11-14 17:13:36 +01:00
bridge_driver_nop.c Replace virNetworkObjPtr with virNetworkDefPtr in network platform APIs 2014-04-25 15:44:09 +01:00
bridge_driver_platform.c bridge driver: extract platform specifics 2013-08-01 15:47:02 -06:00
bridge_driver_platform.h bridge_driver: s/virNetworkObjList/virNetworkObjListPtr/ 2015-03-04 10:11:24 +01:00
bridge_driver.c {domain, network}_conf: disable autostart when deleting config 2015-03-11 07:16:25 +01:00
bridge_driver.h network: dnsmasq: Don't format lease file path 2014-12-03 14:22:40 +01:00
default.xml Remove the space before the slash in network XML 2013-08-28 08:05:46 +02:00
leaseshelper.c leaseshelper: Fix incorrect alignment of a switch case 2014-12-03 18:47:24 +01:00