Merge ~bjornt/maas:bug-1867182-2.7 into maas:2.7

Proposed by Björn Tillenius
Status: Merged
Approved by: Björn Tillenius
Approved revision: a886b180fea570ba93a2f6652f40c9c6edee785c
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~bjornt/maas:bug-1867182-2.7
Merge into: maas:2.7
Diff against target: 13 lines (+1/-1)
1 file modified
src/provisioningserver/utils/service_monitor.py (+1/-1)
Reviewer Review Type Date Requested Status
Björn Tillenius Approve
Review via email: mp+381100@code.launchpad.net

Commit message

LPP: #1867182 - When under load, MAAS snap keeps restarting services

Increase the timeout waiting for the the start/restart/status service
commands.

What happened before was that the start/restart command timed out, and
was re-executed. This served only to worsen the situation, since the
timeout stayed the same.

Given that the reason for having a timeout is to prevent a command from
hanging indefinitely, it's ok to have quite a high timeout. Having a
command hang completely is unlikely, and it's even more unlikely that a
retry will resolve the issue.

(cherry picked from commit 94b4fa43d5d0b0f1b9fe7c69a263173c30789627)

To post a comment you must log in.
Revision history for this message
Björn Tillenius (bjornt) wrote :

Self-approve backport.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/provisioningserver/utils/service_monitor.py b/src/provisioningserver/utils/service_monitor.py
2index 5539dc7..5770f01 100644
3--- a/src/provisioningserver/utils/service_monitor.py
4+++ b/src/provisioningserver/utils/service_monitor.py
5@@ -443,7 +443,7 @@ class ServiceMonitor:
6 return state
7
8 @inlineCallbacks
9- def _execCmd(self, cmd, env, timeout=8, retries=3):
10+ def _execCmd(self, cmd, env, timeout=120, retries=3):
11 """Execute the `cmd` with the `env`."""
12
13 def decode(result):

Subscribers

People subscribed via source and target branches