Remove set_time_override in timeutils

Bug #1266962 reported by Zhongyue Luo
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
ZhiQiang Fan
Cinder
Fix Released
Undecided
Zhongyue Luo
Glance
Fix Released
Low
Ian Cordasco
Ironic
Fix Released
Low
Unassigned
OpenStack Compute (nova)
Fix Released
Wishlist
Unassigned
OpenStack Heat
Triaged
Low
Unassigned
OpenStack Identity (keystone)
Fix Released
Low
Unassigned
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Zhongyue Luo
Sahara
Invalid
Undecided
zhangyangyang
gantt
New
Undecided
Unassigned
neutron
Fix Released
Undecided
Tuan
oslo.messaging
Fix Released
Low
Zhongyue Luo
oslo.utils
Triaged
Low
Unassigned
python-keystoneclient
Fix Released
Low
Zhongyue Luo
python-novaclient
Fix Released
Undecided
Zhongyue Luo
rack
In Progress
Undecided
zhangyangyang
tuskar
Fix Released
Low
Zhongyue Luo
zaqar
Fix Released
Low
Flavio Percoco

Bug Description

set_time_override was written as a helper function to mock utcnow in unittests.

However we now use mock or fixture to mock our objects so set_time_override has become obsolete.

We should first remove all usage of set_time_override from downstream projects before deleting it from oslo.

List of attributes and functions to be removed from timeutils:
* override_time
* set_time_override()
* clear_time_override()
* advance_time_delta()
* advance_time_seconds()

Revision history for this message
John Griffith (john-griffith) wrote :

I'm not crazy about this approach of making changes throughout the project; updating all of the projects and then removing the wrapper in oslo, then updating the libs in all of the projects again is really something that should not be a top priority.

I do however think that the usage should be allowed to fall off naturally as other efforts are made to update to using mock, once that's done we should eventually just find that this wrapper is no longer needed and remove it from oslo at that time.

Changed in cinder:
status: New → Invalid
Revision history for this message
Joe Gordon (jogo) wrote :

I agree with John, this hardly seems worth the patches and churn

Revision history for this message
Zhongyue Luo (zyluo) wrote :

John, Joe,

This is one of the graduation conditions which came up at the summit. This is not urgent and will be a long time goal for timeutils.

Revision history for this message
Zhongyue Luo (zyluo) wrote :
Changed in python-novaclient:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Kurt Griffiths (kgriffs)
Changed in marconi:
importance: Undecided → Low
milestone: none → icehouse-3
status: New → Triaged
Changed in python-keystoneclient:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Revision history for this message
Zhongyue Luo (zyluo) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

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

Changed in oslo.messaging:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Changed in tuskar:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Revision history for this message
Zhongyue Luo (zyluo) wrote :
Changed in tuskar:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tuskar (master)

Reviewed: https://review.openstack.org/65832
Committed: https://git.openstack.org/cgit/openstack/tuskar/commit/?id=42c676194d9800719a356e4b6452e65b289e64c9
Submitter: Jenkins
Branch: master

commit 42c676194d9800719a356e4b6452e65b289e64c9
Author: Zhongyue Luo <email address hidden>
Date: Fri Jan 10 08:16:56 2014 +0800

    Removes unused TimeOverride class

    The class TimeOverride is currently not used anywhere in the codebase.
    Also set_time_override function is planned to be removed for
    incubation graduation. Using mock or fixtures to mock utcnow is preferred.

    Change-Id: I007bdd8ffe7ed37d02f6f6077dc572ef95a2a072
    Partial-Bug: #1266962

Zhongyue Luo (zyluo)
Changed in tuskar:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
Changed in oslo.messaging:
importance: Undecided → Low
Changed in oslo:
importance: Undecided → Low
status: New → Triaged
Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
tags: added: oslo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/65724
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=765e43bb51fce98d411010723f82094fadb399a0
Submitter: Jenkins
Branch: master

commit 765e43bb51fce98d411010723f82094fadb399a0
Author: Zhongyue Luo <email address hidden>
Date: Fri Jan 10 01:56:15 2014 +0900

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Partial-Bug: #1266962

    Change-Id: I56935911a08ccd9847419eb118af2d2c9dd6c1cd

Zhongyue Luo (zyluo)
Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/65841
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=d3f3fd775916b9e93aacdc55af54870eea282fee
Submitter: Jenkins
Branch: master

