So, this really seems like going out of the way to break the system. A
better error message would be fine if it was submitted, but this is very
unlikely to hit in the real world.

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

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

** Tags added: placement

-- 
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/1708424

Title:
  When a flavor has resource extra_specs disabling all standard fields,
  nova tries to make a request to the placements API with no resources

Status in OpenStack Compute (nova):
  Opinion

Bug description:
  When a flavor is defined like:

  
+----------------------------+--------------------------------------------------------------------+
  | Field                      | Value                                          
                    |
  
+----------------------------+--------------------------------------------------------------------+
  | OS-FLV-DISABLED:disabled   | False                                          
                    |
  | OS-FLV-EXT-DATA:ephemeral  | 0                                              
                    |
  | access_project_ids         | None                                           
                    |
  | disk                       | 0                                              
                    |
  | id                         | 2f41a9c0-f194-4925-81d2-b62a3c07435a           
                    |
  | name                       | test2                                          
                    |
  | os-flavor-access:is_public | True                                           
                    |
  | properties                 | resources:DISK_GB='0', 
resources:MEMORY_MB='0', resources:VCPU='0' |
  | ram                        | 256                                            
                    |
  | rxtx_factor                | 1.0                                            
                    |
  | swap                       |                                                
                    |
  | vcpus                      | 1                                              
                    |
  
+----------------------------+--------------------------------------------------------------------+

  Then it will disable all the standard resources, and pop them from the
  resources dictionary here:

  
https://github.com/openstack/nova/blob/57cd38d1fdc4d6b3439a8374e4713baf0b207184/nova/scheduler/utils.py#L141

  the resources dictionary is then empty but nova still tries to use it
  to make a request to the placements API. This results in a error
  message like:

  ERROR nova.scheduler.client.report [None 
req-030ec9a7-4299-47e0-bd38-b9d40721c210 admin admin] Failed to retrieve 
allocation candidates from placement API for filters {}. Got 400: <htm
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:  <head>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:   <title>400 Bad 
Request</title>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:  </head>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:  <body>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:   <h1>400 Bad 
Request</h1>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:   The server could not 
comply with the request since it is either malformed or otherwise incorrect.<br 
/><br />
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]: Badly formed resources 
parameter. Expected resources query string parameter in form: 
?resources=VCPU:2,MEMORY_MB:1024. Got: empty string.
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]:  </body>
  Aug 03 12:40:11 qa-cld-m1-neo4 nova-scheduler[4057]: </html>.

  Nova should catch the case when the flavor has removed all filters and
  provide a more useful error message to indicate what the operator as
  done wrong.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to