← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1531412] Re: can not boot instance with 31 prefix subnet

 

if the prefixlen is 31, there will be 2 addresses in the cidr, the first is X.X.X.0 in your case, which is a reserved ip address. 
With subnetpool, it will default use the first useful ip address as gateway ip address(X.X.X.1 in your case).

So, there is no useful ip address in the subnet as the error said: " No
fixed IP addresses available for network"

** Changed in: neutron
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1531412

Title:
  can not boot instance with 31 prefix subnet

Status in neutron:
  Invalid

Bug description:
  [Summary]
  can not boot instance with 31 prefix subnet

  [Topo]
  devstack all-in-one node

  [Description and expect result]
  can boot instance with 31 prefix subnet

  [Reproduceable or not]
  reproduceable 

  [Recreate Steps]
  1) create a 31 prefix subnet using subnetpool:
  root@45-59:/opt/stack/devstack# neutron subnetpool-show pool1
  +-------------------+--------------------------------------+
  | Field             | Value                                |
  +-------------------+--------------------------------------+
  | address_scope_id  |                                      |
  | default_prefixlen | 27                                   |
  | default_quota     |                                      |
  | id                | bfc49547-7883-47d5-af43-1d7825ef6fbf |
  | ip_version        | 4                                    |
  | is_default        | False                                |
  | max_prefixlen     | 32                                   |
  | min_prefixlen     | 8                                    |
  | name              | pool1                                |
  | prefixes          | 100.0.0.0/24                         |
  | shared            | False                                |
  | tenant_id         | 72a70635fa0c42a2bcba67edd760d516     |
  +-------------------+--------------------------------------+
  root@45-59:/opt/stack/devstack# neutron subnet-create --subnetpool pool1 
  --prefixlen 31 net2 --name sub2
  Created a new subnet:
  +-------------------+--------------------------------------+
  | Field             | Value                                |
  +-------------------+--------------------------------------+
  | allocation_pools  |                                      |
  | cidr              | 100.0.0.0/31                         |
  | dns_nameservers   |                                      |
  | enable_dhcp       | True                                 |
  | gateway_ip        | 100.0.0.1                            |
  | host_routes       |                                      |
  | id                | 0795544e-cf70-4cff-9387-d3dc23bcbaf5 |
  | ip_version        | 4                                    |
  | ipv6_address_mode |                                      |
  | ipv6_ra_mode      |                                      |
  | name              | sub2                                 |
  | network_id        | 362bbef0-9a1a-4d94-878d-5d503e92b149 |
  | subnetpool_id     | bfc49547-7883-47d5-af43-1d7825ef6fbf |
  | tenant_id         | 72a70635fa0c42a2bcba67edd760d516     |
  +-------------------+--------------------------------------+
  root@45-59:/opt/stack/devstack# 


  2) boot instance with 31 prefix subnet, failed:

  boot cmd:
  nova boot --flavor 1 --image  cirros-0.3.4-x86_64-uec  --availability-zone
   nova --nic net-id=362bbef0-9a1a-4d94-878d-5d503e92b149  inst1

  instance boot error:
  {"message": "Build of instance 2d0b313c-f8b8-414b-8d42-f7ea0fc58865 aborted:
   Failed to allocate the network(s) with error No fixed IP addresses available
  for network: 362bbef0-9a1a-4d94-878d-5d503e92b149, not rescheduling.", "code": 500
  , "details": "  File \"/opt/stack/nova/nova/compute/manager.py\", line 1914, 
  in _do_build_and_run_instance

  3) boot instance with 31 prefix subnet with fixed ip, failed:

  boot cmd:
  nova  boot  --flavor 1 --image  cirros-0.3.4-x86_64-uec  --availability-zone
  nova --nic net-id=362bbef0-9a1a-4d94-878d-5d503e92b149,v4-fixed-ip=100.0.0.1  inst3

  instance boot error:
  {"message": "No valid host was found. There are not enough hosts available."
  , "code": 500, "details": "  File \"/opt/stack/nova/nova/conductor/manager.py\"
  , line 363, in build_instances

  Note: for 31 prefix subnet, there are only 2 available addresses, no network address
   and no broadcast address, the 2 addresses should be used to boot instance

  [Configration]
  reproduceable bug, no need

  [logs]
  reproduceable bug, no need

  [Root cause anlyze or debug inf]
  reproduceable bug

  [Attachment]
  None

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1531412/+subscriptions


References