<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Get answer from IRC.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal">This is expected behavior introduced in icehouse. <o:p></o:p></p>
<p class="MsoNormal">Once there is no space for increasing IP, whole range will be recalculated and unused IPs will be reclaimed.<o:p></o:p></p>
<p class="MsoNormal">This was done to not to recalculate it every time ip is de-allocated, it's a kind of optimization.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The link for the patch :<a href="https://review.openstack.org/58017">https://review.openstack.org/58017</a><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-chen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Li, Chen
<br>
<b>Sent:</b> Thursday, June 26, 2014 1:06 PM<br>
<b>To:</b> openstack@lists.openstack.org<br>
<b>Subject:</b> [Neutron] ipavailabilityranges is narrowing down<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi list,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m working under CentOS + icehouse.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have created a private network with a subnet:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">neutron net-list<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+------+-----------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| id | name | subnets |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+------+-----------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| c4f961d1-ac22-47d7-8edd-0829420c35cc | net | b488f9c7-f4e0-4bb5-a648-b5da343fb138 172.16.24.0/24 |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+------+-----------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">neutron subnet-list<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+-------------+----------------+---------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| id | name | cidr | allocation_pools |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+-------------+----------------+---------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| b488f9c7-f4e0-4bb5-a648-b5da343fb138 | flat_subnet | 172.16.24.0/24 | {"start": "172.16.24.10", "end": "172.16.24.253"} |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+-------------+----------------+---------------------------------------------------+<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Well, everything works fine, I can create instances with the network, and can connected to instances as well.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But, then I noticed a small issue:<o:p></o:p></p>
<p class="MsoNormal">Every time, when I create a new instance, the IP address the instances get keeps increasing.<o:p></o:p></p>
<p class="MsoNormal">For example, I create instance A, it’s IP is 172.16.24.12.<o:p></o:p></p>
<p class="MsoNormal">Then I delete instance A, then create instance B, instance B’s IP would be 172.16.24.13.<o:p></o:p></p>
<p class="MsoNormal">When I working under Havana, instance B would get 172.16.24.12.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Then I went to database and did a simple check:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">mysql> select * from ipallocationpools;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| id | subnet_id | first_ip | last_ip |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| d84f82c7-3815-4b61-9ba7-32522656a8d3 | b488f9c7-f4e0-4bb5-a648-b5da343fb138 |
<span style="color:red">172.16.24.10 | 172.16.24.253 </span>|<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">1 row in set (0.00 sec)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">mysql> select * from ipallocations;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+--------------------------------------+--------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| port_id | ip_address | subnet_id | network_id |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+--------------------------------------+--------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| 331461c5-7f9f-484d-8136-f7c2ea044d2c | 172.16.24.11 | b488f9c7-f4e0-4bb5-a648-b5da343fb138 | c4f961d1-ac22-47d7-8edd-0829420c35cc |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| 4b070d15-e96c-44a0-a3eb-2086066ed580 | 172.16.24.43 | b488f9c7-f4e0-4bb5-a648-b5da343fb138 | c4f961d1-ac22-47d7-8edd-0829420c35cc |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+--------------------------------------+--------------------------------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">2 rows in set (0.00 sec)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">mysql> select * from ipavailabilityranges;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| allocation_pool_id | first_ip | last_ip |<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">| d84f82c7-3815-4b61-9ba7-32522656a8d3
<span style="color:red">| 172.16.24.44 | 172.16.24.253 </span>|<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">+--------------------------------------+--------------+---------------+<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">1 row in set (0.00 sec)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As you can see, ipavailabilityranges is narrowing down.<o:p></o:p></p>
<p class="MsoNormal">Shouldn’t it include 2 parts? 172.16.24.10 & 172.16.24.12-172.17.24.41 & 172.16.24.44 - 172.16.24.253.<o:p></o:p></p>
<p class="MsoNormal">Because only 2 IPs are actually using.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m worried if I created more instances, even I deleted them all at end, there would still be no IP available at all.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyone know why this is happening ??<o:p></o:p></p>
<p class="MsoNormal">Is this a real issue ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks.<o:p></o:p></p>
<p class="MsoNormal">-chen<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>