support NCR coding as project name

Bug #1759933 reported by Tony Liu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenContrail
In Progress
Undecided
Hari Prasad Killi

Bug Description

When use NCR coding as project name (eg. 许智), routes are not propagated
between vrouters through control node.

On CN introspect, VRF inet.0 table shows the right count of routes, but when open the table,
no routes showing up.

When CN sends XMPP to vrouter (XMPP TX stream), '许智' is used in VMI,
VN, etc.

Here is an example message.
================================================
2018-03-29 09:16:32.761 XmppTxStream: Sent xmpp message to: 172.16.0.135 Port 45051 Size: 16889 Packet: <?xml version="1.0"?> <iq type="set" <email address hidden>" to="default-global-system-config:5b4s35/config"> <config> <update> <node type="virtual-machine"> <name>fd8b563f-a0d4-46e0-bb9c-a475f2d52b7d</name> <id-perms> <permissions> <owner>cloud-admin</owner> <owner-access>7</owner-access> <group>cloud-admin-group</group> <group-access>7</group-access> <other-access>7</other-access> </permissions> <uuid> <uuid-mslong>18269791144639743712</uuid-mslong> <uuid-lslong>13518861007951571837</uuid-lslong> </uuid> <enable>true</enable> <created>2018-03-29T16:16:30</created> <last-modified>2018-03-29T16:16:30</last-modified> <description></description> <user-visible>true</user-visible> <creator></creator> </id-perms> <display-name>fd8b563f-a0d4-46e0-bb9c-a475f2d52b7d</display-name> </node> <link> <node type="virtual-router"> <name>default-global-system-config:5b4s35</name> </node> <node type="virtual-machine"> <name>fd8b563f-a0d4-46e0-bb9c-a475f2d52b7d</name> </node> <metadata type="virtual-router-virtual-machine" /> </link> <node type="virtual-machine-interface"> <name>default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44</name> <port-security-enabled>true</port-security-enabled> <virtual-machine-interface-mac-addresses> <mac-address>02:49:40:fd:fd:2f</mac-address> </virtual-machine-interface-mac-addresses> <virtual-machine-interface-device-owner>compute:nova</virtual-machine-interface-device-owner> <virtual-machine-interface-bindings> <key-value-pair> <key>host_id</key> <value>5b4s35</value> </key-value-pair> <key-value-pair> <key>vnic_type</key> <value>normal</value> </key-value-pair> </virtual-machine-interface-bindings> <id-perms> <permissions> <owner>neutron</owner> <owner-access>7</owner-access> <group>admin</group> <group-access>7</group-access> <other-access>7</other-access> </permissions> <uuid> <uuid-mslong>5278498027146264804</uuid-mslong> <uuid-lslong>12619439388469430852</uuid-lslong> </uuid> <enable>true</enable> <created>2018-03-29T16:16:29</created> <last-modified>2018-03-29T16:16:31</last-modified> <description></description> <user-visible>true</user-visible> <creator></creator> </id-perms> <display-name>4940fdfd-2fa7-40e4-af21-41435e4b0a44</display-name> </node> <link> <node type="virtual-machine-interface"> <name>default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44</name> </node> <node type="virtual-machine"> <name>fd8b563f-a0d4-46e0-bb9c-a475f2d52b7d</name> </node> <metadata type="virtual-machine-interface-virtual-machine" /> </link> <node type="instance-ip"> <name>2876f402-ecff-426d-8de5-e1589e989119</name> <instance-ip-address>192.168.10.3</instance-ip-address> <instance-ip-family>v4</instance-ip-family> <subnet-uuid>15dab30c-8866-4db9-8165-f59f4a8ecaac</subnet-uuid> <id-perms> <permissions> <owner>cloud-admin</owner> <owner-access>7</owner-access> <group>cloud-admin-group</group> <group-access>7</group-access> <other-access>7</other-access> </permissions> <uuid> <uuid-mslong>2915786102172238445</uuid-mslong> <uuid-lslong>10224826299748749593</uuid-lslong> </uuid> <enable>true</enable> <created>2018-03-29T16:16:30</created> <last-modified>2018-03-29T16:16:30</last-modified> <description></description> <user-visible>true</user-visible> <creator></creator> </id-perms> <display-name>2876f402-ecff-426d-8de5-e1589e989119</display-name> </node> <link> <node type="instance-ip"> <name>2876f402-ecff-426d-8de5-e1589e989119</name> </node> <node type="virtual-machine-interface"> <name>default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44</name> </node> <metadata type="instance-ip-virtual-machine-interface" /> </link> <node type="project"> <name>default-domain:&amp;#35768;&amp;#26234;</name> <quota> <defaults>0</defaults> <floating-ip>-1</floating-ip> <instance-ip>0</instance-ip> <virtual-machine-interface>-1</virtual-machine-interface> <virtual-network>-1</virtual-network> <virtual-router>0</virtual-router> <virtual-DNS>0</virtual-DNS> <virtual-DNS-record>0</virtual-DNS-record> <bgp-router>0</bgp-router> <network-ipam>0</network-ipam> <access-control-list>0</access-control-list> <network-policy>0</network-policy> <floating-ip-pool>0</floating-ip-pool> <service-template>0</service-template> <service-instance>0</service-instance> <logical-router>-1</logical-router> <security-group>-1</security-group> <security-group-rule>-1</security-group-rule> <subnet>-1</subnet> <global-vrouter-config>0</global-vrouter-config> <loadbalancer-pool>0</loadbalancer-pool> <loadbalancer-member>0</loadbalancer-member> <loadbalancer-healthmonitor>0</loadbalancer-healthmonitor> <virtual-ip>0</virtual-ip> <security-logging-object>0</security-logging-object> <route-table>0</route-table> </quota> <id-perms> <permissions> <owner>admin</owner> <owner-access>7</owner-access> <group>admin</group> <group-access>7</group-access> <other-access>7</other-access> </permissions> <uuid> <uuid-mslong>4621397358943422602</uuid-mslong> <uuid-lslong>9864031822245439425</uuid-lslong> </uuid> <enable>true</enable> <created>2018-03-29T16:14:07</created> <last-modified>2018-03-29T16:16:29</last-modified> <description></description> <user-visible>true</user-visible> <creator></creator> </id-perms> <display-name>&amp;#35768;&amp;#26234;</display-name> </node> <link> <node type="virtual-machine-interface"> <name>default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44</name> </node> <node type="project"> <name>default-domain:&amp;#35768;&amp;#26234;</name> </node> <metadata type="project-virtual-machine-interface" /> </link> <node type="virtual-machine-interface-routing-instance"> <name>attr(default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44,default-domain:&amp;#35768;&amp;#26234;:red:red)</name> <value> <direction>both</direction> <vlan-tag>0</vlan-tag> <src-mac></src-mac> <dst-mac></dst-mac> <mpls-label>0</mpls-label> <service-chain-address></service-chain-address> <ipv6-service-chain-address></ipv6-service-chain-address> <protocol></protocol> </value> </node> <link> <node type="virtual-machine-interface"> <name>default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44</name> </node> <node type="virtual-machine-interface-routing-instance"> <name>attr(default-domain:&amp;#35768;&amp;#26234;:4940fdfd-2fa7-40e4-af21-41435e4b0a44,default-domain:&amp;#35768;&amp;#26234;:red:red)</name> </node> <metadata type="virtual-machine-interface-routing-instance" /> </link> <node type="security-group"> <name>default-domain:&amp;#35768;&amp;#26234;:default</name> <security-group-id>8000005</security-group-id> <security-group-entries> <policy-rule> <rule-sequence> <major>0</major> <minor>0</minor> </rule-sequence> <rule-uuid>210ef7a2-fe30-4569-9e1e-d9b2b79df343</rule-uuid> <direction>&gt;</direction> <protocol>any</protocol> <src-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>default-domain:&amp;#35768;&amp;#26234;:default</security-group> <network-policy></network-policy> </src-addresses> <src-ports> <start-port>0</start-port> <end-port>65535</end-port> </src-ports> <dst-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>local</security-group> <network-policy></network-policy> </dst-addresses> <dst-ports> <start-port>0</start-port> <end-port>65535</end-port> </dst-ports> <action-list> <simple-action></simple-action> <gateway-name></gateway-name> <mirror-to> <analyzer-name></analyzer-name> <encapsulation></encapsulation> <analyzer-ip-address></analyzer-ip-address> <analyzer-mac-address></analyzer-mac-address> <routing-instance></routing-instance> <udp-port>0</udp-port> <juniper-header>true</juniper-header> <nh-mode></nh-mode> <static-nh-header> <vtep-dst-ip-address></vtep-dst-ip-address> <vtep-dst-mac-address></vtep-dst-mac-address> <vni>0</vni> </static-nh-header> <nic-assisted-mirroring>false</nic-assisted-mirroring> <nic-assisted-mirroring-vlan>0</nic-assisted-mirroring-vlan> </mirror-to> <assign-routing-instance></assign-routing-instance> <log>false</log> <alert>false</alert> <qos-action></qos-action> </action-list> <ethertype>IPv4</ethertype> <created>1970-01-01T00:00:00</created> <last-modified>1970-01-01T00:00:00</last-modified> </policy-rule> <policy-rule> <rule-sequence> <major>0</major> <minor>0</minor> </rule-sequence> <rule-uuid>c7a6a49b-fafa-48d1-a12c-1d19a0d0d59a</rule-uuid> <direction>&gt;</direction> <protocol>any</protocol> <src-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>default-domain:&amp;#35768;&amp;#26234;:default</security-group> <network-policy></network-policy> </src-addresses> <src-ports> <start-port>0</start-port> <end-port>65535</end-port> </src-ports> <dst-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>local</security-group> <network-policy></network-policy> </dst-addresses> <dst-ports> <start-port>0</start-port> <end-port>65535</end-port> </dst-ports> <action-list> <simple-action></simple-action> <gateway-name></gateway-name> <mirror-to> <analyzer-name></analyzer-name> <encapsulation></encapsulation> <analyzer-ip-address></analyzer-ip-address> <analyzer-mac-address></analyzer-mac-address> <routing-instance></routing-instance> <udp-port>0</udp-port> <juniper-header>true</juniper-header> <nh-mode></nh-mode> <static-nh-header> <vtep-dst-ip-address></vtep-dst-ip-address> <vtep-dst-mac-address></vtep-dst-mac-address> <vni>0</vni> </static-nh-header> <nic-assisted-mirroring>false</nic-assisted-mirroring> <nic-assisted-mirroring-vlan>0</nic-assisted-mirroring-vlan> </mirror-to> <assign-routing-instance></assign-routing-instance> <log>false</log> <alert>false</alert> <qos-action></qos-action> </action-list> <ethertype>IPv6</ethertype> <created>1970-01-01T00:00:00</created> <last-modified>1970-01-01T00:00:00</last-modified> </policy-rule> <policy-rule> <rule-sequence> <major>0</major> <minor>0</minor> </rule-sequence> <rule-uuid>477921f4-85a7-4062-8e1b-89fc35aa8f8e</rule-uuid> <direction>&gt;</direction> <protocol>any</protocol> <src-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>local</security-group> <network-policy></network-policy> </src-addresses> <src-ports> <start-port>0</start-port> <end-port>65535</end-port> </src-ports> <dst-addresses> <subnet> <ip-prefix>0.0.0.0</ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group></security-group> <network-policy></network-policy> </dst-addresses> <dst-ports> <start-port>0</start-port> <end-port>65535</end-port> </dst-ports> <action-list> <simple-action></simple-action> <gateway-name></gateway-name> <mirror-to> <analyzer-name></analyzer-name> <encapsulation></encapsulation> <analyzer-ip-address></analyzer-ip-address> <analyzer-mac-address></analyzer-mac-address> <routing-instance></routing-instance> <udp-port>0</udp-port> <juniper-header>true</juniper-header> <nh-mode></nh-mode> <static-nh-header> <vtep-dst-ip-address></vtep-dst-ip-address> <vtep-dst-mac-address></vtep-dst-mac-address> <vni>0</vni> </static-nh-header> <nic-assisted-mirroring>false</nic-assisted-mirroring> <nic-assisted-mirroring-vlan>0</nic-assisted-mirroring-vlan> </mirror-to> <assign-routing-instance></assign-routing-instance> <log>false</log> <alert>false</alert> <qos-action></qos-action> </action-list> <ethertype>IPv4</ethertype> <created>1970-01-01T00:00:00</created> <last-modified>1970-01-01T00:00:00</last-modified> </policy-rule> <policy-rule> <rule-sequence> <major>0</major> <minor>0</minor> </rule-sequence> <rule-uuid>3f0cb4b7-8aad-4e17-8db0-e53d9cb557c9</rule-uuid> <direction>&gt;</direction> <protocol>any</protocol> <src-addresses> <subnet> <ip-prefix></ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group>local</security-group> <network-policy></network-policy> </src-addresses> <src-ports> <start-port>0</start-port> <end-port>65535</end-port> </src-ports> <dst-addresses> <subnet> <ip-prefix>::</ip-prefix> <ip-prefix-len>0</ip-prefix-len> </subnet> <virtual-network></virtual-network> <security-group></security-group> <network-policy></network-policy> </dst-addresses> <dst-ports> <start-port>0</start-port> <end-port>65535</end-port> </dst-ports> <action-list> <simple-action></simple-action> <gateway-name></gateway-name> <mirror-to> <analyzer-name></analyzer-name> <encapsulation></encapsulation> <analyzer-ip-address></analyzer-ip-address> <analyzer-mac-address></analyzer-mac-address> <routing-instance></routing-instance> <udp-port>0</udp-port> <juniper-header>true</juniper-header> <nh-mode></nh-mode> <static-nh-header> <vtep-dst-ip-address></vtep-dst-ip-address> <vtep-dst-mac-address></vtep-dst-mac-address> <vni>0</vni> </static-nh-header> <nic-assisted-mirroring>false</nic-assisted-mirroring> <nic-assisted-mirroring-vlan>0</nic-assisted-mirroring-vlan> </mirror-to> <assign-routing-instance></assign-routing-instance> <log>false</log> <alert>false</alert> <qos-action></qos-action> </action-list> <ethertype>IPv6</ethertype> <created>1970-01-01T00:00:00</created> <last-modified>1970-01-01T00:00:00</last-modified> </policy-rule> </security-group-entries> <id-perms> <permissions> <owner>admin</owner> <owner-access>7</owner-access> <group>admin</group> <group-access>7</group-access> <other-access>7</other-access> </permissions> <uuid> <uuid-mslong>247267034687751567</uuid-mslong> <uuid-lslong>12840792839422096596</uuid-lslong> </uuid> <enable>true</enable> <created>2018-03-29T16:14:08</created> <last-modified>2018-03-29T16:14:08</last-modified> <description>Default security group</description> <user-visible>true</user-visible> <creator></creator> </id-perms> <display-name>default</display-name> </node> </update> </config> </iq> $ controller/src/xmpp/xmpp_connection.cc 240
================================================

