vmware ceilometer-agent-compute sample_cnt can be a float type or zero

Bug #1415307 reported by Haifeng.Yan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Haifeng.Yan
Icehouse
Fix Released
Undecided
Haifeng.Yan
Juno
Fix Released
Undecided
Unassigned

Bug Description

###################################################################
#environment:
########

root@compute01:/usr/lib/python2.7/dist-packages/ceilometer# dpkg -l | grep ceilo
ii ceilometer-agent-compute 2014.1.3-0ubuntu1 all ceilometer compute agent
ii ceilometer-common 2014.1.3-0ubuntu1 all ceilometer common files
ii python-ceilometer 2014.1.3-0ubuntu1 all ceilometer python libraries
ii python-ceilometerclient 1.0.8-0ubuntu1 all Client library for Openstack ceilometer server.
root@compute01:/usr/lib/python2.7/dist-packages/ceilometer# dpkg -l | grep oslo
ii python-oslo.config 1:1.2.1-0ubuntu2 all Common code for Openstack Projects (configuration API)
ii python-oslo.i18n 1.0.0-0ubuntu1 all Oslo Internationalization Utilities - Python 2.x
ii python-oslo.messaging 1.3.0-0ubuntu1 all oslo messaging library
ii python-oslo.rootwrap 1.2.0-0ubuntu1 all Fine filtering of shell commands as 'root'
ii python-oslo.vmware 1:0.6.0.2297411.8ee8273 all VMware library for OpenStack projects - Python 2.x

#####################################################################
#logs snippet:
#############

2015-01-28 03:39:20.583 13867 ERROR suds.client [-] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:vim25" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <ns1:Body>
      <ns0:QueryPerf>
         <ns0:_this type="PerformanceManager">PerfMgr</ns0:_this>
         <ns0:querySpec>
            <ns0:entity type="VirtualMachine">vm-324</ns0:entity>
            <ns0:maxSample>29.8906502</ns0:maxSample>
            <ns0:metricId>
               <ns0:counterId>98</ns0:counterId>
               <ns0:instance></ns0:instance>
            </ns0:metricId>
            <ns0:intervalId>20</ns0:intervalId>
         </ns0:querySpec>
      </ns0:QueryPerf>
   </ns1:Body>
</SOAP-ENV:Envelope>
2015-01-28 03:39:20.585 13867 DEBUG oslo.vmware.api [-] Fault list: [InvalidRequest] _invoke_api /usr/lib/python2.7/dist-packages/oslo/vmware/api.py:316
2015-01-28 03:39:20.586 13867 DEBUG oslo.vmware.exceptions [-] Fault InvalidRequest not matched. get_fault_class /usr/lib/python2.7/dist-packages/oslo/vmware/exceptions.py:236
2015-01-28 03:39:20.586 13867 ERROR ceilometer.compute.pollsters.memory [-] Could not get Memory Usage for 69db6ea1-44e8-48e4-825b-81dd2e078824:
Cannot parse "29.8906502" as an int value

while parsing serialized value of type int
at line 1, column 395

while parsing property "maxSample" of static type int

while parsing serialized DataObject of type vim.PerformanceManager.QuerySpec
at line 1, column 327

while parsing call information for method QueryPerf
at line 1, column 256

while parsing SOAP body
at line 1, column 246

while parsing SOAP envelope
at line 1, column 38

while parsing HTTP request for method queryStats
on object of type vim.PerformanceManager
at line 1, column 0
Cause: Server raised fault: '
Cannot parse "29.8906502" as an int value

while parsing serialized value of type int
at line 1, column 395

while parsing property "maxSample" of static type int

while parsing serialized DataObject of type vim.PerformanceManager.QuerySpec
at line 1, column 327

while parsing call information for method QueryPerf
at line 1, column 256

while parsing SOAP body
at line 1, column 246

while parsing SOAP envelope
at line 1, column 38

while parsing HTTP request for method queryStats
on object of type vim.PerformanceManager
at line 1, column 0'
Faults: [InvalidRequest]

