<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:10.5pt;">
<div align="left" style="text-align:justify;">Hi all,</div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">This is a problem about the gateway setting in the subnet when one VM could act as a router/firewall. When one VM works </div>
<div align="left" style="text-align:justify;">as a router/firewall in the network, the port where the VM connect to the subnet should be the gateway of the subnet. </div>
<div align="left" style="text-align:justify;">But now, we can’t set the gateway to any VM’s port plugged into the subnet because the gateway IP cannot be in the IP allocation pool. </div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">The usage is like this:</div>
<ol style="text-align:justify;margin:0;padding-left:18pt;">
<li>Create subnet with a IP allocation pool, specifying the gateway as normal.</li><li>Create a router and attach the interfaces with the subnets. With some vendor router-plugin, it will create a router VM and connect this VM with subnets.</li></ol>
<div align="left" style="text-align:justify;padding-left:18pt;">Router VM would get a IP from the pool, but not the gateway IP.</div>
<div align="left" style="text-align:justify;padding-left:18pt;">This the limitation comes, gateway IP could not be allocated to VM, and subnet’s gateway could not be updated with IP which has been assigned to some VM. </div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">GatewayConflictWithAllocationPools exception would be emitted.</div>
<div align="left" style="text-align:justify;"><font color="#1F497D">And this verification code related is <a href="https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1112"><font color="blue"><u>https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1112</u></font></a></font></div>
<div align="left" style="text-align:justify;"><font color="#1F497D">It was added by patch for this bug <a href="https://bugs.launchpad.net/neutron/+bug/1062061"><font color="blue"><u>https://bugs.launchpad.net/neutron/+bug/1062061</u></font></a>. </font></div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">Here is an error example:</div>
<div align="left" style="text-align:justify;"><font color="#1F497D">stack@yalie-Studio-XPS-8000:~/job/dev2/devstack$ neutron subnet-update subnet2  --gateway  10.0.0.3</font></div>
<div align="left" style="text-align:justify;"><font color="#1F497D">Gateway ip 10.0.0.3 conflicts with allocation pool 10.0.0.2-10.0.0.254</font></div>
<div align="left" style="text-align:justify;"><font face="Times New Roman" color="#1F497D"> </font></div>
<div align="left" style="text-align:justify;">I think we need to remove this API limitation considering the usage listed, and I want to file a bug about it although I know it may appear be incompatible with the API expected before.</div>
<div align="left" style="text-align:justify;">Maybe we could:</div>
<ol style="text-align:justify;margin:0;padding-left:18pt;">
<li>Remove this limitation unconditionally. simple but it would conflict with the API behavior before. Is the behavior before bind with something more?</li><li>Remove this limitation conditionally. Add a flag for neutron router to delicate whether VM as router or a legacy router. Just rough idea.</li></ol>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">More ideas about it?</div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;">much appreciate for any comments.</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">Thanks</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">/Yalei</div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
</span></font>
</body>
</html>