diff --git a/e2e-tests/functions b/e2e-tests/functions index 3ba0a89596..c1a1cbdbb4 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -1278,6 +1278,10 @@ function generate_vs_json() { } check_passwords_leak() { + local secrets + local passwords + local pods + secrets=$(kubectl_bin get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (contains("_PASSWORD"))) | .value') echo secrets=$secrets @@ -1290,9 +1294,10 @@ check_passwords_leak() { pods=$(kubectl_bin get pods -o name | awk -F "/" '{print $2}') echo pods=$pods - TEMP_DIR=$(mktemp -d) - collect_logs() { + local containers + local count + NS=$1 for p in $pods; do containers=$(kubectl_bin -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}') @@ -1301,12 +1306,12 @@ check_passwords_leak() { if [[ ${c} =~ "pmm" ]]; then continue fi - kubectl_bin -n "$NS" logs $p -c $c >${TEMP_DIR}/logs_output-$p-$c.txt - echo logs saved in: ${TEMP_DIR}/logs_output-$p-$c.txt + kubectl_bin -n "$NS" logs $p -c $c >${tmp_dir}/logs_output-$p-$c.txt + echo logs saved in: ${tmp_dir}/logs_output-$p-$c.txt for pass in $passwords; do - count=$(grep -c --fixed-strings -- "$pass" ${TEMP_DIR}/logs_output-$p-$c.txt || :) + count=$(grep -c --fixed-strings -- "$pass" ${tmp_dir}/logs_output-$p-$c.txt || :) if [[ $count != 0 ]]; then - echo leaked passwords are found in log ${TEMP_DIR}/logs_output-$p-$c.txt + echo leaked passwords are found in log ${tmp_dir}/logs_output-$p-$c.txt false fi done diff --git a/e2e-tests/init-deploy/compare/backup-50.json b/e2e-tests/init-deploy/compare/backup-50.json index 7db2b3950a..388e9b783a 100644 --- a/e2e-tests/init-deploy/compare/backup-50.json +++ b/e2e-tests/init-deploy/compare/backup-50.json @@ -387,7 +387,6 @@ }, "actions": [ "appendOplogNote", - "checkFreeMonitoringStatus", "connPoolStats", "forceUUID", "getDefaultRWConcern", diff --git a/e2e-tests/init-deploy/compare/clusterAdmin-50.json b/e2e-tests/init-deploy/compare/clusterAdmin-50.json index 031da091c3..554afe14a7 100644 --- a/e2e-tests/init-deploy/compare/clusterAdmin-50.json +++ b/e2e-tests/init-deploy/compare/clusterAdmin-50.json @@ -219,7 +219,6 @@ "appendOplogNote", "applicationMessage", "auditConfigure", - "checkFreeMonitoringStatus", "cleanupOrphaned", "connPoolStats", "connPoolSync", @@ -256,7 +255,6 @@ "serverStatus", "setDefaultRWConcern", "setFeatureCompatibilityVersion", - "setFreeMonitoring", "setParameter", "shardingState", "shutdown", diff --git a/e2e-tests/init-deploy/compare/clusterMonitor-50.json b/e2e-tests/init-deploy/compare/clusterMonitor-50.json index 2db1b5e6ec..9a1e7eb308 100644 --- a/e2e-tests/init-deploy/compare/clusterMonitor-50.json +++ b/e2e-tests/init-deploy/compare/clusterMonitor-50.json @@ -156,7 +156,6 @@ "cluster": true }, "actions": [ - "checkFreeMonitoringStatus", "connPoolStats", "getDefaultRWConcern", "getCmdLineOpts", diff --git a/e2e-tests/monitoring-2-0/run b/e2e-tests/monitoring-2-0/run index 58ec2c006d..d479682cdd 100755 --- a/e2e-tests/monitoring-2-0/run +++ b/e2e-tests/monitoring-2-0/run @@ -32,8 +32,7 @@ else retry 10 60 helm install monitoring --set imageTag=$IMAGE_PMM_SERVER_TAG --set imageRepo=$IMAGE_PMM_SERVER_REPO --set platform=$platform https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VER}.tgz fi sleep 20 -SERVICE="postgres" -until kubectl_bin exec monitoring-0 -- bash -c "pgrep -x $SERVICE >/dev/null"; do +until kubectl_bin exec monitoring-0 -- bash -c "ls -l /proc/*/exe 2>/dev/null| grep postgres >/dev/null"; do echo "Retry $retry" sleep 5 let retry+=1