Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion heartbeat/podman-etcd
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ archive_data_folder()
etcd_pod_container_exists() {
local count_matches
# Check whether the etcd pod exists on the same node (header line included)
count_matches=$(crictl pods --label app=etcd -q | xargs -I {} crictl ps --pod {} -o json | jq -r '.containers[].metadata | select ( .name == "etcd" ).name' | wc -l)
count_matches=$(crictl pods --label app=etcd -q | xargs -I {} crictl ps -a --pod {} -o json | jq -r '.containers[].metadata | select ( .name == "etcd" ).name' | wc -l)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment might be a bit clearer. Something like

Check whether the etcd pod exists on the same node (including stopped/exited containers)

if [ "$count_matches" -eq 1 ]; then
# etcd pod found
return 0
Expand Down