Periodic_interval time affects cinder-scheduler service status

Bug #1802249 reported by wangwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
wangwei

Bug Description

There are a lot of volumes in my cinder-volumes, so it takes a lot of time for cinder to perform the periodic tasks.

I set the following parameters to 3600s in cinder.conf:

```
# Interval, in seconds, between running periodic tasks (integer value)
#periodic_interval = 60
```

This modification solves the problem of performing task time intervals. But there was another problem. When I restarted cinder-schulder, it only made the heartbeat after an hour to report status is up, and I could not create a volume during this time.

I debugged the code and found the reason here(cinder\cinder\service.py).

```
    def start(self):
        ...
        self.manager.init_host_with_rpc()
        ...
```
And in init_host_with_rpc function will sleep the time represented by the periodic_interval parameter:

```
    def init_host_with_rpc(self):
        print self.driver.is_ready()
        ctxt = context.get_admin_context()
        self.request_service_capabilities(ctxt)

        eventlet.sleep(CONF.periodic_interval)
        self._startup_delay = False
```

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

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

Reviewed: https://review.openstack.org/616440
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=0db593d86c2566ee24af8f29b9f2cb2b805dc682
Submitter: Zuul
Branch: master

commit 0db593d86c2566ee24af8f29b9f2cb2b805dc682
Author: wangwei <email address hidden>
Date: Thu Nov 8 16:47:57 2018 +0900

    Fix the problem of the scheduler status

    During the startup process of cinder-scheduler, the time corresponding
    to the periodic_interval parameter will be sleeped. If the value of
    this parameter is large, such as one hour, then during this period the
    cinder-scheduler is always down and the volume cannot be created.

    This patch fixes this problem.

    Change-Id: I932a725c1665add590f09fa8d26e84b79b06e159
    Closes-bug: #1802249

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 14.0.0.0rc1

This issue was fixed in the openstack/cinder 14.0.0.0rc1 release candidate.

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.