Update reconfig event ltime on (smart) reconfig
Make sure to update the last reconfig event ltime in the layout state during a (smart) reconfig. This is important in order to unblock pipelines when a tenant reconfig event is lost. So far the last reconfig event ltime was passed as -1, but wasn't set in the layout state since the ltime is not allowed to go backward. Change-Id: Iab04a962abbfbe901c22e4d5f1d484e3f53b0d33
This commit is contained in:
parent
c90e91cd69
commit
b23f76e677
|
@ -3960,6 +3960,10 @@ class TestScheduler(ZuulTestCase):
|
|||
else:
|
||||
time.sleep(0)
|
||||
|
||||
self.assertGreater(new.last_reconfigured, old.last_reconfigured)
|
||||
self.assertGreater(new.last_reconfigure_event_ltime,
|
||||
old.last_reconfigure_event_ltime)
|
||||
|
||||
def test_tenant_reconfiguration_command_socket(self):
|
||||
"Test that single-tenant reconfiguration via command socket works"
|
||||
|
||||
|
|
|
@ -1528,7 +1528,7 @@ class Scheduler(threading.Thread):
|
|||
with self.createZKContext(lock, self.log) as ctx:
|
||||
if tenant is not None:
|
||||
self._reconfigureTenant(ctx, min_ltimes,
|
||||
-1,
|
||||
event.zuul_event_ltime,
|
||||
tenant, old_tenant)
|
||||
else:
|
||||
self._reconfigureDeleteTenant(ctx, old_tenant)
|
||||
|
|
Loading…
Reference in New Issue