Haifeng.Yan (yanheven)
description: updated
description: updated
Haifeng.Yan (yanheven)
Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/150758

Haifeng.Yan (yanheven)
Changed in ceilometer:
assignee: nobody → yanheven@gmail.com (yanheven)
Haifeng.Yan (yanheven)
summary: - vmware ceilometer-agent-compute coul not parse floating value for
- instance's memory usage
+ vmware ceilometer-agent-compute coul not sample_cnt can be a float type
+ of zero
Revision history for this message
Haifeng.Yan (yanheven) wrote : Re: vmware ceilometer-agent-compute coul not sample_cnt can be a float type of zero

code in Kilo and Juno:

samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
if duration else 1)

value will be 0 if 0<uration<1

code in Icehouse:

samples_cnt = (duration / VC_REAL_TIME_SAMPLING_INTERVAL if duration
else 1)

the same question as above and value will be a float type,causing problems I have metioned above.

summary: vmware ceilometer-agent-compute coul not sample_cnt can be a float type
- of zero
+ or zero
Revision history for this message
Haifeng.Yan (yanheven) wrote : Re: vmware ceilometer-agent-compute coul not sample_cnt can be a float type or zero

code in Kilo and Juno:

samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
if duration else 1)

value will be 0 if 0<(duration / VC_REAL_TIME_SAMPLING_INTERVAL)<1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/151074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/151075

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/151076

Haifeng.Yan (yanheven)
summary: - vmware ceilometer-agent-compute coul not sample_cnt can be a float type
- or zero
+ vmware ceilometer-agent-compute sample_cnt can be a float type or zero
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (master)

Change abandoned by yanheven (<email address hidden>) on branch: master
Review: https://review.openstack.org/151074
Reason: this is no problem with the current code.abandon this patch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (stable/juno)

Change abandoned by yanheven (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/151075
Reason: this is no problem with the current code.abandon this patch

Haifeng.Yan (yanheven)
summary: - vmware ceilometer-agent-compute sample_cnt can be a float type or zero
+ vmware ceilometer-agent-compute sample_cnt can be a float type
Changed in ceilometer:
status: In Progress → Confirmed
status: Confirmed → In Progress
Haifeng.Yan (yanheven)
summary: - vmware ceilometer-agent-compute sample_cnt can be a float type
+ vmware ceilometer-agent-compute sample_cnt can be a float type or zero
Revision history for this message
Haifeng.Yan (yanheven) wrote :

if duration is less than 20, and query_spec.maxSample is 0, will raise :

2015-01-30 04:32:59.765 18293 ERROR suds.client [-] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:vim25" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <ns1:Body>
      <ns0:QueryPerf>
         <ns0:_this type="PerformanceManager">PerfMgr</ns0:_this>
         <ns0:querySpec>
            <ns0:entity type="VirtualMachine">vm-324</ns0:entity>
            <ns0:maxSample>0</ns0:maxSample>
            <ns0:metricId>
               <ns0:counterId>98</ns0:counterId>
               <ns0:instance></ns0:instance>
            </ns0:metricId>
            <ns0:intervalId>20</ns0:intervalId>
         </ns0:querySpec>
      </ns0:QueryPerf>
   </ns1:Body>
</SOAP-ENV:Envelope>
2015-01-30 04:32:59.768 18293 DEBUG oslo.vmware.api [-] Fault list: [InvalidArgument] _invoke_api /usr/lib/python2.7/dist-packages/oslo/vmware/api.py:316
2015-01-30 04:32:59.768 18293 DEBUG oslo.vmware.exceptions [-] Fault InvalidArgument not matched. get_fault_class /usr/lib/python2.7/dist-packages/oslo/vmware/exceptions.py:236
2015-01-30 04:32:59.769 18293 ERROR ceilometer.compute.pollsters.memory [-] Could not get Memory Usage for 69db6ea1-44e8-48e4-825b-81dd2e078824: A specified parameter was not correct.
querySpec.maxSample
Cause: Server raised fault: 'A specified parameter was not correct.
querySpec.maxSample'
Faults: [InvalidArgument]
Details: {'invalidProperty': 'querySpec.maxSample'}

Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → kilo-3
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/151074
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=53fe9976cc48c3c301b74044bae6c23b8dbb1d63
Submitter: Jenkins
Branch: master

commit 53fe9976cc48c3c301b74044bae6c23b8dbb1d63
Author: yanheven <email address hidden>
Date: Thu Jan 29 10:18:09 2015 +0800

    fix the value of query_spec.maxSample to advoid to be zero

    code before:
    VC_REAL_TIME_SAMPLING_INTERVAL = 20

    samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
    if duration else 1)
    query_spec.maxSample = samples_cnt

    if we set the value of "interval" in /etc/ceilometer/pipline.yaml to less
    than 20,the value of "query_spec.maxSample" will be 0,which will cause
    problem when use it to send request to vsphere server

    Change-Id: Ibdb586109fe5334f3080539a40ff92badead837b
    Closes-Bug:#1415307

