Dan Kenigsberg has uploaded a new change for review.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
remove stale libvirtNet before creating a new net with same name
Vdsm is the owner of vdsm-bla networks. If for some reasons (such as vdsm being kill just after defining a libvirt network) we find a stale definition of the network, Vdsm should override it.
Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M vdsm/configNetwork.py 1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/4370/1 -- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm/configNetwork.py Line 662: removeLibvirtNetwork(network, log=False) Dan, correct me if I am wrong, but if you want to overwrite defined libvirt network here it maybe too late. Look at _addNetworkValidation in addNetwork. You have there: if bridge in _netinfo.networks: raise ConfigNetworkError(ne.ERR_USED_BRIDGE, "Bridge already exists")
When _netinfo.networks you take from libvirt. It means you will fail here before you reach createLibvirtNetwork().
Am I missing something?
Line 676: logging.debug('failed to remove libvirt network ' + netName, c'mon man, what about %s ?
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Avi Tal has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 1: Fails
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File vdsm/configNetwork.py Line 662: removeLibvirtNetwork(network, log=False) I do not see a problem here. If we report that network as existing, we should not allow creating it.
Line 676: logging.debug('failed to remove libvirt network ' + netName, Done
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Avi Tal has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 2: Verified
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
Patch Set 2: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: remove stale libvirtNet before creating a new net with same name ......................................................................
remove stale libvirtNet before creating a new net with same name
Vdsm is the owner of vdsm-bla networks. If for some reasons (such as vdsm being kill just after defining a libvirt network) we find a stale definition of the network, Vdsm should override it.
v2: check if net is active/persistent before destroy/undefine to avoid silly libvirt exceptions.
Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M vdsm/configNetwork.py 1 file changed, 9 insertions(+), 4 deletions(-)
Approvals: Saggi Mizrahi: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Avi Tal: Verified Igor Lvovsky: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/4370 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I6c25064ece089b0b5cdbad3c8789ec964c7b8752 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Avi Tal atal@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
vdsm-patches@lists.fedorahosted.org