Skip to content

Commit a1f5948

Browse files
authored
add SIGKILL note, add lock filename to log (#2447)
1 parent 7e7b8cc commit a1f5948

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docker/install-dynamic-plugins.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def remove_lock(lock_file_path):
219219

220220
# Wait for the lock file to be released
221221
def wait_for_lock_release(lock_file_path):
222-
print("======= Waiting for lock release...", flush=True)
222+
print(f"======= Waiting for lock release (file: {lock_file_path})...", flush=True)
223223
while True:
224224
if not os.path.exists(lock_file_path):
225225
break

docs/dynamic-plugins/installing-plugins.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,18 @@ When using the Operator ....
124124

125125
The directory where dynamic plugins are located is mounted as a volume to the _install-dynamic-plugins_ init container and the _backstage-backend_ container. The _install-dynamic-plugins_ init container is responsible for downloading and extracting the plugins into this directory. Depending on the deployment method, the directory is mounted as an ephemeral or persistent volume. In the latter case, the volume can be shared between several Pods, and the plugins installation script is also responsible for downloading and extracting the plugins only once, avoiding conflicts.
126126

127-
**Important Note:** If _install-dynamic-plugins_ init container was killed with SIGKILL signal (for example in a case of OOM) the script is not able to remove the lock file and the next time the Pod starts, it will be waiting for the lock release. You can see the following message in the logs for all the Pods:
127+
**Important Note:** If _install-dynamic-plugins_ init container was killed with SIGKILL signal, which may happen due to the following reasons:
128+
* pod eviction (to free up node resources),
129+
* pod deletion (if not terminated with SIGTERM within graceful period),
130+
* node shutdown,
131+
* container runtime issues,
132+
* exceeding resource limits (OOM for example)
133+
134+
the script is not able to remove the lock file and the next time the Pod starts, it will be waiting for the lock release. You can see the following message in the logs for all the Pods:
128135

129136
```console
130137
oc logs -n <namespace-name> -f backstage-<backstage-name>-<pod-suffix> -c install-dynamic-plugins
131-
======= Waiting for lock release...
138+
======= Waiting for lock release (file: /dynamic-plugins-root/install-dynamic-plugins.lock)...
132139
```
133140
In such a case, you can delete the lock file manually from any of the Pods:
134141

0 commit comments

Comments
 (0)