The version of oslo.utils not matched between requirements.txt and code

Bug #1556469 reported by kobayashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Undecided
Unassigned
Kilo
Fix Released
Critical
zhengyue

Bug Description

After installing ceilometer agents, they cannot get resources.
At this time, I configured environment by devstack. The branch is origin/stable/kilo.

Heres are errors at the periodic discovering task.

2016-03-12 17:12:56.563 19548 ERROR ceilometer.agent.base [-] Unable to discover resources: utcnow() takes no arguments (1 given)
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base Traceback (most recent call last):
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base File "/opt/stack/ceilometer/ceilometer/agent/base.py", line 346, in discover
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base discovered = discoverer.discover(self, param)
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base File "/opt/stack/ceilometer/ceilometer/compute/discovery.py", line 48, in discover
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base self.last_run = timeutils.utcnow(True)
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base TypeError: utcnow() takes no arguments (1 given)
2016-03-12 17:12:56.563 19548 TRACE ceilometer.agent.base

kobayashi (abok-1k)
affects: aodh → ceilometer
Changed in ceilometer:
assignee: nobody → Keiichi Kobayashi (abok-1k)
description: updated
kobayashi (abok-1k)
Changed in ceilometer:
assignee: Keiichi Kobayashi (abok-1k) → nobody
Revision history for this message
Qichen Hao (adsl123gg2008) wrote :

edit the code 'self.last_run = timeutils.utcnow(True)' with 'self.last_run = timeutils.utcnow()'

Changed in ceilometer:
assignee: nobody → Qichen Hao (adsl123gg2008)
assignee: Qichen Hao (adsl123gg2008) → nobody
Revision history for this message
zhengyue (zhengyue-5) wrote :

I think this error is caused by that lib:'oslo.utils' version does not match.
This version limit: 'oslo.utils!=1.4.1,<1.5.0,>=1.4.0 # Apache-2.0' at requirements.txt of ceilometer project,
the function: utcnow has no arguments at limited versions.
So you would update version of oslo.utils by commands:
    sudo pip install oslo.utils==1.6.0

zhengyue (zhengyue-5)
summary: - Unable to discover resources
+ The version of oslo.utils not matched between requirements.txt and code
Changed in ceilometer:
assignee: nobody → zhengyue (zhengyue-5)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/292274

gordon chung (chungg)
Changed in ceilometer:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/kilo)

Reviewed: https://review.openstack.org/292274
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=be0ff9537d91acd9b2fc28a37c8ac0e2d3446978
Submitter: Jenkins
Branch: stable/kilo

commit be0ff9537d91acd9b2fc28a37c8ac0e2d3446978
Author: Zheng Yue <email address hidden>
Date: Mon Mar 14 17:35:01 2016 +0800

    Fix arguments error at call timeutils.utcnow

    The function: timeutils.utcnow at oslo.utils which libary has limited
    versions: !=1.4.1,<1.5.0,>=1.4.0, it has no arguments. But call at
    compute/discovery.py passing a argument, it will throw TypeError.

    Change-Id: I59817f163b882d677c7105bec9b1d8c3c57e5c5a
    Closes-Bug: 1556469

zhengyue (zhengyue-5)
Changed in ceilometer:
status: Invalid → Fix Committed
ZhiQiang Fan (aji-zqfan)
Changed in ceilometer:
status: Fix Committed → Invalid
assignee: zhengyue (zhengyue-5) → nobody
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/ceilometer 2015.1.4

This issue was fixed in the openstack/ceilometer 2015.1.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/ceilometer 2015.1.4 release.

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.