← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1562842] Re: instance going to scheduler when invalid v4-fixed-ip is provided in nova boot command

 

@Abhilash:

root cause
----------
The nova conductor log file "n-cond.log" you attached shows the error:

    Invalid input received: 
    Fixed IP 1.0.0.255 is not a valid ip address for network
    97adf977-8b62-4996-a800-bbbdaf9c0fd9.

This gets raised in Liberty code at [1]. It's also there in Mitaka and
current master (Newton). 
As you already mentioned, this happens after the scheduler chose one 
compute host and the spawn of the instance has started.

conclusion
----------
The CLI doesn't offer any client side validation. It returns the server
side created response. Because the spawn of an instance is a long 
running task, the "launch" REST API triggers the creation asynchronously.
This means the CLI only returns that the trigger of the creation got
accepted. It doesn't make a statement if this will succeed.
I don't see a benefit in introducing a "pre-validation" before the 
scheduler decides where to place an instance. I'm closing the bug report
as "Opinion/wishlist" as it doesn't look like a bug to me. If you think
this is wrong, please reopen it and add a reasoning.

References:
[1] https://github.com/openstack/nova/blob/acb2dc5e27a85b9148599f1c4dd59e317752f125/nova/network/neutronv2/api.py#L367-L370

** Changed in: nova
       Status: Incomplete => Opinion

** Changed in: nova
   Importance: Undecided => Wishlist

** Tags added: network neutron scheduler

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1562842

Title:
  instance going to scheduler when invalid v4-fixed-ip is provided in
  nova boot command

Status in OpenStack Compute (nova):
  Opinion

Bug description:
  When providing invalid v4-fixed-ip in nova boot command, the instance
  will queue with the scheduler but fail to boot. Instead what should
  happen is, there should be check at client side or server side and
  error message should be thrown so that VM does not get queued with the
  scheduler.

  
  neutron net-list
  +--------------------------------------+---------+----------------------------------------------------------+
  | id                                   | name    | subnets                                                  |
  +--------------------------------------+---------+----------------------------------------------------------+
  | 97adf977-8b62-4996-a800-bbbdaf9c0fd9 | public  | 35364205-3b7d-47db-8bf3-e1590416d9f1 2001:db8::/64       |
  |                                      |         | ddacd805-5e07-4e63-a827-fd094c61e84a 172.24.4.0/24       |
  | f9976ad3-33fb-44a4-b25f-e8356de9e7d2 | private | 6427f306-2646-479e-b47b-5a115f020d1c 10.0.0.0/24         |
  |                                      |         | 4de2d8be-0c1a-4b9c-aabf-3a896a7c67c0 fd07:4910:1fa6::/64 |
  +--------------------------------------+---------+----------------------------------------------------------+

  
  nova boot abi_1 --image a258964a-4250-4b6d-9fe9-492ac2b3d8da --flavor m1.tiny --nic net-id=97adf977-8b62-4996-a800-bbbdaf9c0fd9,v6-fixed-ip=1.0.0.255
  (note: 1.0.0.255 is broadcast ip for the network, should be invalid.)

  +--------------------------------------+----------------------------------------------------------------+
  | Property                             | Value                                                          |
  +--------------------------------------+----------------------------------------------------------------+
  | OS-DCF:diskConfig                    | MANUAL                                                         |
  | OS-EXT-AZ:availability_zone          |                                                                |
  | OS-EXT-SRV-ATTR:host                 | -                                                              |
  | OS-EXT-SRV-ATTR:hostname             | abi-1                                                          |
  | OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                              |
  | OS-EXT-SRV-ATTR:instance_name        | instance-0000004e                                              |
  | OS-EXT-SRV-ATTR:kernel_id            | e2a5fdda-7422-4e41-b59a-fa2dad82583e                           |
  | OS-EXT-SRV-ATTR:launch_index         | 0                                                              |
  | OS-EXT-SRV-ATTR:ramdisk_id           | 4ea6bc99-2c01-459b-9ce1-b6bc6a51ad79                           |
  | OS-EXT-SRV-ATTR:reservation_id       | r-wt958hij                                                     |
  | OS-EXT-SRV-ATTR:root_device_name     | -                                                              |
  | OS-EXT-SRV-ATTR:user_data            | -                                                              |
  | OS-EXT-STS:power_state               | 0                                                              |
  | OS-EXT-STS:task_state                | scheduling                                                     |
  | OS-EXT-STS:vm_state                  | building                                                       |
  | OS-SRV-USG:launched_at               | -                                                              |
  | OS-SRV-USG:terminated_at             | -                                                              |
  | accessIPv4                           |                                                                |
  | accessIPv6                           |                                                                |
  | adminPass                            | FtPf4XB3exjh                                                   |
  | config_drive                         |                                                                |
  | created                              | 2016-03-28T12:33:13Z                                           |
  | flavor                               | m1.tiny (1)                                                    |
  | hostId                               |                                                                |
  | id                                   | fb037e34-7372-45ee-88b6-7dc1d228fe46                           |
  | image                                | cirros-0.3.4-x86_64-uec (a258964a-4250-4b6d-9fe9-492ac2b3d8da) |
  | key_name                             | -                                                              |
  | metadata                             | {}                                                             |
  | name                                 | abi_1                                                          |
  | os-extended-volumes:volumes_attached | []                                                             |
  | progress                             | 0                                                              |
  | security_groups                      | default                                                        |
  | status                               | BUILD                                                          |
  | tenant_id                            | 9f87ed00b37d434abd0e422d9f0b9a9b                               |
  | updated                              | 2016-03-28T12:33:13Z                                           |
  | user_id                              | 19250807be0c4c42b970a02ccf3126d2                               |
  +--------------------------------------+----------------------------------------------------------------+

  nova list
  +--------------------------------------+------------+--------+------------+-------------+----------------------------------+
  | ID                                   | Name       | Status | Task State | Power State | Networks                         |
  +--------------------------------------+------------+--------+------------+-------------+----------------------------------+
  | 5fefe57f-77cb-4779-9727-fa7d82cf857b | abhilash_1 | ACTIVE | -          | Running     | public=2001:db8::2d, 172.24.4.44 |
  | 28bd1ecf-393d-4073-9f00-62c07fe2ad49 | abi_2      | ERROR  | -          | NOSTATE     |                                  |
  +--------------------------------------+------------+--------+------------+-------------+----------------------------------+

  
  This abi_2 is in error state, which should instead through message at boot command only.

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


References