<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>hi everyone,</div><div><br></div><div>i have a question for the neutron code in liberty: how does neutron assign IP address for instance?</div><div><br></div><div>in nova.network, it seems that neutron sever gets a feasible ip from the DB pool, which looks like this:</div><div><span style="line-height: 19.04px; color: rgb(255, 0, 0);">nova.compute.manager.ComputeVirtAPI._allocate_network_async() -> </span><span style="color: rgb(255, 0, 0);">nova.network.api.API.allocate_for_instance() -> nova.network.manager.</span><font color="#ff0000">NetworkManager.</font><span style="color: rgb(255, 0, 0); line-height: 1.7;">allocate_for_instance() -> nova.network.</span><span style="line-height: 19.04px; color: rgb(255, 0, 0);">.manager.</span><font color="#ff0000" style="line-height: 19.04px;">NetworkManager</font><span style="color: rgb(255, 0, 0); line-height: 1.7;">_allocate_fixed_ips()</span></div><div><span style="color: rgb(255, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0);">but in nova.network.neutronv2.0,</span><span style="line-height: 19.04px;"> It looks like this:</span></div><div><span style="color: rgb(255, 0, 0);">nova.compute.manager.ComputeVirtAPI._allocate_network_async() -> neutronv2.api.allocate_for_instance()</span></div><div><span style="line-height: 19.04px;">and it seems that  in </span><span style="line-height: 19.04px; color: rgb(0, 0, 0);">neutronv2.api.allocate_for_instance(),</span><span style="color: rgb(255, 0, 0); line-height: 19.04px;"> </span><span style="line-height: 19.04px;">it doesn't fetch IP address from DB if the para "fixed_ip" == none in allocate_for_instance, but directly calls "_create_port" for a REST API.</span></div><div><span style="line-height: 19.04px;"><br></span></div><div><span style="line-height: 19.04px;">so my question is </span><span style="line-height: 19.04px; color: rgb(255, 0, 0);">whether neutron server will surely assign a fixed IP from DB for instance? Or else, it allows the DHCP agent to take over the IP-MAC selection?</span></div><div><span style="color: rgb(255, 0, 0);"><br></span></div><div><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19.5px;"><br></span></div><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>