The guess is that, due to the name mismatch, vrouter doesn't import the route into VRF.
The result is that, 2 VMs on different vrouters can't connect to each other.

It seems that, when CN process '&#35768;&#26234;', it doesn't escape '&'. The string shall be
handled as is.

Tony Liu (taoliu-7)
Changed in opencontrail:
assignee: nobody → Tony Liu (taoliu-7)
assignee: Tony Liu (taoliu-7) → nobody
Sachin Bansal (sbansal)
Changed in opencontrail:
assignee: nobody → Pramodh D'Souza (psdsouza)
Sachin Bansal (sbansal)
Changed in opencontrail:
assignee: Pramodh D'Souza (psdsouza) → Mahesh Sivakumar (maheshmns)
Changed in opencontrail:
status: New → In Progress
Revision history for this message
Mahesh Sivakumar (maheshmns) wrote :
Download full text (4.5 KiB)

Hi Hari,

I recently joined Sachin’s team and have been looking at this bug for the past couple of days. I was able to reproduce this easily and every time on a local setup (with 2 computes and 1 control node) when the routing instance name had special characters (in this case I used the VN name as &#35768;&#26234;). This was due to the fact that customer used a Chinese name which gets translated into the above name.

On further debugging, I see the following:

- The route when advertised by the agent to the control node via xmpp has the VN name encoded with special characters (for instance xml represents the character ‘&’ as ‘&amp;’)

2018-04-02 15:10:59.074 XmppRxStream: Received xmpp message from: 10.84.14.4 Port 43400 Size: 325 Packet: <?xml version="1.0"?> <iq type="set" from="a5s4" <email address hidden>/bgp-peer" id="subscribe9"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <subscribe node="default-domain:admin:#35768;&amp;#26234;:#35768;&amp;#26234;"> <options> <instance-id>2</instance-id> </options> </subscribe> </pubsub> </iq> $ controller/src/xmpp/xmpp_connection.cc 562

- Control node, however, is able to get the VN name decoded correctly and is creating the network properly and populates the prefixes in the appropriate tables (seen from control node introspect for ShowRouteReq)
- Control node then reflects this prefix back to the vRouters. Again, XML encoding appends special characters appropriately.

2018-04-02 15:10:53.472 XmppTxStream: Sent xmpp message to: 10.84.18.2 Port 43773 Size: 2778 Packet: <?xml version="1.0"?> <iq type="set" <email address hidden>" to="default-global-system-config:a4s2/config"> <config> <update> <node type="virtual-network-network-ipam"> <name>attr(default-domain:admin:#35768;&amp;#26234;,default-domain:default-project:default-network-ipam)</name> <value> <ipam-subnets> <subnet> <ip-prefix>10.2.2.0</ip-prefix> <ip-prefix-len>24</ip-prefix-len> </subnet> <default-gateway>10.2.2.1</default-gateway> <dns-server-address>10.2.2.2</dns-server-address> <subnet-uuid>dbfc759d-81fb-499d-8316-ac1d0759e204</subnet-uuid> <enable-dhcp>true</enable-dhcp> <addr_from_start>true</addr_from_start> <dhcp-option-list /> <host-routes /> <subnet-name>subnet1</subnet-name> <alloc-unit>1</alloc-unit> <created>2018-04-02T18:11:04</created> <last-modified>2018-04-02T18:11:04</last-modified> </ipam-subnets> <host-routes /> </value> </node> <link> <node type="virtual-network"> <name>default-domain:admin:#35768;&amp;#26234;</name> </node> <node type="virtual-network-network-ipam"> <name>attr(default-domain:admin:#35768;&amp;#26234;,default-domain:default-project:default-network-ipam)</name> </node> <metadata type="virtual-network-network-ipam" /> </link> <link> <node type="routing-instance"> <name>default-domain:admin:#35768;&amp;#26234;:#35768;&amp;#26234;</name> </node> <node type="virtual-network"> <name>default-domain:admin:#35768;&amp;#26234;</name> </node> <metadata type="virtual-network-routing-instance" /> </link> <node type="network-ipam"> <name>default-domain:default-project:default-network-ipam</name> <id-perms> <permissions> <owner>cloud-admin</...

Read more...

Revision history for this message
Mahesh Sivakumar (maheshmns) wrote :

FYI, the cosmetic issue with the Sandesh request turns out to be a malformed request UrlQuery from the HTTP server where the routing instance name was cut short when it had special characters.

$106 = {method_ = HTTP_GET, url_ = "/Snh_ShowRouteReq?x=default-domain:admin:",

This is being tracked by

https://bugs.launchpad.net/opencontrail/+bug/1761603

Thanks
Mahesh

Changed in opencontrail:
assignee: Mahesh Sivakumar (maheshmns) → Hari Prasad Killi (haripk)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.