Bug 1643749
| Summary: | [RFE] Supporting ovn-nbctl lsp-set-addresses port_name "dynamic unknown" | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yuval Lifshitz <ylifshit> | |
| Component: | openvswitch | Assignee: | lorenzo bianconi <lorenzo.bianconi> | |
| Status: | CLOSED ERRATA | QA Contact: | haidong li <haili> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 7.5 | CC: | alkaplan, atragler, ctrautma, lorenzo.bianconi, mmichels, pvauter, qding, tredaelli, ylifshit, ysegev | |
| Target Milestone: | rc | Keywords: | FutureFeature | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | openvswitch-2.9.0-90.el7fdn | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1662905 (view as bug list) | Environment: | ||
| Last Closed: | 2019-03-06 10:56:36 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1662905 | |||
|
Description
Yuval Lifshitz
2018-10-28 10:42:41 UTC
Bug still occurs. I have used the new rpm's Lorenzo supplied in https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19438217. The rpm's here are the same as those in https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19244845, which is what Lorenzo provided in the previous comment. Reproduction scenario: 1. Removed the previously installed openvswitch and openvswitch-ovn packages. These were of version 2.10.0 (2.10.0-34 to be precise). $ yum remove openvswitch2.10* 2. Installed the new packages taken from the brew link (using "yum install"). 3. Verified the new packages were installed: [root@ysegev-rhel7 ~]# rpm -qa | grep openvswitch openvswitch-ovn-common-2.9.0-85.el7fdn.x86_64 openvswitch-ovn-vtep-2.9.0-85.el7fdn.x86_64 openvswitch-selinux-extra-policy-1.0-9.el7fdp.noarch openvswitch-test-2.9.0-85.el7fdn.noarch openvswitch-devel-2.9.0-85.el7fdn.x86_64 openvswitch-2.9.0-85.el7fdn.x86_64 openvswitch-ovn-host-2.9.0-85.el7fdn.x86_64 openvswitch-debuginfo-2.9.0-85.el7fdn.x86_64 openvswitch-ovn-central-2.9.0-85.el7fdn.x86_64 python-openvswitch-2.9.0-85.el7fdn.x86_64 4. $ /usr/share/openvswitch/scripts/ovn-ctl start_northd 5. $ /usr/share/openvswitch/scripts/ovn-ctl start_controller 6. $ ovn-nbctl list logical_switch_port port_with_no_subnet 7. $ ovn-nbctl ls-add test_switch 8. $ ovn-nbctl lsp-add test_switch port_with_no_subnet 9. $ ovn-nbctl lsp-set-addresses port_with_no_subnet "dynamic" Expected result: Dynamic MAC address should occur. Actual result: _uuid : 071121dd-cb5b-41bc-b330-715aaa9bd2c9 addresses : [dynamic] dhcpv4_options : [] dhcpv6_options : [] dynamic_addresses : [] enabled : [] external_ids : {} name : port_with_no_subnet options : {} parent_name : [] port_security : [] tag : [] tag_request : [] type : "" up : false dynamic_addresses field remains blank. What I find strange here is that the new version number (2.9.0) is higher than the old version (2.10.0). Could it be that the version in the brew link is old, and doesn't include the fix? (In reply to Yossi Segev from comment #14) > Bug still occurs. > I have used the new rpm's Lorenzo supplied in > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19438217. The > rpm's here are the same as those in > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19244845, which > is what Lorenzo provided in the previous comment. > > Reproduction scenario: > 1. Removed the previously installed openvswitch and openvswitch-ovn > packages. These were of version 2.10.0 (2.10.0-34 to be precise). > $ yum remove openvswitch2.10* > 2. Installed the new packages taken from the brew link (using "yum install"). > 3. Verified the new packages were installed: > [root@ysegev-rhel7 ~]# rpm -qa | grep openvswitch > openvswitch-ovn-common-2.9.0-85.el7fdn.x86_64 > openvswitch-ovn-vtep-2.9.0-85.el7fdn.x86_64 > openvswitch-selinux-extra-policy-1.0-9.el7fdp.noarch > openvswitch-test-2.9.0-85.el7fdn.noarch > openvswitch-devel-2.9.0-85.el7fdn.x86_64 > openvswitch-2.9.0-85.el7fdn.x86_64 > openvswitch-ovn-host-2.9.0-85.el7fdn.x86_64 > openvswitch-debuginfo-2.9.0-85.el7fdn.x86_64 > openvswitch-ovn-central-2.9.0-85.el7fdn.x86_64 > python-openvswitch-2.9.0-85.el7fdn.x86_64 > 4. $ /usr/share/openvswitch/scripts/ovn-ctl start_northd > 5. $ /usr/share/openvswitch/scripts/ovn-ctl start_controller > 6. $ ovn-nbctl list logical_switch_port port_with_no_subnet > 7. $ ovn-nbctl ls-add test_switch > 8. $ ovn-nbctl lsp-add test_switch port_with_no_subnet > 9. $ ovn-nbctl lsp-set-addresses port_with_no_subnet "dynamic" > > > Expected result: > Dynamic MAC address should occur. > > > Actual result: > _uuid : 071121dd-cb5b-41bc-b330-715aaa9bd2c9 > addresses : [dynamic] > dhcpv4_options : [] > dhcpv6_options : [] > dynamic_addresses : [] > enabled : [] > external_ids : {} > name : port_with_no_subnet > options : {} > parent_name : [] > port_security : [] > tag : [] > tag_request : [] > type : "" > up : false > > dynamic_addresses field remains blank. Hi Yossi, you need to set mac_only to true in logical_switch table $ovn-nbctl --wait=sb set Logical-Switch test_switch other_config:mac_only=true > > > What I find strange here is that the new version number (2.9.0) is higher > than the old version (2.10.0). > Could it be that the version in the brew link is old, and doesn't include > the fix? Since the RFE is for openvswitch 2.9, I backported the new feature just on it for the moment After configuring mac_only=true as Lorenzo suggested - dynamic MAC address appears:
[root@ysegev-rhel7 ~]# ovn-nbctl list logical_switch_port port_with_no_subnet
_uuid : 071121dd-cb5b-41bc-b330-715aaa9bd2c9
addresses : [dynamic]
dhcpv4_options : []
dhcpv6_options : []
dynamic_addresses : "0a:00:00:00:00:01"
enabled : []
external_ids : {}
name : port_with_no_subnet
options : {}
parent_name : []
port_security : []
tag : []
tag_request : []
type : ""
up : false
(In reply to Yossi Segev from comment #16) > After configuring mac_only=true as Lorenzo suggested - dynamic MAC address > appears: > > [root@ysegev-rhel7 ~]# ovn-nbctl list logical_switch_port port_with_no_subnet > _uuid : 071121dd-cb5b-41bc-b330-715aaa9bd2c9 > addresses : [dynamic] > dhcpv4_options : [] > dhcpv6_options : [] > dynamic_addresses : "0a:00:00:00:00:01" > enabled : [] > external_ids : {} > name : port_with_no_subnet > options : {} > parent_name : [] > port_security : [] > tag : [] > tag_request : [] > type : "" > up : false Does that feature fix your use case? If so I will post the patch upstream (In reply to lorenzo bianconi from comment #17) > (In reply to Yossi Segev from comment #16) > > After configuring mac_only=true as Lorenzo suggested - dynamic MAC address > > appears: > > > > [root@ysegev-rhel7 ~]# ovn-nbctl list logical_switch_port port_with_no_subnet > > _uuid : 071121dd-cb5b-41bc-b330-715aaa9bd2c9 > > addresses : [dynamic] > > dhcpv4_options : [] > > dhcpv6_options : [] > > dynamic_addresses : "0a:00:00:00:00:01" > > enabled : [] > > external_ids : {} > > name : port_with_no_subnet > > options : {} > > parent_name : [] > > port_security : [] > > tag : [] > > tag_request : [] > > type : "" > > up : false > > Does that feature fix your use case? If so I will post the patch upstream Yes, thanks. I have tested this and have a question about the "mac_only=true" configuration.
If I have set the "other_config:subnet" and "other_config:ipv6_prefix",will ovn still assign ip for port with the option "mac_only=true" set? The test shows ovn will also assign dynamic ip for port:
[root@dell-per730-19 ~]# ovn-nbctl get Logical-Switch s1 other_config
{"ipv6_prefix"="3000::0", mac_only="true", subnet="172.16.0.0/24"}
[root@dell-per730-19 ~]# ovn-nbctl get Logical-Switch-Port lsp2 dynamic_addresses
"00:11:22:10:00:03 172.16.0.2 3000::211:22ff:fe10:3"
[root@dell-per730-19 ~]#
(In reply to haidong li from comment #20) > I have tested this and have a question about the "mac_only=true" > configuration. > If I have set the "other_config:subnet" and "other_config:ipv6_prefix",will > ovn still assign ip for port with the option "mac_only=true" set? The test > shows ovn will also assign dynamic ip for port: > > [root@dell-per730-19 ~]# ovn-nbctl get Logical-Switch s1 other_config > {"ipv6_prefix"="3000::0", mac_only="true", subnet="172.16.0.0/24"} > [root@dell-per730-19 ~]# ovn-nbctl get Logical-Switch-Port lsp2 > dynamic_addresses > "00:11:22:10:00:03 172.16.0.2 3000::211:22ff:fe10:3" > [root@dell-per730-19 ~]# Hi haidong, correct, mac_only will be overwritten by subnet/ipv6_prefix options This bug is verified on the latest version: [root@dell-per730-57 ~]# systemctl restart openvswitch [root@dell-per730-57 ~]# systemctl start ovn-controller [root@dell-per730-57 ~]# rpm -qa | grep openvswitch openvswitch-ovn-host-2.9.0-95.el7fdp.x86_64 openvswitch-2.9.0-95.el7fdp.x86_64 openvswitch-ovn-central-2.9.0-95.el7fdp.x86_64 openvswitch-selinux-extra-policy-1.0-10.el7fdp.noarch openvswitch-ovn-common-2.9.0-95.el7fdp.x86_64 [root@dell-per730-57 ~]# uname -a Linux dell-per730-57.rhts.eng.pek2.redhat.com 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [root@dell-per730-57 ~]# systemctl start ovn-northd [root@dell-per730-57 ~]# ovn-nbctl ls-add s2 [root@dell-per730-57 ~]# ovn-nbctl lsp-add s2 lsp1 [root@dell-per730-57 ~]# ovn-nbctl lsp-set-addresses lsp1 dynamic [root@dell-per730-57 ~]# ovn-nbctl get Logical-Switch-Port lsp1 dynamic_addresses [] [root@dell-per730-57 ~]# ovn-nbctl get Logical-Switch-Port lsp1 addresses [dynamic] [root@dell-per730-57 ~]# ovn-nbctl set Logical-Switch s2 other_config:mac_only=true [root@dell-per730-57 ~]# ovn-nbctl get Logical-Switch-Port lsp1 addresses [dynamic] [root@dell-per730-57 ~]# ovn-nbctl get Logical-Switch-Port lsp1 dynamic_addresses "0a:00:00:00:00:01" [root@dell-per730-57 ~]# ovn-nbctl set NB_Global . options:mac_prefix=00:00:22:33:44:55 [root@dell-per730-57 ~]# ovn-nbctl get Logical-Switch-Port lsp1 dynamic_addresses "00:00:22:00:00:01" [root@dell-per730-57 ~]# Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0466 |