← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1595369] [NEW] no spacing configuration for schedule _expire_reservations

 

Public bug reported:

Description
===========
in schedule/manager.py
The task _expire_reservations did not have a control for the schedule time.
The default would be 60s.
And we need a parameter to disable the task or to control the interval time for schedules.


Steps to reproduce
==================
In the latest source code:

    @periodic_task.periodic_task
    def _expire_reservations(self, context):
        QUOTAS.expire(context)

    @periodic_task.periodic_task(spacing=CONF.scheduler_driver_task_period,
                                 run_immediately=True)
    def _run_periodic_tasks(self, context):
        self.driver.run_periodic_tasks(context)


Expected result
===============
we need to control the time for the schedule of _expire_reservations

Actual result
=============
The schedule run as 60s per time. And even if we set the parameter scheduler_driver_task_period to 60000, it would still run every time.

Environment
===========
1. Exact version of OpenStack you are running. See the following
  list for all releases: http://docs.openstack.org/releases/

   If this is from a distro please provide
dpkg -l | grep nova
ii  nova-api                            2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - API frontend
ii  nova-cert                           2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - certificate management
ii  nova-common                         2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - common files
ii  nova-compute                        2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node base
ii  nova-compute-kvm                    2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node (KVM)
ii  nova-compute-libvirt                2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node libvirt support
ii  nova-conductor                      2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - conductor service
ii  nova-consoleauth                    2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - Console Authenticator
ii  nova-novncproxy                     2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - NoVNC proxy
ii  nova-scheduler                      2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - virtual machine scheduler
ii  python-nova                         2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute Python libraries
ii  python-novaclient                   2:2.30.1-1~cloud0                     all          client library for OpenStack Compute API

2. Which hypervisor did you use?
KVM

2. Which storage type did you use?
LVM

3. Which networking type did you use?
Neutron with OpenVSwitch

Logs & Configs
==============
2016-06-23 10:35:01.714 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:35:12.427 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:36:01.715 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:36:12.428 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:37:01.715 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:37:14.419 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:38:02.714 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2016-06-23 10:38:14.419 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213

Thanks.

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  no spacing configuration for schedule _expire_reservations

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  in schedule/manager.py
  The task _expire_reservations did not have a control for the schedule time.
  The default would be 60s.
  And we need a parameter to disable the task or to control the interval time for schedules.

  
  Steps to reproduce
  ==================
  In the latest source code:

      @periodic_task.periodic_task
      def _expire_reservations(self, context):
          QUOTAS.expire(context)

      @periodic_task.periodic_task(spacing=CONF.scheduler_driver_task_period,
                                   run_immediately=True)
      def _run_periodic_tasks(self, context):
          self.driver.run_periodic_tasks(context)

  
  Expected result
  ===============
  we need to control the time for the schedule of _expire_reservations

  Actual result
  =============
  The schedule run as 60s per time. And even if we set the parameter scheduler_driver_task_period to 60000, it would still run every time.

  Environment
  ===========
  1. Exact version of OpenStack you are running. See the following
    list for all releases: http://docs.openstack.org/releases/

     If this is from a distro please provide
  dpkg -l | grep nova
  ii  nova-api                            2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - API frontend
  ii  nova-cert                           2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - certificate management
  ii  nova-common                         2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - common files
  ii  nova-compute                        2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node base
  ii  nova-compute-kvm                    2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node (KVM)
  ii  nova-compute-libvirt                2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - compute node libvirt support
  ii  nova-conductor                      2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - conductor service
  ii  nova-consoleauth                    2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - Console Authenticator
  ii  nova-novncproxy                     2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - NoVNC proxy
  ii  nova-scheduler                      2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute - virtual machine scheduler
  ii  python-nova                         2:12.0.3-0ubuntu1~cloud0              all          OpenStack Compute Python libraries
  ii  python-novaclient                   2:2.30.1-1~cloud0                     all          client library for OpenStack Compute API

  2. Which hypervisor did you use?
  KVM

  2. Which storage type did you use?
  LVM

  3. Which networking type did you use?
  Neutron with OpenVSwitch

  Logs & Configs
  ==============
  2016-06-23 10:35:01.714 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:35:12.427 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:36:01.715 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:36:12.428 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:37:01.715 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:37:14.419 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:38:02.714 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
  2016-06-23 10:38:14.419 112316 DEBUG oslo_service.periodic_task [req-0167a2d5-0dd2-44e7-82b6-8907dc0b4c0b - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213

  Thanks.

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


Follow ups