Changed in ceilometer:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/154444

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/154510

Haifeng.Yan (yanheven)
no longer affects: ceilometer (Ubuntu)
Revision history for this message
Haifeng.Yan (yanheven) wrote :

Eoghan Glynn (eglynn) this bug also affect Icehouse and Juno.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (stable/icehouse)

Change abandoned by yanheven (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/150758

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (stable/juno)

Change abandoned by yanheven (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/151075
Reason: cherry-pick from kilo,review here https://review.openstack.org/#/c/154444/
abandon this one.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (stable/icehouse)

Change abandoned by Alan Pevec (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/151076
Reason: Please resubmit with master change-id

https://wiki.openstack.org/wiki/StableBranch#Change-Ids

Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Revision history for this message
Haifeng.Yan (yanheven) wrote :

hi @Thierry Carrez (ttx) ,this bug also affects Icehouse and Juno.

Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-3 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/juno)

Reviewed: https://review.openstack.org/154444
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=0f82c4376f6e6f3db02b3acd1eeb136d844ea87d
Submitter: Jenkins
Branch: stable/juno

commit 0f82c4376f6e6f3db02b3acd1eeb136d844ea87d
Author: yanheven <email address hidden>
Date: Thu Jan 29 10:18:09 2015 +0800

    fix the value of query_spec.maxSample to advoid to be zero

    code before:
    VC_REAL_TIME_SAMPLING_INTERVAL = 20

    samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
    if duration else 1)
    query_spec.maxSample = samples_cnt

    if we set the value of "interval" in /etc/ceilometer/pipline.yaml to less
    than 20,the value of "query_spec.maxSample" will be 0,which will cause
    problem when use it to send request to vsphere server

    Change-Id: Ibdb586109fe5334f3080539a40ff92badead837b
    Closes-Bug:#1415307
    (cherry picked from commit 53fe9976cc48c3c301b74044bae6c23b8dbb1d63)

tags: added: in-stable-juno
tags: added: in-stable-icehouse
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/icehouse)

Reviewed: https://review.openstack.org/154510
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=04b66db74e5ef76880c3b66cc674dfa1d32e05a0
Submitter: Jenkins
Branch: stable/icehouse

commit 04b66db74e5ef76880c3b66cc674dfa1d32e05a0
Author: yanheven <email address hidden>
Date: Thu Jan 29 10:18:09 2015 +0800

    fix the value of query_spec.maxSample to advoid to be zero

    code before:
    VC_REAL_TIME_SAMPLING_INTERVAL = 20

    samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
    if duration else 1)
    query_spec.maxSample = samples_cnt

    if we set the value of "interval" in /etc/ceilometer/pipline.yaml to less
    than 20,the value of "query_spec.maxSample" will be 0,which will cause
    problem when use it to send request to vsphere server

    Change-Id: Ibdb586109fe5334f3080539a40ff92badead837b
    Closes-Bug:#1415307
    (cherry picked from commit 53fe9976cc48c3c301b74044bae6c23b8dbb1d63)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.