From 09ff5127e0763593d61200fb01e4d076e9c6c40d Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 16:52:41 +0300 Subject: [PATCH 01/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 18 ++++++++++++------ pmm_psmdb-pbm_setup/configure-extra-agents.sh | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index ce12af8..ff4a73a 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -9,6 +9,16 @@ mongo_setup_type=${MONGO_SETUP_TYPE:-pss} gssapi_enabled=${GSSAPI:-false} gssapi_username=${GSSAPI_USERNAME:-pmm@PERCONATEST.COM} gssapi_password=${GSSAPI_PASSWORD:-password1} +client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_user_pass}" +gssapi_service_name_part="" + +if [[ $gssapi_enabled == "true" ]]; then + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database='$external'" + gssapi_service_name_part="_gssapi" +fi + +echo +echo "gssapi enabled: $gssapi_enabled. Using credentials: $client_credentials_flags" echo echo "configuring pbm agents" @@ -36,13 +46,9 @@ do echo "congiguring pmm agent on $node" docker compose -f docker-compose-rs.yaml exec -T -e PMM_AGENT_SETUP_NODE_NAME=${node}._${random_number} $node pmm-agent setup if [[ $mongo_setup_type == "psa" && $node == "rs103" ]]; then - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${node}_${random_number} 127.0.0.1:27017 + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --username=${pmm_mongo_user} --password=${pmm_mongo_user_pass} ${node}_${random_number} 127.0.0.1:27017 - - if [[ $gssapi_enabled == "true" ]]; then - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database="$external" --host=${node} --port=27017 ${node}_gssapi_${random_number} - fi + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index 9c3385a..256ce11 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -9,6 +9,16 @@ mongo_setup_type=${MONGO_SETUP_TYPE:-pss} gssapi_enabled=${GSSAPI:-false} gssapi_username=${GSSAPI_USERNAME:-pmm@PERCONATEST.COM} gssapi_password=${GSSAPI_PASSWORD:-password1} +client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_user_pass}" +gssapi_service_name_part="" + +if [[ $gssapi_enabled == "true" ]]; then + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database='$external'" + gssapi_service_name_part="_gssapi" +fi + +echo +echo "gssapi enabled: $gssapi_enabled. Using credentials: $client_credentials_flags" echo echo "configuring pbm agents" @@ -34,12 +44,8 @@ do echo "configuring pmm agent on $node" docker compose -f docker-compose-rs.yaml exec -T -e PMM_AGENT_SETUP_NODE_NAME=${node}._${random_number} $node pmm-agent setup if [[ $mongo_setup_type == "psa" && $node == "rs203" ]]; then - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs1 ${node}_${random_number} 127.0.0.1:27017 + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs1 --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs1 --username=${pmm_mongo_user} --password=${pmm_mongo_user_pass} ${node}_${random_number} 127.0.0.1:27017 - - if [[ $gssapi_enabled == "true" ]]; then - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database="$external" --host=${node} --port=27017 ${node}_gssapi_${random_number} - fi + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done From e927052b48125b0531e23e2fc90ba31a8daffced Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 17:10:04 +0300 Subject: [PATCH 02/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 +- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index ff4a73a..a8c2d47 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -13,7 +13,7 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database='$external'" + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"$external\"" gssapi_service_name_part="_gssapi" fi diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index 256ce11..c64d4b9 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -13,7 +13,7 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database='$external'" + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"$external\"" gssapi_service_name_part="_gssapi" fi From 995f3402c8cd159b542a27c873917cf0bba157bf Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 17:29:32 +0300 Subject: [PATCH 03/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 +- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index a8c2d47..aa71454 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -13,7 +13,7 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"$external\"" + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"\$external\"" gssapi_service_name_part="_gssapi" fi diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index c64d4b9..84294d0 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -13,7 +13,7 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"$external\"" + client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"\$external\"" gssapi_service_name_part="_gssapi" fi From 977a2debda5087127c9a655ad32d0e22863f001c Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 17:41:56 +0300 Subject: [PATCH 04/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index aa71454..092bc82 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -48,6 +48,8 @@ do if [[ $mongo_setup_type == "psa" && $node == "rs103" ]]; then docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else + echo + echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done From 29e0a99b7a33ddb77fc3d20a47f361a8e832178a Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 17:57:23 +0300 Subject: [PATCH 05/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 11 ++++++++--- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 092bc82..b0f9d64 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -13,8 +13,13 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"\$external\"" - gssapi_service_name_part="_gssapi" + client_credentials_flags=( + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' + ) + gssapi_service_name_part="_gssapi" fi echo @@ -50,7 +55,7 @@ do else echo echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index 84294d0..bd215a2 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -13,8 +13,13 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username=${gssapi_username} --password=${gssapi_password} --authentication-mechanism=GSSAPI --authentication-database=\"\$external\"" - gssapi_service_name_part="_gssapi" + client_credentials_flags=( + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' + ) + gssapi_service_name_part="_gssapi" fi echo From 179c68cb3c90769f9b8854587825c1866f2aca8b Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 18:41:53 +0300 Subject: [PATCH 06/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 14 +++++++------- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index b0f9d64..1f71ef4 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -14,16 +14,16 @@ gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then client_credentials_flags=( - --username="$gssapi_username" - --password="$gssapi_password" - --authentication-mechanism=GSSAPI - --authentication-database='$external' + --username "$gssapi_username" + --password "$gssapi_password" + --authentication-mechanism GSSAPI + --authentication-database '$external' ) gssapi_service_name_part="_gssapi" fi echo -echo "gssapi enabled: $gssapi_enabled. Using credentials: $client_credentials_flags" +echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags[*]}" echo echo "configuring pbm agents" @@ -54,8 +54,8 @@ do docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else echo - echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags[*]}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index bd215a2..ba8d352 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -14,16 +14,16 @@ gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then client_credentials_flags=( - --username="$gssapi_username" - --password="$gssapi_password" - --authentication-mechanism=GSSAPI - --authentication-database='$external' + --username "$gssapi_username" + --password "$gssapi_password" + --authentication-mechanism GSSAPI + --authentication-database '$external' ) gssapi_service_name_part="_gssapi" fi echo -echo "gssapi enabled: $gssapi_enabled. Using credentials: $client_credentials_flags" +echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags[*]}" echo echo "configuring pbm agents" @@ -51,6 +51,6 @@ do if [[ $mongo_setup_type == "psa" && $node == "rs203" ]]; then docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs1 --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done From ef5b21841cea97d3f3912d633dbad069abd5e6a5 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 18:57:29 +0300 Subject: [PATCH 07/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 +- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 1f71ef4..36ee20d 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -17,7 +17,7 @@ if [[ $gssapi_enabled == "true" ]]; then --username "$gssapi_username" --password "$gssapi_password" --authentication-mechanism GSSAPI - --authentication-database '$external' + --authentication-database "$external" ) gssapi_service_name_part="_gssapi" fi diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index ba8d352..b895502 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -17,7 +17,7 @@ if [[ $gssapi_enabled == "true" ]]; then --username "$gssapi_username" --password "$gssapi_password" --authentication-mechanism GSSAPI - --authentication-database '$external' + --authentication-database "$external" ) gssapi_service_name_part="_gssapi" fi From 8f11236b116139a3b707e11a89871183dcec5917 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 19:02:46 +0300 Subject: [PATCH 08/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 8 ++++---- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 36ee20d..08de37c 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -14,10 +14,10 @@ gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then client_credentials_flags=( - --username "$gssapi_username" - --password "$gssapi_password" - --authentication-mechanism GSSAPI - --authentication-database "$external" + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' ) gssapi_service_name_part="_gssapi" fi diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index b895502..434f584 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -14,10 +14,10 @@ gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then client_credentials_flags=( - --username "$gssapi_username" - --password "$gssapi_password" - --authentication-mechanism GSSAPI - --authentication-database "$external" + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' ) gssapi_service_name_part="_gssapi" fi From 16fcbf12c88c9dfd6de066a12c101b5f79515100 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 19:18:28 +0300 Subject: [PATCH 09/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 +- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 08de37c..ff7cc86 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -17,7 +17,7 @@ if [[ $gssapi_enabled == "true" ]]; then --username="$gssapi_username" --password="$gssapi_password" --authentication-mechanism=GSSAPI - --authentication-database='$external' + --authentication-database='"$external"' ) gssapi_service_name_part="_gssapi" fi diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index 434f584..e6df7c8 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -17,7 +17,7 @@ if [[ $gssapi_enabled == "true" ]]; then --username="$gssapi_username" --password="$gssapi_password" --authentication-mechanism=GSSAPI - --authentication-database='$external' + --authentication-database='"$external"' ) gssapi_service_name_part="_gssapi" fi From 9014655c9150206d2555fc599aa13c2f66f74b42 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 19:31:17 +0300 Subject: [PATCH 10/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index ff7cc86..952cd7e 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -13,17 +13,12 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags=( - --username="$gssapi_username" - --password="$gssapi_password" - --authentication-mechanism=GSSAPI - --authentication-database='"$external"' - ) + client_credentials_flags="--username="$gssapi_username" --password="$gssapi_password" --authentication-mechanism=GSSAPI --authentication-database='\$external'" gssapi_service_name_part="_gssapi" fi echo -echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags[*]}" +echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags}" echo echo "configuring pbm agents" @@ -48,14 +43,14 @@ random_number=$RANDOM nodes="rs101 rs102 rs103" for node in $nodes do - echo "congiguring pmm agent on $node" + echo "configuring pmm agent on $node" docker compose -f docker-compose-rs.yaml exec -T -e PMM_AGENT_SETUP_NODE_NAME=${node}._${random_number} $node pmm-agent setup if [[ $mongo_setup_type == "psa" && $node == "rs103" ]]; then docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else echo - echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags[*]}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo From d4e428756f0ba879fb59aa5fe1cb70654a8e190f Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 19:41:19 +0300 Subject: [PATCH 11/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 952cd7e..1dd7157 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -50,7 +50,7 @@ do else echo echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs "${client_credentials_flags}" --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo From ab96696ee3e86c6ec44eac82081db377cdfc2d11 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 19:52:23 +0300 Subject: [PATCH 12/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index 1dd7157..aa0f12b 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -13,12 +13,17 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags="--username="$gssapi_username" --password="$gssapi_password" --authentication-mechanism=GSSAPI --authentication-database='\$external'" + client_credentials_flags=( + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' + ) gssapi_service_name_part="_gssapi" fi echo -echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags}" +echo "gssapi enabled: $gssapi_enabled. Using credentials: ${client_credentials_flags[*]}" echo echo "configuring pbm agents" @@ -49,8 +54,8 @@ do docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else echo - echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" - docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} + echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" + docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done echo From 74ceea5150aad1c719b6cf4c1a9dc5f057d02b00 Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 20:02:14 +0300 Subject: [PATCH 13/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-extra-agents.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pmm_psmdb-pbm_setup/configure-extra-agents.sh b/pmm_psmdb-pbm_setup/configure-extra-agents.sh index e6df7c8..c71c16d 100644 --- a/pmm_psmdb-pbm_setup/configure-extra-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-extra-agents.sh @@ -13,12 +13,12 @@ client_credentials_flags="--username=${pmm_mongo_user} --password=${pmm_mongo_us gssapi_service_name_part="" if [[ $gssapi_enabled == "true" ]]; then - client_credentials_flags=( - --username="$gssapi_username" - --password="$gssapi_password" - --authentication-mechanism=GSSAPI - --authentication-database='"$external"' - ) + client_credentials_flags=( + --username="$gssapi_username" + --password="$gssapi_password" + --authentication-mechanism=GSSAPI + --authentication-database='$external' + ) gssapi_service_name_part="_gssapi" fi From 2d52a0417a4d34cebbaaddfa9027483bec7e124e Mon Sep 17 00:00:00 2001 From: yurkovychv Date: Mon, 18 Aug 2025 21:06:21 +0300 Subject: [PATCH 14/14] PMM-14185 handle gssapi --- pmm_psmdb-pbm_setup/configure-agents.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/pmm_psmdb-pbm_setup/configure-agents.sh b/pmm_psmdb-pbm_setup/configure-agents.sh index aa0f12b..33bf194 100644 --- a/pmm_psmdb-pbm_setup/configure-agents.sh +++ b/pmm_psmdb-pbm_setup/configure-agents.sh @@ -54,7 +54,6 @@ do docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} else echo - echo "docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number}" docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --cluster=replicaset --replication-set=rs ${client_credentials_flags[*]} --host=${node} --port=27017 ${node}${gssapi_service_name_part}_${random_number} fi done