TT#66150 TT#42910 Fix 4818ac638: send systemd READY=1 when maintenance mode is enabled

The mediator is doing nothing when maintenance mode is enabled,
it has been implemented in TT#16753 but later after migration to
systemd and after migration to unit 'type=notify' we forget to send READY=1.
Fixing it here, as it cause 90 seconds delay on ngcpcfg apply on
active node if maintenance mode is enabled.

Change-Id: I66c3dc13506f7069ec60c56edcbe875b4a9912e4
changes/07/32907/1
Alexander Lutay 6 years ago
parent 0bf9cbd660
commit aa7536b359

@ -212,6 +212,7 @@ int main(int argc, char **argv)
if (config_maintenance) { if (config_maintenance) {
L_INFO("Maintenance mode active, going to sleep"); L_INFO("Maintenance mode active, going to sleep");
sd_notify(0, "READY=1\n");
while (!mediator_shutdown) while (!mediator_shutdown)
sleep(1); sleep(1);
exit(0); exit(0);

Loading…
Cancel
Save