commit d3f3fd775916b9e93aacdc55af54870eea282fee
Author: Zhongyue Luo <email address hidden>
Date: Fri Jan 10 09:07:16 2014 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I9a0727edab12ccd5f1e4eb4f5f62d588f5a0faee
    Partial-Bug: #1266962

Zhongyue Luo (zyluo)
Changed in oslo.messaging:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in python-keystoneclient:
importance: Undecided → Low
milestone: none → 0.4.2
Changed in ironic:
assignee: nobody → Mikhail Durnosvistov (mdurnosvistov)
importance: Undecided → Low
status: New → In Progress
Changed in oslo.messaging:
milestone: none → icehouse-2
Feilong Wang (flwang)
Changed in glance:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to oslo-incubator (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/67484

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/65602
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=c71131a50994d95ae869442fc25e7c3511a5ddbc
Submitter: Jenkins
Branch: master

commit c71131a50994d95ae869442fc25e7c3511a5ddbc
Author: Zhongyue Luo <email address hidden>
Date: Thu Jan 9 10:24:34 2014 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I809825560b0324498010bd93aa1ceef552554375
    Partial-Bug: #1266962

Zhongyue Luo (zyluo)
Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in keystone:
assignee: nobody → Mikhail Durnosvistov (mdurnosvistov)
status: New → In Progress
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/67826

ZhiQiang Fan (aji-zqfan)
Changed in glance:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Changed in ceilometer:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
status: New → In Progress
Changed in nova:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/67484
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=70ebb197a112bbc832bf8528b69dcfc164288539
Submitter: Jenkins
Branch: master

commit 70ebb197a112bbc832bf8528b69dcfc164288539
Author: Roman Podoliaka <email address hidden>
Date: Fri Jan 17 16:26:24 2014 +0200

    Fix mocking of utcnow() for model datetime cols

    Now when we are going to deprecate timeutils.set_time_override()
    and use mock instead, it easy to hit the following gotcha: when
    testr does tests discovering, it imports all modules within a given
    directory and it might happen that common.db.sqlalchemy.models
    is imported before timeutils.utcnow() is mocked in a test case.
    In this case the SQLAlchemy model will save the reference to the
    original timeutils.utcnow() function, which will be called later
    when the model will be saved to a DB, if created_at or updated_at
    value aren't provided.

    In order to overcome this we can defer resolution of timeutils.utcnow
    reference by passing lambda functions to SA Column __init__().

    Related-Bug: #1266962

    Change-Id: I7adce90eacb4a3f334d77da7b4a176c31ff818ed

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

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

ZhiQiang Fan (aji-zqfan)
Changed in nova:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Changed in nova:
assignee: nobody → Mikhail Durnosvistov (mdurnosvistov)
importance: Undecided → Low
Changed in tuskar:
status: Fix Committed → Fix Released
Changed in marconi:
assignee: nobody → Flavio Percoco (flaper87)
status: Triaged → In Progress
Thierry Carrez (ttx)
Changed in oslo.messaging:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/68365
Committed: https://git.openstack.org/cgit/openstack/marconi/commit/?id=0d0694d7020cc98daaeb1e88592aa6d603e1a5a6
Submitter: Jenkins
Branch: master

commit 0d0694d7020cc98daaeb1e88592aa6d603e1a5a6
Author: Flavio Percoco <email address hidden>
Date: Wed Jan 22 13:39:00 2014 +0100

    Don't use `override_time` but mock instead

    Closes-bug: #1266962

    We're moving away from using the set_override_time function in
    timeutils. The right way to do it should be by using mock.

    Change-Id: Ic69c5c5d66cb39d668015c368add10b108684549

Changed in marconi:
status: In Progress → Fix Committed
Changed in nova:
status: Triaged → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit ef3cc9c63549496c68ed49b6ca236a65e71fde3f
Author: ZhiQiang Fan <email address hidden>
Date: Mon Jan 20 21:05:25 2014 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I7c3793d7a442dc85aec405041c3c9ce6f7503bd8
    Closes-Bug: #1266962

Changed in ceilometer:
status: In Progress → Fix Committed
Changed in nova:
assignee: Mikhail Durnosvistov (mdurnosvistov) → nobody
status: In Progress → Triaged
Changed in ironic:
assignee: Mikhail Durnosvistov (mdurnosvistov) → Devananda van der Veen (devananda)
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
Changed in ironic:
assignee: Devananda van der Veen (devananda) → Mikhail Durnosvistov (mdurnosvistov)
Revision history for this message
Julien Danjou (jdanjou) wrote :

There's a use case that is covered by this function that won't work with mock.

SQLAlchemy models can use something like a default value for colum with default=<func>. If <func> is set to datetime.datetime.utcnow, then it will be used to generate a default value. And no mocking can change that since the reference is already copied into the SQLAlchemy object – it's done at import time of our model module.

Here the time overriding mechanism is useful, since we can use default=timeutils.utcnow and use the override value to trick SQLAlchemy when it will call that function.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

FTR, in today's Oslo meeting bnemec suggested moving the mock-able time function into the oslo.db library so it can be used for the case Julien points out, and so that it is clear that it should only be used for that case.

Revision history for this message
Zhongyue Luo (zyluo) wrote :

I believe this patch should solve the time mocking for sa, no?

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

gordon chung (chungg)
Changed in ceilometer:
milestone: none → icehouse-3
Zhongyue Luo (zyluo)
Changed in cinder:
assignee: nobody → Zhongyue Luo (zyluo)
status: Invalid → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Zhongyue Luo (zyluo)
Changed in nova:
assignee: nobody → Zhongyue Luo (zyluo)
Zhongyue Luo (zyluo)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
assignee: nobody → Zhongyue Luo (zyluo)
status: Triaged → In Progress
Zhongyue Luo (zyluo)
Changed in manila:
assignee: nobody → Zhongyue Luo (zyluo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: New → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

Just blocked https://review.openstack.org/#/c/67857/ as it looks like we need an alternative to advance_time_seconds() before removing set_time_override().

Revision history for this message
Zhongyue Luo (zyluo) wrote :

Dolph,

advance_time_seconds does not need an alternative since we can just change the mock value for utcnow()

see https://review.openstack.org/#/c/72200/4/tests/unit/test_periodic.py

Changed in keystone:
assignee: Mikhail Durnosvistov (mdurnosvistov) → Zhongyue Luo (zyluo)
Zhongyue Luo (zyluo)
Changed in glance:
assignee: ZhiQiang Fan (aji-zqfan) → Zhongyue Luo (zyluo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Triaged → In Progress
Changed in keystone:
assignee: Zhongyue Luo (zyluo) → Mikhail Durnosvistov (mdurnosvistov)
Changed in gantt:
assignee: nobody → Mikhail Durnosvistov (mdurnosvistov)
Changed in ironic:
assignee: Mikhail Durnosvistov (mdurnosvistov) → Roman Prykhodchenko (romcheg)
Changed in ironic:
assignee: Roman Prykhodchenko (romcheg) → Mikhail Durnosvistov (mdurnosvistov)
Changed in nova:
status: Triaged → In Progress
Changed in gantt:
assignee: Mikhail Durnosvistov (mdurnosvistov) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/72864
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=ce2ac6901d8d147dbe39f0d360cdeec268257637
Submitter: Jenkins
Branch: master

commit ce2ac6901d8d147dbe39f0d360cdeec268257637
Author: Zhongyue Luo <email address hidden>
Date: Wed Feb 12 15:45:44 2014 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: Ida9b5b0130a38f45e1f51bf4fbdb1d1a5851cf82
    Partial-Bug: #1266962

Changed in manila:
milestone: none → icehouse-3
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/67432
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=db142161598941330e7563d32fae41ef8867dadb
Submitter: Jenkins
Branch: master

commit db142161598941330e7563d32fae41ef8867dadb
Author: Mikhail Durnosvistov <email address hidden>
Date: Fri Jan 17 06:30:09 2014 -0500

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: Ibcf6d4abee4a52bc459fc322e6a5268d39d70450
    Partial-Bug: #1266962

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

Reviewed: https://review.openstack.org/71737
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e3eb709b08e52e24cd7e3225a73154efc62ba9fa
Submitter: Jenkins
Branch: master

commit e3eb709b08e52e24cd7e3225a73154efc62ba9fa
Author: Zhongyue Luo <email address hidden>
Date: Fri Feb 7 12:43:58 2014 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I057d4bc3a8b1d4e96e6830cd3071dc96a05496dc
    Partial-Bug: #1266962

Zhongyue Luo (zyluo)
Changed in cinder:
status: In Progress → Fix Committed
Changed in ironic:
status: In Progress → Fix Committed
Revision history for this message
melanie witt (melwitt) wrote :

novaclient 2.16.0 released on 2/26/2014

Changed in python-novaclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
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/78833

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to marconi (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/78847

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/78848

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to marconi (master)

Reviewed: https://review.openstack.org/78847
Committed: https://git.openstack.org/cgit/openstack/marconi/commit/?id=0d0f3b34c0cbef90eb19686bb9c00c413f1e17b0
Submitter: Jenkins
Branch: master

commit 0d0f3b34c0cbef90eb19686bb9c00c413f1e17b0
Author: Zhongyue Luo <email address hidden>
Date: Fri Mar 7 11:29:47 2014 +0800

    Remove unused method from timeutils

    Marconi no longer uses set_time_override. Therefore there is no need to
    invoke clear_time_override anymore.

    Change-Id: Ifa5c6ab958130b2edbce57780fe6462ebfc37409
    Related-Bug: #1266962

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

Reviewed: https://review.openstack.org/67857
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=f356607a955a30c59ce7990e06432795a43c767b
Submitter: Jenkins
Branch: master

commit f356607a955a30c59ce7990e06432795a43c767b
Author: Mikhail Durnosvistov <email address hidden>
Date: Mon Jan 20 10:03:37 2014 -0500

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I1af631f36c813740dbf22da030c2c1f50265d156
    Partial-Bug: #1266962

Zhongyue Luo (zyluo)
Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic (master)

Reviewed: https://review.openstack.org/78848
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=ebd9e9bbaf14c8b7096d5671c95faf2baed585ea
Submitter: Jenkins
Branch: master

commit ebd9e9bbaf14c8b7096d5671c95faf2baed585ea
Author: Zhongyue Luo <email address hidden>
Date: Fri Mar 7 11:34:09 2014 +0800

    Remove unused method from timeutils

    Ironic no longer uses set_time_override. Therefore there is no need to
    invoke clear_time_override anymore.

    Change-Id: I502d7bb6bd22b9ad9239cd78c80938d5925347d2
    Related-Bug: #1266962

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

Reviewed: https://review.openstack.org/73168
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=ed52d4538c5a7601bc5d0d1b6c4769eb9ed65653
Submitter: Jenkins
Branch: master

commit ed52d4538c5a7601bc5d0d1b6c4769eb9ed65653
Author: Zhongyue Luo <email address hidden>
Date: Thu Feb 13 15:44:50 2014 +0900

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I203f7369943b948e0462becbddcba65b2d1576f0
    Partial-Bug: #1266962

Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/78833
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=5722c168f8b05d516b31c3717d0315741388eb54
Submitter: Jenkins
Branch: master

commit 5722c168f8b05d516b31c3717d0315741388eb54
Author: Zhongyue Luo <email address hidden>
Date: Fri Mar 7 08:41:58 2014 +0800

    Removes direct access of timeutils.override_time

    The attribute "override_time" is a private attribute which
    should only be set through "timeutils.set_time_override()".
    There are a number of places in Ceilometer which the override_time
    attribute is set directly and such behavior should be prohibited.

    However the "set_time_override()" function along with "override_time"
    in timeutils is planned to be removed, therefore we no longer
    need to use it.

    Change-Id: I6f3a5e0bb4e4c448f369dd5ead0e1525fd2262e6
    Related-Bug: #1266962

Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-rc1 → 2014.1
Thierry Carrez (ttx)
Changed in oslo.messaging:
milestone: icehouse-2 → 1.3.0
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-3 → 2014.1
no longer affects: oslo-incubator
Changed in oslo.utils:
importance: Undecided → Low
status: New → Confirmed
Changed in nova:
assignee: Zhongyue Luo (zyluo) → Mike Durnosvistov (mdurnosvistov)
milestone: none → kilo-1
ZhiQiang Fan (aji-zqfan)
Changed in oslo.utils:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Changed in oslo.utils:
status: Confirmed → In Progress
Revision history for this message
Ian Cordasco (icordasc) wrote :

It is not entirely clear to me that this was either entirely fixed in Glance or not, so I'm going to look into it. In the meantime zyluo didn't seem to be working on it.

Changed in glance:
assignee: Zhongyue Luo (zyluo) → Ian Cordasco (icordasc)
status: In Progress → Triaged
Revision history for this message
Ian Cordasco (icordasc) wrote :

This was entirely fixed by Zhongyue Luo. All references to the attributes and functions to be removed from timeutils exist solely in the timeutils module in Glance.

Changed in glance:
status: Triaged → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → kilo-2
Michael Still (mikal)
Changed in nova:
milestone: kilo-2 → none
status: In Progress → New
Sean Dague (sdague)
Changed in nova:
importance: Low → Wishlist
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Joe Gordon (<email address hidden>) on branch: master
Review: https://review.openstack.org/137383
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup

Solving an inconsistency: The bug is 'In Progress' but without an assignee. I set the status back to the last known status before the change to 'In Progress'.

Feel free to assign the bug to yourself. If you do so, please set it to 'In Progress'.

Changed in nova:
status: In Progress → Confirmed
Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
ZhiQiang Fan (aji-zqfan)
Changed in oslo.utils:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
status: In Progress → New
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → Tuan (tuanla)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/394779
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5805a075b55a9f7faec8d17ed6840ca94b5d5c39
Submitter: Jenkins
Branch: master

commit 5805a075b55a9f7faec8d17ed6840ca94b5d5c39
Author: Luong Anh Tuan <email address hidden>
Date: Tue Nov 8 13:24:55 2016 +0700

    Remove timeutils.clear_time_override in neutron

    The clear_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I7baa623fd71a7d03acc61dd1f18287bb654539cd
    Partial-Bug: #1266962

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

Reviewed: https://review.openstack.org/397621
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=d111600753ce7c1bfa8b1ad1c8e0ddf908555abc
Submitter: Jenkins
Branch: master

commit d111600753ce7c1bfa8b1ad1c8e0ddf908555abc
Author: Dao Cong Tien <email address hidden>
Date: Tue Nov 15 16:42:27 2016 +0700

    Remove use of timeutils.set_time_override

    As timeutils.set_time_override() was created to mock utcnow
    before 'mock' was generally used, now we should remove it.

    Change-Id: I8257a969c14e438a10cf79fa300a18ae3f0128c3
    Partial-Bug: #1266962

tags: added: neutron-proactive-backport-potential
Changed in keystonemiddleware:
assignee: nobody → zhangyangyang (zhangyangyang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/504346

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/504390

Changed in heat:
assignee: nobody → zhangyangyang (zhangyangyang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/504320
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=902a66e53d29101a23c541c8b1090a33b8d89fb0
Submitter: Jenkins
Branch: master

commit 902a66e53d29101a23c541c8b1090a33b8d89fb0
Author: zhangyangyang <email address hidden>
Date: Fri Sep 15 11:25:18 2017 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: Ibbdae2ba60f3d706eba59d8af13cf7ee9acfae23
    Closes-Bug:#1266962

Changed in rack:
assignee: nobody → zhangyangyang (zhangyangyang)
status: New → In Progress
Changed in sahara:
assignee: nobody → zhangyangyang (zhangyangyang)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit b263fb17b7fb613811bd80053a4d82eb7bb801d8
Author: zhangyangyang <email address hidden>
Date: Sun Sep 17 22:15:00 2017 +0800

    Removes use of timeutils.set_time_override

    The set_time_override function in timeutils was written as a
    helper function to mock utcnow for unittests before 'mock' was
    generally used. Now that we have mock and fixture, we no longer
    need to use it.

    Change-Id: I8106c27dd839e71fa0e5140f77b098a8872999b8
    Closes-Bug:#1266962

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by zhangyangyang (<email address hidden>) on branch: master
Review: https://review.openstack.org/504346

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by zhangyangyang (<email address hidden>) on branch: master
Review: https://review.openstack.org/504390

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystonemiddleware (master)

Change abandoned by zhangyangyang (<email address hidden>) on branch: master
Review: https://review.openstack.org/504323

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on sahara (master)

Change abandoned by zhangyangyang (<email address hidden>) on branch: master
Review: https://review.openstack.org/504773

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 6.0.0.0b1

This issue was fixed in the openstack/manila 6.0.0.0b1 development milestone.

Changed in sahara:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer 10.0.0

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

Zane Bitter (zaneb)
Changed in heat:
assignee: zhangyangyang (zhangyangyang) → nobody
importance: Undecided → Low
status: In Progress → Triaged
Ben Nemec (bnemec)
Changed in oslo.utils:
status: New → Triaged
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

removed keystonemiddleware as LP will timeout when trying to update.

no longer affects: keystonemiddleware
Changed in neutron:
status: In Progress → Fix Released
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.