Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 595323 - Can't change dhcp settings of network without stopping network.
Can't change dhcp settings of network without stopping network.
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-24 07:34 EDT by Neil Wilson
Modified: 2015-03-16 11:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-16 11:18:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Neil Wilson 2010-05-24 07:34:01 EDT
Description of problem:

Doesn't appear to be a way of changing/augmenting the dhcp section of a network without stopping and restarting the network (and thereby interrupting network connectivity for all currently running VMs).


Version-Release number of selected component (if applicable): all


How reproducible:

Add additional 'host' elements to dhcp section within network, or extend the range. It should then be possible to 'restart' the dhcp system without interrupting the network for existing clients.

Additional info:

This is probably a design issue and suggests that the close coupling of the dhcp service with the network probably needs looking at.
Comment 1 Ján Tomko 2015-03-16 11:18:57 EDT
The virNetworkUpdate API allows changing the dhcp hosts now:
commit fe7872827f0451fcc8f6618269f5ed13a2feeb67
Author:     Laine Stump <laine@laine.org>
AuthorDate: 2012-09-19 07:38:43 -0400
Commit:     Laine Stump <laine@laine.org>
CommitDate: 2012-09-20 22:20:22 -0400

    virsh: new net-update command
    
    This command uses the new virNetworkUpdate() API to modify an existing
    network definition, and optionally have those modifications take
    effect immediately without restarting the network.
    
    An example usage:
    
      virsh net-update mynet add-last ip-dhcp-host \
       "<host mac='00:11:22:33:44:55' ip='192.168.122.45'/>" \
       --live --config
    
    If you like, you can instead put the xml into a file, and call like
    this:
    
      virsh net-update mynet add ip-dhcp-host /tmp/myxml.xml
       --live --config
    
    virsh will autodetect whether the argument is itself an xml element,
    or if it's a file, by looking at the first character - the first
    character of an xml element is always "<", and the first character of
    a file is almost always *not* "<" (in the rare case that it is, the
    user could specify "./<filename...").
    
    A --parent-index option is also available (to give the index within a
    list of parent objects, e.g. the index of the parent <ip> element when
    updating ip-dhcp-host elements), but is optional and at least for now
    will probably be used rarely.
    
    --live, --config, and --current options - if you specify --live, only
    the live state of the network will be updated. If you also specify
    --config, then the persistent configuration will also be updated;
    these two commands can be given separately, or both together. If you
    don't specify either (you can optionally specify "--current" for the
    same effect), then the "current" config will be updated (i.e. if the
    network is active, then only its live config is affected, but if the
    network is inactive, only the persistent config is affected).

git describe: v0.10.2-rc1-38-gfe78728 contains: v0.10.2-rc2~3

And the dhcp range as well:

commit 1100f61074b9024fbbc5fb548392fbc99e9e5ca4
Author:     Laine Stump <laine@laine.org>
AuthorDate: 2012-09-20 22:25:40 -0400
Commit:     Daniel Veillard <veillard@redhat.com>
CommitDate: 2012-09-21 11:54:16 +0800

    network: backend for virNetworkUpdate of dhcp range
    
    The dhcp range element is contained in the <dhcp> element of one of a
    network's <ip> elements. There can be multiple <range>
    elements. Because there are only two attributes (start and end), and
    those are exactly what you would use to identify a particular range,
    it doesn't really make sense to modify an existing element, so
    VIR_NETWORK_UPDATE_COMMAND_MODIFY isn't supported for this section,
    only ADD_FIRST, ADD_LAST, and DELETE.
    
    Since virsh already has support for understanding all the defined
    sections, this new backend is automatically supported by virsh. You
    would use it like this:
    
      virsh net-update mynet add ip-dhcp-range \
            "<range start='1.2.3.4' end='1.2.3.20'/>" --live --config
    
    The bridge driver also already supports all sections, so it's doing
    the correct thing in this case as well - since the dhcp range is
    placed on the dnsmasq commandline, the bridge driver recreates the
    dnsmasq commandline, and re-runs dnsmasq whenever a range is
    added/deleted (and AFFECT_LIVE is specified in the flags).

git describe: v0.10.2-rc1-39-g1100f61 contains: v0.10.2-rc2~2

Note You need to log in before you can comment on or make changes to this bug.