Change in vdsm[master]: ovs: copy NIC hwaddr to NB
Dan Kenigsberg has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 19: Code-Review+2 raising score -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 20: * #1364081::Update tracker: OK * Set MODIFIED::bug 1364081#1364081IGNORE, not all related patches are closed, check 61686 -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Dan Kenigsberg has submitted this change and it was merged. Change subject: ovs: copy NIC hwaddr to NB .. ovs: copy NIC hwaddr to NB In order to receive the same IP for network as acquired NIC used to have, we must copy NIC's hwaddr to NB iface. By default hwaddr is copied to bridge, therefore we must set static hwaddr to OVS bridge to not end up with two interfaces (three with the NIC) with the same IP. Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Bug-Url: https://bugzilla.redhat.com/1364081 Signed-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/61049 Reviewed-by: Edward Haas Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/ovs/driver/vsctl.py M lib/vdsm/network/ovs/switch.py M tests/network/ovs_switch_test.py 3 files changed, 39 insertions(+), 1 deletion(-) Approvals: Jenkins CI: Passed CI tests Petr Horáček: Verified Dan Kenigsberg: Looks good to me, approved Edward Haas: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 19: * #1364081::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1364081::OK, public bug * Check Product::#1364081::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 18: * #1364081::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1364081::OK, public bug * Check Product::#1364081::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 18 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 17: * #1364081::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1364081::OK, public bug * Check Product::#1364081::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 16: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 15: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 14: Verified+1 Passed network/*_test.py -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Edward Haas has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 14: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 13: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 12: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 11: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 9: (1 comment) https://gerrit.ovirt.org/#/c/61049/9/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: Line 267: def _random_unicast_local_mac(): Line 268: # TODO: use prefix specified for OVS internal ifaces Line 269: mac = [ Line 270: 0b0010, Line 271: random.randint(0x00, 0xff), > It's just shorter. The mask is not enough, we must set 7. bit to 1 and 8. to 0. Done. Line 272: random.randint(0x00, 0xff), Line 273: random.randint(0x00, 0xff), Line 274: random.randint(0x00, 0xff), Line 275: random.randint(0x00, 0xff)] -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Edward Haas has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 10: (1 comment) https://gerrit.ovirt.org/#/c/61049/9/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: Line 267: def _random_unicast_local_mac(): Line 268: mac = [ Line 269: 0b0010, Line 270: random.randint(0x00, 0xff), Line 271: random.randint(0x00, 0xff), > Then we would have to convert it into a string, split to groups of two and It's just shorter. In addition, the local administered address has several ranges: x2-xx-xx-xx-xx-xx x6-xx-xx-xx-xx-xx xA-xx-xx-xx-xx-xx xE-xx-xx-xx-xx-xx macaddr = hex(random.randint(0x, 0x) & 0xfeff) ':'.join([macaddr[i:i+2] for i in range(0, len(macaddr), 2)]) Line 272: random.randint(0x00, 0xff), Line 273: random.randint(0x00, 0xff), Line 274: random.randint(0x00, 0xff)] Line 275: return ':'.join(map(lambda x: '%02x' % x, mac)) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 10: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 9: (1 comment) https://gerrit.ovirt.org/#/c/61049/9/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: PS9, Line 224: vlan is None > How is VDSM legacy networking behaves when a nic address is moved to a vlan I don't know. I suppose vlan has different subnet and therefore we don't want the same IP. -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 9: (1 comment) https://gerrit.ovirt.org/#/c/61049/9/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: Line 267: def _random_unicast_local_mac(): Line 268: # TODO: use prefix specified for OVS internal ifaces Line 269: mac = [ Line 270: 0b0010, Line 271: random.randint(0x00, 0xff), > Better use one randint (0x00, 0xf) Then we would have to convert it into a string, split to groups of two and connect with ':'. I think this looks simpler. I would not bother with performance, this is called no more times than number of physical nics on the host per setup. Line 272: random.randint(0x00, 0xff), Line 273: random.randint(0x00, 0xff), Line 274: random.randint(0x00, 0xff), Line 275: random.randint(0x00, 0xff)] -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Edward Haas has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 9: (2 comments) https://gerrit.ovirt.org/#/c/61049/9/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: PS9, Line 224: vlan is None How is VDSM legacy networking behaves when a nic address is moved to a vlan? Line 267: def _random_unicast_local_mac(): Line 268: # TODO: use prefix specified for OVS internal ifaces Line 269: mac = [ Line 270: 0b0010, Line 271: random.randint(0x00, 0xff), Better use one randint (0x00, 0xf) Line 272: random.randint(0x00, 0xff), Line 273: random.randint(0x00, 0xff), Line 274: random.randint(0x00, 0xff), Line 275: random.randint(0x00, 0xff)] -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 9: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 8: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 7: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 6: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 4: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 5: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 3: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 2: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/61049/1/lib/vdsm/network/netswitch.py File lib/vdsm/network/netswitch.py: Line 141: connectivity.check(options) Line 142: Line 143: Line 144: def _setup_ovs(networks, bondings, options, in_rollback): Line 145: _ovs_info = ovs_info.OvsInfo() > Calling the full netinfo just for the nics? Done Line 146: ovs_netinfo = ovs_info.create_netinfo(_ovs_info) Line 147: Line 148: nets2add, nets2edit, nets2remove = _split_setup_actions( Line 149: networks, ovs_netinfo['networks']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Edward Haas has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 1: Code-Review-1 (2 comments) Nice solution. https://gerrit.ovirt.org/#/c/61049/1/lib/vdsm/network/netswitch.py File lib/vdsm/network/netswitch.py: Line 141: connectivity.check(options) Line 142: Line 143: Line 144: def _setup_ovs(networks, bondings, options, in_rollback): Line 145: netinfo_nics = netinfo_get()['nics'] Calling the full netinfo just for the nics? Can we call some lower level helper that can get us what we need? (per nic?) Then you won't even need it here.. but in the switch module. Line 146: _ovs_info = ovs_info.OvsInfo() Line 147: ovs_netinfo = ovs_info.create_netinfo(_ovs_info) Line 148: Line 149: nets2add, nets2edit, nets2remove = _split_setup_actions( https://gerrit.ovirt.org/#/c/61049/1/lib/vdsm/network/ovs/switch.py File lib/vdsm/network/ovs/switch.py: Line 263: self._transaction.add(self._ovsdb.set_port_attr( Line 264: bond, 'other_config:vdsm_level', info.SOUTHBOUND)) Line 265: Line 266: Line 267: def random_unicast_local_mac(): I think this needs to be 'private'. The randomization seems a bit expensive, how about creating something like a UUID and taking the last X bits? You better use a common prefix, try to see which one will fit here (From IANA?) Line 268: mac = [0b0010, Line 269: random.randint(0x00, 0xff), Line 270: random.randint(0x00, 0xff), Line 271: random.randint(0x00, 0xff), -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
gerrit-hooks has posted comments on this change. Change subject: ovs: copy NIC hwaddr to NB .. Patch Set 1: * #1195208::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1195208::OK, public bug * Check Product::#1195208::OK, Correct classification oVirt * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček 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]: ovs: copy NIC hwaddr to NB
Petr Horáček has uploaded a new change for review. Change subject: ovs: copy NIC hwaddr to NB .. ovs: copy NIC hwaddr to NB In order to receive the same IP for network as acquired NIC used to have, we must copy NIC's hwaddr to NB iface. By default hwaddr is copied to bridge, therefore we must set static hwaddr to OVS bridge to not end up with two interfaces (three with the NIC) with the same IP. Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Bug-Url: https://bugzilla.redhat.com/1195208 Signed-off-by: Petr Horáček --- M lib/vdsm/network/netswitch.py M lib/vdsm/network/ovs/driver/vsctl.py M lib/vdsm/network/ovs/switch.py 3 files changed, 29 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/61049/1 diff --git a/lib/vdsm/network/netswitch.py b/lib/vdsm/network/netswitch.py index 7f8f308..ae85e00 100644 --- a/lib/vdsm/network/netswitch.py +++ b/lib/vdsm/network/netswitch.py @@ -142,6 +142,7 @@ def _setup_ovs(networks, bondings, options, in_rollback): +netinfo_nics = netinfo_get()['nics'] _ovs_info = ovs_info.OvsInfo() ovs_netinfo = ovs_info.create_netinfo(_ovs_info) @@ -156,7 +157,7 @@ nets2remove.update(nets2edit) with Transaction(in_rollback=in_rollback) as config: -with ovs_switch.create_setup(_ovs_info) as s: +with ovs_switch.create_setup(_ovs_info, netinfo_nics) as s: s.remove_nets(nets2remove) s.remove_bonds(bonds2remove) s.edit_bonds(bonds2edit) diff --git a/lib/vdsm/network/ovs/driver/vsctl.py b/lib/vdsm/network/ovs/driver/vsctl.py index 7f3d4af..2a9c538 100644 --- a/lib/vdsm/network/ovs/driver/vsctl.py +++ b/lib/vdsm/network/ovs/driver/vsctl.py @@ -207,7 +207,9 @@ return Command(['list-ports', bridge]) def set_db_entry(self, table, row, key, value): -command = ['set', table, row, '%s=%s' % (key, value)] +# \"foobar\" escaping is needed in order to be able to to pass strings +# containing colons (for example hwaddr) +command = ['set', table, row, '%s=\"%s\"' % (key, value)] return Command(command) def do_nothing(self): diff --git a/lib/vdsm/network/ovs/switch.py b/lib/vdsm/network/ovs/switch.py index a2885f0..de12bc4 100644 --- a/lib/vdsm/network/ovs/switch.py +++ b/lib/vdsm/network/ovs/switch.py @@ -19,6 +19,7 @@ from __future__ import absolute_import import itertools +import random import six @@ -52,17 +53,18 @@ t.add(*_cleanup_unused_bridges(ovsdb)) -def create_setup(ovs_info): +def create_setup(ovs_info, netinfo_nics): ovsdb = driver.create() -return Setup(ovsdb, ovs_info) +return Setup(ovsdb, ovs_info, netinfo_nics) # TODO: We could move all setup() code into __init__ and __exit__. class Setup(object): -def __init__(self, ovsdb, ovs_info): +def __init__(self, ovsdb, ovs_info, netinfo_nics): self._ovsdb = ovsdb self._transaction = self._ovsdb.transaction() self._ovs_info = ovs_info +self._netinfo_nics = netinfo_nics self._bridges_by_sb = ovs_info.bridges_by_sb self._northbounds_by_sb = ovs_info.northbounds_by_sb @@ -219,6 +221,8 @@ vlan = attrs.get('vlan') if vlan is not None: self._set_vlan(net, vlan) +if nic is not None and vlan is None: +self._copy_nic_hwaddr_to_nb(net, nic) self._northbounds_by_sb.setdefault(sb, set()).add(net) @@ -232,9 +236,16 @@ def _set_vlan(self, net, vlan): self._transaction.add(self._ovsdb.set_port_attr(net, 'tag', vlan)) +def _copy_nic_hwaddr_to_nb(self, net, nic): +nic_hwaddr = self._netinfo_nics[nic]['hwaddr'] +self._transaction.add(self._ovsdb.set_interface_attr( +net, 'mac', nic_hwaddr)) + def _create_bridge(self): bridge = self._create_br_name() self._transaction.add(self._ovsdb.add_br(bridge)) +self._transaction.add(self._ovsdb.set_bridge_attr( +bridge, 'other-config:hwaddr', random_unicast_local_mac())) return bridge @staticmethod @@ -253,6 +264,16 @@ bond, 'other_config:vdsm_level', info.SOUTHBOUND)) +def random_unicast_local_mac(): +mac = [0b0010, +random.randint(0x00, 0xff), +random.randint(0x00, 0xff), +random.randint(0x00, 0xff), +random.randint(0x00, 0xff), +random.randint(0x00, 0xff) ] +return ':'.join(map(lambda x: '%02x' % x, mac)) + + def _cleanup_unused_bridges(ovsdb): """ Remove bridges with no ports. Southbound ports are detached from bridge by -- To view, visit https://gerrit.ovirt.org/61049 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfd22d101868b56c6f0a7ba9b41d43dc5784bdb8 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-