You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/07 12:17:10 UTC

[jira] [Commented] (CLOUDSTACK-9113) Vm stats can not be updated if one vm has inconsistent state between KVM and db

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15044776#comment-15044776 ] 

ASF GitHub Bot commented on CLOUDSTACK-9113:
--------------------------------------------

GitHub user ustcweizhou opened a pull request:

    https://github.com/apache/cloudstack/pull/1181

    CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats

    on KVM, if there is a vm has inconsistent state between hypervisor and db, the getVmStat will terminate and return nothing, all vm stats will not be updated.
    we should skip the vm which has inconsistent state, and continue on others.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ustcweizhou/cloudstack CLOUDSTACK-9113-getVmStats

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1181.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1181
    
----
commit 24edf1c1e4892b2f34b334b6e6fa13364bc413e2
Author: Wei Zhou <w....@tech.leaseweb.com>
Date:   2015-12-07T11:02:43Z

    CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats

----


> Vm stats can not be updated if one vm has inconsistent state between KVM and db
> -------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9113
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9113
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Wei Zhou
>            Assignee: Wei Zhou
>
> on KVM, if there is a vm has inconsistent state between hypervisor and db, the getVmStat will terminate and return nothing, all vm stats will not be updated.
> 2015-12-07 11:24:25,711 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:null) Processing command: com.cloud.agent.api.GetVmStatsCommand
> 2015-12-07 11:24:25,711 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Looking for libvirtd connection at: qemu:///system
> 2015-12-07 11:24:25,729 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Looking for libvirtd connection at: qemu:///system
> 2015-12-07 11:24:25,746 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Looking for libvirtd connection at: qemu:///system
> 2015-12-07 11:24:25,748 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Can not find KVM connection for Instance: i-2-7563-VM, continuing.
> 2015-12-07 11:24:25,748 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Looking for libvirtd connection at: lxc:///
> 2015-12-07 11:24:25,750 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Can not find LXC connection for Instance: i-2-7563-VM, continuing.
> 2015-12-07 11:24:25,750 WARN  [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Can not find a connection for Instance i-2-7563-VM. Assuming the default connection.
> 2015-12-07 11:24:25,750 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-3:null) Looking for libvirtd connection at: qemu:///system
> 2015-12-07 11:24:25,752 DEBUG [resource.wrapper.LibvirtGetVmStatsCommandWrapper] (agentRequest-Handler-3:null) Can't get vm stats: org.libvirt.LibvirtException: Domain not found: no domain with matching name 'i-2-7563-VM'
> 2015-12-07 11:24:25,819 DEBUG [cloud.agent.Agent] (agentRequest-Handler-5:null) Processing command: com.cloud.agent.api.GetHostStatsCommand
> 2015-12-07 11:24:26,037 DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) Processing command: com.cloud.agent.api.GetStorageStatsCommand
> we should skip the vm which has inconsistent state, and continue on others.
> how to reproduce:
> (1) start a vm
> (2) 'virsh destroy' the vm
> (3) check the agent.log (notice the vm.stats.intervel in global configuruation)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)