This isn't a bug, if you look at this 
https://github.com/openstack/nova/blob/master/nova/compute/stats.py#L52 
the workload is being computed by the number of tasks in progress. In your 
case, I believe that once you suspend and show the hypervisor stats the VM is 
still suspending, but when you resume, by the time you show hypervisor stats 
the task is no longer a task in progress, thats why you see 0.

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

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

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

Title:
  current_workload in  nova hypervisor-show not recover after nova
  suspend/resume

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  with nova suspend/resume action, nova hypervisor-show <hypervisor-id>
  does not recover the current_workload value.

  the observation is based on Grizzly, nova version is 2.10.0.

  Below is the console log: (issue also reproduced on kvm hypervisor) 
  Steps:
  [root@ci-525400E87B4A ~]# nova list
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | ID                                   | Name    | Status | Networks          
                         |
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | cc2bbd51-6b83-40e7-b83a-54f8b1e1f6ce | esx_vm1 | BUILD  | Private 
network=10.10.0.27, 16.190.248.157 |
  
+--------------------------------------+---------+--------+--------------------------------------------+

  
  [root@ci-525400E87B4A ~]# nova hypervisor-show 9
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | Property             | Value                                                
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | cpu_info             | {"model": "Intel(R) Xeon(R) CPU           E5540  @ 
2.53GHz", "vendor": "HP", "topology": {"cores": 8, "threads": 16, "sockets": 
2}} |
  | current_workload     | 1                                                    
                                                                               |
  | disk_available_least | None                                                 
                                                                               |
  | free_disk_gb         | 164                                                  
                                                                               |
  | free_ram_mb          | 38556                                                
                                                                               |
  | hypervisor_hostname  | domain-c45(Cluster-3PAR-FC-ISCSI)                    
                                                                               |
  | hypervisor_type      | VMware ESXi                                          
                                                                               |
  | hypervisor_version   | 500                                                  
                                                                               |
  | id                   | 9                                                    
                                                                               |
  | local_gb             | 224                                                  
                                                                               |
  | local_gb_used        | 60                                                   
                                                                               |
  | memory_mb            | 41116                                                
                                                                               |
  | memory_mb_used       | 2560                                                 
                                                                               |
  | running_vms          | 2                                                    
                                                                               |
  | service_host         | mslsh104.mgmt.local                                  
                                                                               |
  | service_id           | 13                                                   
                                                                               |
  | vcpus                | 200                                                  
                                                                               |
  | vcpus_used           | 2                                                    
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+

  [root@ci-525400E87B4A ~]# nova list
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | ID                                   | Name    | Status | Networks          
                         |
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | cc2bbd51-6b83-40e7-b83a-54f8b1e1f6ce | esx_vm1 | ACTIVE | Private 
network=10.10.0.27, 16.190.248.157 |
  
+--------------------------------------+---------+--------+--------------------------------------------+

  [root@ci-525400E87B4A ~]# nova suspend esx_vm1

  [root@ci-525400E87B4A ~]# nova hypervisor-show 9
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | Property             | Value                                                
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | cpu_info             | {"model": "Intel(R) Xeon(R) CPU           E5540  @ 
2.53GHz", "vendor": "HP", "topology": {"cores": 8, "threads": 16, "sockets": 
2}} |
  | current_workload     | 0                                                    
                                                                               |
  | disk_available_least | None                                                 
                                                                               |
  | free_disk_gb         | 164                                                  
                                                                               |
  | free_ram_mb          | 38555                                                
                                                                               |
  | hypervisor_hostname  | domain-c45(Cluster-3PAR-FC-ISCSI)                    
                                                                               |
  | hypervisor_type      | VMware ESXi                                          
                                                                               |
  | hypervisor_version   | 500                                                  
                                                                               |
  | id                   | 9                                                    
                                                                               |
  | local_gb             | 224                                                  
                                                                               |
  | local_gb_used        | 60                                                   
                                                                               |
  | memory_mb            | 41115                                                
                                                                               |
  | memory_mb_used       | 2560                                                 
                                                                               |
  | running_vms          | 2                                                    
                                                                               |
  | service_host         | mslsh104.mgmt.local                                  
                                                                               |
  | service_id           | 13                                                   
                                                                               |
  | vcpus                | 200                                                  
                                                                               |
  | vcpus_used           | 2                                                    
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+

  [root@ci-525400E87B4A ~]# nova resume esx_vm1

  [root@ci-525400E87B4A ~]# nova list
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | ID                                   | Name    | Status | Networks          
                         |
  
+--------------------------------------+---------+--------+--------------------------------------------+
  | cc2bbd51-6b83-40e7-b83a-54f8b1e1f6ce | esx_vm1 | ACTIVE | Private 
network=10.10.0.27, 16.190.248.157 |
  
+--------------------------------------+---------+--------+--------------------------------------------+

  [root@ci-525400E87B4A ~]# nova hypervisor-show 9
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | Property             | Value                                                
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  | cpu_info             | {"model": "Intel(R) Xeon(R) CPU           E5540  @ 
2.53GHz", "vendor": "HP", "topology": {"cores": 8, "threads": 16, "sockets": 
2}} |
  | current_workload     | 0                                                    
                                                                               |
  | disk_available_least | None                                                 
                                                                               |
  | free_disk_gb         | 164                                                  
                                                                               |
  | free_ram_mb          | 38555                                                
                                                                               |
  | hypervisor_hostname  | domain-c45(Cluster-3PAR-FC-ISCSI)                    
                                                                               |
  | hypervisor_type      | VMware ESXi                                          
                                                                               |
  | hypervisor_version   | 500                                                  
                                                                               |
  | id                   | 9                                                    
                                                                               |
  | local_gb             | 224                                                  
                                                                               |
  | local_gb_used        | 60                                                   
                                                                               |
  | memory_mb            | 41115                                                
                                                                               |
  | memory_mb_used       | 2560                                                 
                                                                               |
  | running_vms          | 2                                                    
                                                                               |
  | service_host         | mslsh104.mgmt.local                                  
                                                                               |
  | service_id           | 13                                                   
                                                                               |
  | vcpus                | 200                                                  
                                                                               |
  | vcpus_used           | 2                                                    
                                                                               |
  
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to