Are you sure this is reproducible in pure nova code? Because this looks
like forked nova code for starlingx:

Traceback (most recent call last):
  File 
"/usr/lib64/python2.7/site-packages/nfv_plugins/nfvi_plugins/nfvi_compute_api.py",
 line 2127, in resize_instance
    future.result = (yield)

Looking at this code in the compute API in pure nova, it looks like that
error only gets raised here:

https://github.com/openstack/nova/blob/e25d59078e61fe9f925dbef53dfe88e575d34dab/nova/compute/api.py#L655

Which is being called from resize now:

https://github.com/openstack/nova/blob/e25d59078e61fe9f925dbef53dfe88e575d34dab/nova/compute/api.py#L3652

As a result of this change in stein:

https://review.openstack.org/#/c/620706/

Note that root_bdm=None there so that's how we get into the else block
of _validate_flavor_image_nostatus because it's not considering the
instance as volume-backed.

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

** Tags added: regression starlingx stein-backport-potential

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

** Also affects: nova/stein
   Importance: Undecided
       Status: New

** Changed in: nova/stein
       Status: New => Triaged

** Changed in: nova/stein
   Importance: Undecided => High

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

Title:
  resize of instance, that was booted from volume, trigger image size
  check then fails resize

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) stein series:
  Triaged

Bug description:
  Brief Description
  -----------------
  resize of instance, that was booted from volume, trigger image size check 
then fails resize

  Severity
  --------
  standard

  Steps to Reproduce
  ------------------

  1. Create two flavors based on originating flavor and destination
  flavor

  | 15566866-06d7-487a-b087-9fe928ec8c00 | flavor                 | 1024       
