Change in vdsm[master]: virt net: Disable special OVS handling for exteranal network
Dan Kenigsberg has posted comments on this change. Change subject: virt net: Disable special OVS handling for exteranal network .. Patch Set 1: Code-Review-1 (1 comment) https://gerrit.ovirt.org/#/c/63621/1/vdsm/virt/vm_migrate_hook.py File vdsm/virt/vm_migrate_hook.py: Line 85: def _set_bridge_interfaces(devices, target_vm_conf): Line 86: target_vm_nets_by_vnic_mac = {dev['macAddr']: dev['network'] Line 87: for dev in target_vm_conf['devices'] Line 88: if dev.get('type') == 'interface'} Line 89: exernal_by_mac = {dev['macAddr']: dev.get('custom'). > I understand the need, but it looks so strange mixing this into this whole For the first time, we are now modifying incoming domxml. Most hooks depend on domxml *not* changing. So we should provide them with a means to signal "it is ok to modify domxml" (for backward compat). Also we need a new hook point placed here, where hook scripts can control how each device is modified. I'm only short of a good name for the hook point. I think that before_device_libvirt_migration_destination is *way* too bad. Line 90: get('provider_type') == EXTERNAL_NETWORK Line 91: for dev in target_vm_conf['devices'] Line 92: if dev.get('type') == 'interface' and dev.get('custom')} Line 93: -- To view, visit https://gerrit.ovirt.org/63621 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0aa5846040a80773a65a14d3e93624e4491c229 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Marcin Mirecki Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: virt net: Disable special OVS handling for exteranal network
Edward Haas has posted comments on this change. Change subject: virt net: Disable special OVS handling for exteranal network .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/63621/1/vdsm/virt/vm_migrate_hook.py File vdsm/virt/vm_migrate_hook.py: Line 85: def _set_bridge_interfaces(devices, target_vm_conf): Line 86: target_vm_nets_by_vnic_mac = {dev['macAddr']: dev['network'] Line 87: for dev in target_vm_conf['devices'] Line 88: if dev.get('type') == 'interface'} Line 89: exernal_by_mac = {dev['macAddr']: dev.get('custom'). I understand the need, but it looks so strange mixing this into this whole thing. If the external network is injected as a vdsm hook, why is it mentioned in a non-hook code? (although this is a libvirt hook, it is a permanent one injected by VDSM, not an optional one). If we are to place it here, I think we need a hook point inside this hook (wow, hook in hook) and make sure that the external network package/hook sets itself into it. What do you think? Is that possible? Line 90: get('provider_type') == EXTERNAL_NETWORK Line 91: for dev in target_vm_conf['devices'] Line 92: if dev.get('type') == 'interface' and dev.get('custom')} Line 93: -- To view, visit https://gerrit.ovirt.org/63621 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0aa5846040a80773a65a14d3e93624e4491c229 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Marcin Mirecki Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: virt net: Disable special OVS handling for exteranal network
gerrit-hooks has posted comments on this change. Change subject: virt net: Disable special OVS handling for exteranal network .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63621 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0aa5846040a80773a65a14d3e93624e4491c229 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Marcin Mirecki Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: virt net: Disable special OVS handling for exteranal network
Marcin Mirecki has uploaded a new change for review. Change subject: virt net: Disable special OVS handling for exteranal network .. virt net: Disable special OVS handling for exteranal network Exteranal network rely of changes introduced by hooks into domxml and hence should not undergo the special handling meant for OVS Change-Id: Id0aa5846040a80773a65a14d3e93624e4491c229 Signed-off-by: mirecki --- M vdsm/virt/vm_migrate_hook.py 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/63621/1 diff --git a/vdsm/virt/vm_migrate_hook.py b/vdsm/virt/vm_migrate_hook.py index 633e4f0..86c4373 100755 --- a/vdsm/virt/vm_migrate_hook.py +++ b/vdsm/virt/vm_migrate_hook.py @@ -31,6 +31,7 @@ _DEBUG_MODE = False LOG_FILE = '/tmp/libvirthook_ovs_migrate.log' +EXTERNAL_NETWORK = 'EXTERNAL_NETWORK' class VmMigrationHookError(Exception): @@ -85,7 +86,15 @@ target_vm_nets_by_vnic_mac = {dev['macAddr']: dev['network'] for dev in target_vm_conf['devices'] if dev.get('type') == 'interface'} +exernal_by_mac = {dev['macAddr']: dev.get('custom'). + get('provider_type') == EXTERNAL_NETWORK + for dev in target_vm_conf['devices'] + if dev.get('type') == 'interface' and dev.get('custom')} + for interface in devices.findall('interface'): +if exernal_by_mac.get(interface.find('mac').get('address')): +continue + if interface.get('type') == 'bridge': _bind_iface_to_bridge(interface, target_vm_nets_by_vnic_mac) -- To view, visit https://gerrit.ovirt.org/63621 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0aa5846040a80773a65a14d3e93624e4491c229 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Marcin Mirecki ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org