yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #09352
[Bug 1276883] [NEW] Servicegroup drivers pass report_interval as initial_delay to report timer
Public bug reported:
This behavior has existed since at least the Folsom release and I think
has potential to confuse users (it confused me). The nasty code (IMO) is
that we use the configured report_interval as the initial_delay to start
our service report timer. Ie.:
def join(self, member_id, group_id, service=None):
"""Join the given service with it's group."""
msg = _('DB_Driver: join new ServiceGroup member %(member_id)s to '
'the %(group_id)s group, service = %(service)s')
LOG.debug(msg, {'member_id': member_id, 'group_id': group_id,
'service': service})
if service is None:
raise RuntimeError(_('service is a mandatory argument for DB based'
' ServiceGroup driver'))
report_interval = service.report_interval
if report_interval:
service.tg.add_timer(report_interval, self._report_state,
report_interval, service)
In my opinion, when a user starts a service, they expect it to be
available immediately and will suspect that there are other problems if
the report_interval is set to a larger value. Again, in my opinion,
there are use cases for setting a larger report interval. So we should
not use report_interval for the initial_delay. Instead we should a
reasonable value, such as 5 seconds or so.
** 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/1276883
Title:
Servicegroup drivers pass report_interval as initial_delay to report
timer
Status in OpenStack Compute (Nova):
New
Bug description:
This behavior has existed since at least the Folsom release and I
think has potential to confuse users (it confused me). The nasty code
(IMO) is that we use the configured report_interval as the
initial_delay to start our service report timer. Ie.:
def join(self, member_id, group_id, service=None):
"""Join the given service with it's group."""
msg = _('DB_Driver: join new ServiceGroup member %(member_id)s to '
'the %(group_id)s group, service = %(service)s')
LOG.debug(msg, {'member_id': member_id, 'group_id': group_id,
'service': service})
if service is None:
raise RuntimeError(_('service is a mandatory argument for DB based'
' ServiceGroup driver'))
report_interval = service.report_interval
if report_interval:
service.tg.add_timer(report_interval, self._report_state,
report_interval, service)
In my opinion, when a user starts a service, they expect it to be
available immediately and will suspect that there are other problems
if the report_interval is set to a larger value. Again, in my opinion,
there are use cases for setting a larger report interval. So we should
not use report_interval for the initial_delay. Instead we should a
reasonable value, such as 5 seconds or so.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1276883/+subscriptions
Follow ups
References