| 4    | 0         |      | 1     | 1.0         | True   
   flavor:extra_specs                   | {"stx_storage": "remote", 
"hw:mem_page_size": "2048"}  
  flavor:ram                           | 1024                                   
                                          
  |
  | flavor:swap                          | 0                                    
                                            
  |
  | flavor:vcpus                         | 1
  | flavor:disk                          | 4                                    
                                            
  |
  | flavor:ephemeral                     | 0

  
  | 20ebe3fe-c1a3-4e62-8c34-10c435f27112 | flavor-2 | 1024       | 1    | 1     
    | 512  | 1     | 1.0         | True   
  | extra_specs                | {"stx_storage": "remote", "hw:mem_page_size": 
"2048"} 
  name                       | flavor-2
  | ram                        | 1024
  | swap                       | 512 
  | vcpus                      | 1  
  | disk                       | 1  

  2. Boot instance from volume with an originating flavor
  OS-EXT-SRV-ATTR:hostname             | tenant2-vm-13
  id                                   | 04f43c9e-d3fa-46c4-9605-c0d1cf8dda71
  os-extended-volumes:volumes_attached | [{"id": 
"672aaa60-1086-45ce-8650-8195aa8dd0da", "delete_on_termination": false}
  OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-0 
  OS-EXT-SRV-ATTR:instance_name        | instance-000000a4

  3. Resize instance to destination flavor that has smaller disk size.
  Confirm resize.

  [2019-04-14 10:05:04,590]
  nova resize --poll 04f43c9e-d3fa-46c4-9605-c0d1cf8dda71 
20ebe3fe-c1a3-4e62-8c34-10c435f27112'


  Expected Behavior
  ------------------
  Did not expect resize of instance, that was booted from volume, to trigger 
image size check

  
  Actual Behavior
  ----------------
  [2019-04-14 10:05:06,427]
  Resize of instance booted from volume inadvertently triggered the image size 
check and results in a ClientExpection related to FlavorDiskSmalerThanMinDisk
  ERROR (ClientException): Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.FlavorDiskSmallerThanMinDisk'> (HTTP 500

  
  nfv-vim.log (controller-0)

  2019-04-14T10:05:06.228 controller-0
  VIM_Thread[244649]     INFO
  _instance_director.py.151   Instance action allowed for tenant2-vm-13,
  action_type=resize

  2019-04-14T10:05:06.228 controller-0
  VIM_Thread[244649]    DEBUG
  _instance.py.1968  Resize instance tenant2-vm-13.

  2019-04-14T10:05:06.228 controller-0
  VIM_Thread[244649]     INFO
  _instance_state_initial.py.36    Exiting state (initial) for
  tenant2-vm-13.

  2019-04-14T10:05:06.229 controller-0                           
VIM_Thread[244649]     INFO                  _instance_state_resize.py.27    
Entering state (resize) for tenant2-vm-13.
  2019-04-14T10:05:06.229 controller-0                           
  VIM_Thread[244649]    DEBUG                        nfvi_compute_api.py.3418  
Instance action rest-api post path: 
/v2.1/6b4999fd6e414ae1b3eace662eb2ed84/servers/04f43c9e-d3fa-46c4-9605-c0d1cf8dda71/action.
  2019-04-14T10:05:06.270 controller-0                 
  VIM_Event-Log_Thread[244975]     INFO                                      
fm.py.379   Generated customer log, 
fm_uuid=621d5dc6-79a8-40a7-814f-2809cbadb859.

  2019-04-14T10:05:06.375 controller-0
  VIM_Thread[244649]    ERROR Caught exception while trying to resize an
  instance, error=[OpenStack Rest-API Exception: method=POST, url=http
  ://nova-
  
api.openstack.svc.cluster.local:8774/v2.1/6b4999fd6e414ae1b3eace662eb2ed84/servers
  /04f43c9e-d3fa-46c4-9605-c0d1cf8dda71/action, headers={'wrs-header':
  'true', 'Content-Type': 'application/json', 'X-OpenStack-Nova-API-
  Version': '2.72'}, body={"resize": {"flavorRef": "20ebe3fe-
  c1a3-4e62-8c34-10c435f27112"}}, status_code=500, reason=HTTP Error
  500: Internal Server Error, response_headers=[('Content-Length',
  '217'), ('X-Compute-Request-Id', 'req-
  aca6c954-1171-48ce-9286-3e9b952481d6'), ('Vary', 'OpenStack-API-
  Version, X-OpenStack-Nova-API-Version'), ('Openstack-Api-Version',
  'compute 2.72'), ('X-Openstack-Nova-Api-Version', '2.72'), ('Date',
  'Sun, 14 Apr 2019 10:05:06 GMT'), ('Content-Type', 'application/json;
  charset=UTF-8'), ('X-Openstack-Request-Id', 'req-
  aca6c954-1171-48ce-9286-3e9b952481d6')],
  response_body={"computeFault": {"message": "Unexpected API Error.
  Please report this at http://bugs.launchpad.net/nova/ and attach the
  Nova API log if possible.\n<class
  'nova.exception.FlavorDiskSmallerThanMinDisk'>", "code": 500}}].

  Traceback (most recent call last):
    File 
"/usr/lib64/python2.7/site-packages/nfv_plugins/nfvi_plugins/nfvi_compute_api.py",
 line 2127, in resize_instance
      future.result = (yield)
  OpenStackRestAPIException: [OpenStack Rest-API Exception: method=POST, 
url=http://nova-api.openstack.svc.cluster.local:8774/v2.1/6b4999fd6e414ae1b3eace662eb2ed84/servers/04f43c9e-d3fa-46c4-9605-c0d1cf8dda71/action,
 headers={'wrs-header': 'true', 'Content-Type': 'application/json', 
'X-OpenStack-Nova-API-Version': '2.72'}, body={"resize": {"flavorRef": 
"20ebe3fe-c1a3-4e62-8c34-10c435f27112"}}, status_code=500, reason=HTTP Error 
500: Internal Server Error, response_headers=[('Content-Length', '217'), 
('X-Compute-Request-Id', 'req-aca6c954-1171-48ce-9286-3e9b952481d6'), ('Vary', 
'OpenStack-API-Version, X-OpenStack-Nova-API-Version'), 
('Openstack-Api-Version', 'compute 2.72'), ('X-Openstack-Nova-Api-Version', 
'2.72'), 
  ('Date', 'Sun, 14 Apr 2019 10:05:06 GMT'), ('Content-Type', 
'application/json; charset=UTF-8'), ('X-Openstack-Request-Id', 
'req-aca6c954-1171-48ce-9286-3e9b952481d6')], response_body={"computeFault": 
{"message": "Unexpected API Error. Please report this at 
http://bugs.launchpad.net/nova/ and attach the Nova API log if 
possible.\n<class 'nova.exception.FlavorDiskSmallerThanMinDisk'>", "code": 
500}}]

  2019-04-14T10:05:06.377 controller-0                           
VIM_Thread[244649]     INFO                        nfvi_compute_api.py.918   
Sent response for request 8b44ee79-9371-479b-83a4-50534ddef1c7.
  2019-04-14T10:05:06.377 controller-0                           
  VIM_Thread[244649]    
  DEBUG                     _instance_task_work.py.426   Resize-Instance 
callback for tenant2-vm-13, response={'completed': False, 'reason': "unexpected 
api error. please report this at http://bugs.launchpad.net/nova/ and attach the 
nova api log if possible.\n<class 
'nova.exception.flavordisksmallerthanmindisk'>"}.
  2019-04-14T10:05:06.378 controller-0                           
VIM_Thread[244649]    DEBUG                         _instance_tasks.py.367   
Task (resize-instance_tenant2-vm-13) complete.

  2019-04-14T10:05:06.378 controller-0                           
VIM_Thread[244649]     INFO                  _instance_state_resize.py.68    
Resize failed for tenant2-vm-13.
  2019-04-14T10:05:06.378 controller-0                          
   VIM_Thread[244649]    
  DEBUG                               _instance.py.2179  Resize failed for 
instance tenant2-vm-13, reason=unexpected api error. please report this at 
http://bugs.launchpad.net/nova/ and attach the nova api log if possible.
  <class 'nova.exception.flavordisksmallerthanmindisk'>.

  
  Reproducibility
  ---------------
  yes

  System Configuration
  --------------------
  storage
  (Lab: IP_20_27 20190414 10:02:43 
test_resize_vm_positive[remote-4_0_0-1_1_512-volume])

  
  Branch/Pull Time/Commit
  --------------------
  Load: 20190410T013000Z
  Job: STX_build_master_master

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1825020/+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