Closed isFxh closed 1 month ago
Hello,
I have the same problem ...
can you test this command?
kubectl debug -it -n=cluster-postgresql postgresql-ha-1721639657-pgpool-9bfd9cf75-l226d --image=nicolaka/netshoot
and tell me what you have when you do a netstat -an?
can you test this command?
kubectl debug -it -n=cluster-postgresql postgresql-ha-1721639657-pgpool-9bfd9cf75-l226d --image=nicolaka/netshoot
and tell me what you have when you do a netstat -an?
Sorry, I can't execute the command you mentioned at the moment. My environment has been restored. I adjusted the script content of entrypoint.sh, added the detection of repmgr.pid file when the container is restarted or rebuilt, and remade the image of postgresql-repmgr.
#!/bin/bash
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
#set -o xtrace
# Load libraries
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libbitnami.sh
. /opt/bitnami/scripts/libpostgresql.sh
. /opt/bitnami/scripts/librepmgr.sh
# Load PostgreSQL & repmgr environment variables
. /opt/bitnami/scripts/postgresql-env.sh
export MODULE=postgresql-repmgr
print_welcome_page
# Enable the nss_wrapper settings
postgresql_enable_nss_wrapper
# We add the copy from default config in the entrypoint to not break users
# bypassing the setup.sh logic. If the file already exists do not overwrite (in
# case someone mounts a configuration file in /opt/bitnami/postgresql/conf)
debug "Copying files from $POSTGRESQL_DEFAULT_CONF_DIR to $POSTGRESQL_CONF_DIR"
cp -nr "$POSTGRESQL_DEFAULT_CONF_DIR"/. "$POSTGRESQL_CONF_DIR"
info "Start postgresql, check pid for repmgr process."
if [ -f /tmp/repmgr.pid ];then
info "Is exists that repmgr pid file."
rm -f /tmp/repmgr.pid
else
info "Not exists that repmgr pid file, Skip."
fi
if [[ "$*" = *"/opt/bitnami/scripts/postgresql-repmgr/run.sh"* ]]; then
info "** Starting PostgreSQL with Replication Manager setup **"
/opt/bitnami/scripts/postgresql-repmgr/setup.sh
touch "$POSTGRESQL_TMP_DIR"/.initialized
info "** PostgreSQL with Replication Manager setup finished! **"
fi
echo ""
exec "$@"
Hi!
Thanks for sharing the fix! Would you like to submit a PR in bitnami/containers?
Hi!
Thanks for sharing the fix! Would you like to submit a PR in bitnami/containers?
Hi, the above adjustments have temporarily fixed the problem in my environment, but I am not sure if there are other problems. Maybe I have bypassed other possible errors through detection.
Hi,
thank you for sharing :)
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Hi, we have the same problem. Have you found the reason for the problem?
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Name and Version
bitnami/postgresql-ha 16.3.0
What architecture are you using?
amd64
What steps will reproduce the bug?
`After I deployed the postgresql-ha chart through helm, I restarted a machine in the k8s cluster and observed that one or more instance pods were in the "CrashLoopBackOff" state. I checked the crashed pod log through
logs` and found that "/tmp/repmgr.pid exists" in the log, as shown in the figure below. I had to manually delete the corresponding pod before I could recover.values.yaml
Are you using any custom parameters or values?
No response
What is the expected behavior?
No response
What do you see instead?
Additional information
No response