)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"d007134595c25dc02a8884bbd4d3d20dbebbb4a4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3d011d43_0b582537","updated":"2022-07-18 01:34:23.000000000","message":"Hi, hirotaka, Do you know why we need  this route ?","commit_id":"646eabdf95e7edbc6b05790bfd3726bbd1c7b742"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"7332d557c8ba40d22fae19551667bcb203cfade6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ca50d5c2_97309a5f","in_reply_to":"3d011d43_0b582537","updated":"2022-07-18 07:47:14.000000000","message":"Hi Wu! Thanks for asking my comment. \n\nI think we should not remove this replace because the routing entry is used to reach hosts on private network via public bridge network(br-ex).\n\n`ip route replace` will create a routing entry when no routes to be replaced exist. Here is a simple test in my environment to reach mariadb port from devstack host.\n\n1. Checks the current routing table and ip and port reachability.\n`10.0.0.0` is the default private network address.\n```\n$ netstat -rn|grep 10.0.0.0\n10.0.0.0        172.24.4.107    255.255.252.0   UG        0 0          0 br-ex\n$ nc -zv 10.0.0.37 3306\nConnection to 10.0.0.37 3306 port [tcp/mysql] succeeded!\n```\n\n2. Removes the routing entry.\n```\n$ sudo ip route delete 10.0.0.0/22 via 172.24.4.107\n```\n\n3. Checks the current routing table and ip and port reachability.\n```\n$ netstat -rn|grep 10.0.0.0\n$ nc -zv 10.0.0.37 3306\nnc: connect to 10.0.0.37 port 3306 (tcp) failed: No route to host\n```\n\n4. Adds the routing entry using `replace` command\n```\n$ sudo ip route replace 10.0.0.0/22 via 172.24.4.107\n```\n\n5. Checks the current routing table and ip and port reachability.\n```\n$ netstat -rn|grep 10.0.0.0\n10.0.0.0        172.24.4.107    255.255.252.0   UG        0 0          0 br-ex\n$ nc -zv 10.0.0.37 3306\nConnection to 10.0.0.37 3306 port [tcp/mysql] succeeded!\n```\n\nHere are some stack.sh logs in my environment.\n```\n$ grep -E \"ROUTER_GW_IP|IPV4_ADDRS_SAFE_TO_USE|10.0.0.0\" logs/stack.sh.log\n2022-07-15 03:13:07.247 | ++ lib/neutron_plugins/services/l3:create_neutron_initial_network:158 :   oscwrap --os-cloud devstack-admin --os-region RegionOne subnet pool create shared-default-subnetpool-v4 --default-prefix-length 26 --pool-prefix 10.0.0.0/22 --share --default -f value -c id\n2022-07-15 03:13:29.643 | + lib/neutron_plugins/services/l3:_neutron_configure_router_v4:350 :   ROUTER_GW_IP\u003d\u0027   172.24.4.107  \u0027\n2022-07-15 03:13:29.645 | + lib/neutron_plugins/services/l3:_neutron_configure_router_v4:351 :   die_if_not_set 351 ROUTER_GW_IP \u0027Failure retrieving ROUTER_GW_IP\u0027\n2022-07-15 03:14:30.539 |   IPV4_ADDRS_SAFE_TO_USE: 10.0.0.0/22\n2022-07-15 03:14:30.539 |   FIXED_RANGE: 10.0.0.0/22\n2022-07-15 03:14:30.539 |   SUBNETPOOL_PREFIX_V4: 10.0.0.0/22\n2022-07-15 03:14:30.539 |   ROUTER_GW_IP:    172.24.4.107  \n2022-07-15 03:14:40.101 | ++ /opt/stack/trove/devstack/plugin.sh:config_trove_network:541 :   sudo ip route replace 10.0.0.0/22 via 172.24.4.107\n2022-07-15 03:14:48.289 | | 45216809-50b4-484e-9ad9-bccdb3147f0d | private-subnet    | 82645d6d-69fa-44e9-a0db-8374c0e2696a | 10.0.0.0/26      |\n2022-07-15 03:14:49.932 | 10.0.0.0/22 via 172.24.4.107 dev br-ex\n```\n\nand here are neutron settings of devstack/local.conf in my environment.\n```\n# Use openvswitch as the ml2 plugin driver\nQ_AGENT\u003dopenvswitch\nQ_ML2_PLUGIN_MECHANISM_DRIVERS\u003dopenvswitch\nQ_PLUGIN\u003dml2\nQ_ML2_TENANT_NETWORK_TYPE\u003dvxlan\nQ_DVR_MODE\u003dlegacy\n\n# Neutron\nenable_service q-svc\nenable_service q-agt\nenable_service q-dhcp\nenable_service q-l3\nenable_service q-meta\n```\n\nThanks in advance,\nHirotaka","commit_id":"646eabdf95e7edbc6b05790bfd3726bbd1c7b742"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"4951b465fb7238cd0276a33c3a4542d8c2322363","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"aa813df8_808a5f75","in_reply_to":"ca50d5c2_97309a5f","updated":"2022-07-19 14:32:24.000000000","message":"well, I got it , thank you for the explanation. anyway, Add a check before we run this command is harmless.","commit_id":"646eabdf95e7edbc6b05790bfd3726bbd1c7b742"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"6cfa44c57131682f02d9c143bda64d8f96ab50bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0d410e65_efe532f1","updated":"2022-07-20 04:37:04.000000000","message":"Hi Wu, LGTM!","commit_id":"a8d9a82df18c78b5ab244761e2861f6d023d6887"}]}
