File tree Expand file tree Collapse file tree 27 files changed +14
-81
lines changed
demand-backup-physical-sharded
mongod-major-upgrade-sharded Expand file tree Collapse file tree 27 files changed +14
-81
lines changed Original file line number Diff line number Diff line change 505
505
506
506
unstash ' IMAGE'
507
507
def IMAGE = sh(returnStdout : true , script : " cat results/docker/TAG" ). trim()
508
- TestsReport = TestsReport + " \r\n\r\n commit: ${ env.CHANGE_URL} /commits/${ env.GIT_COMMIT} \r\n image: `${ IMAGE} `\r\n "
508
+ TestsReport = TestsReport + " \r\n\r\n commit: ${ env.CHANGE_URL} /commits/${ env.GIT_COMMIT} \r\n image: `${ IMAGE} `\r\n logs: `s3://percona-jenkins-artifactory/cloud-psmdb-operator/PR- ${ env.CHANGE_ID } / ${ GIT_SHORT_COMMIT } /logs/` "
509
509
pullRequest. comment(TestsReport )
510
510
}
511
511
}
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ check_cr_config() {
31
31
if [[ $( kubectl_bin get pod \
32
32
--selector=statefulset.kubernetes.io/pod-name=" ${cluster} -arbiter-0" \
33
33
-o jsonpath=' {.items[*].status.containerStatuses[?(@.name == "mongod-arbiter")].restartCount}' ) -gt 0 ]]; then
34
- collect_k8s_logs
35
34
echo " Something went wrong with arbiter. Exiting..."
36
35
exit 1
37
36
fi
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ check_balancer() {
15
15
| grep -E -v " Percona Server for MongoDB|connecting to:|Implicit session:|versions do not match|Error saving history file:|bye" )
16
16
17
17
if [[ $balancer_running != " $expected " ]]; then
18
- collect_k8s_logs
19
18
echo " Unexpected output from \" db.adminCommand({balancerStatus: 1}).mode\" : $balancer_running "
20
19
echo " Expected $expected "
21
20
exit 1
Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ for i in "rs0" "rs1"; do
101
101
done
102
102
103
103
if [[ $shards -lt 2 ]]; then
104
- collect_k8s_logs
105
104
echo " data is only on some of the shards, maybe sharding is not working"
106
105
exit 1
107
106
fi
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ encrypted_cluster_log=$(kubectl_bin logs some-name-rs0-0 -c mongod -n $namespace
83
83
84
84
echo " $encrypted_cluster_log "
85
85
if [ -z " $encrypted_cluster_log " ]; then
86
- collect_k8s_logs
87
86
echo " Cluster is not encrypted"
88
87
exit 1
89
88
fi
@@ -100,7 +99,6 @@ until [ "$retry" -ge 10 ]; do
100
99
echo " Cluster is not encrypted already"
101
100
break
102
101
elif [ $retry == 15 ]; then
103
- collect_k8s_logs
104
102
echo " Max retry count $retry reached. Cluster is still encrypted"
105
103
exit 1
106
104
else
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ check_rs_proper_component_deletion() {
17
17
until [[ $( kubectl_bin get sts -l app.kubernetes.io/instance=${cluster} ,app.kubernetes.io/replset=${rs_name} -ojson | jq ' .items | length' ) -eq 0 ]]; do
18
18
let retry+=1
19
19
if [ $retry -ge 70 ]; then
20
- collect_k8s_logs
21
20
sts_count=$( kubectl_bin get sts -l app.kubernetes.io/instance=${cluster} ,app.kubernetes.io/replset=${rs_name} -ojson | jq ' .items | length' )
22
21
echo " Replset $rs_name not properly removed, expected sts count of 0 but got $sts_count . Exiting after $retry tries..."
23
22
exit 1
@@ -116,7 +115,6 @@ main() {
116
115
done
117
116
118
117
if [[ $shards -lt 3 ]]; then
119
- collect_k8s_logs
120
118
echo " data is only on some of the shards, maybe sharding is not working"
121
119
exit 1
122
120
fi
@@ -127,7 +125,6 @@ main() {
127
125
" clusterAdmin:clusterAdmin123456@$cluster -mongos.$namespace " " mongodb" " .svc.cluster.local" \
128
126
" --tlsCertificateKeyFile /tmp/tls.pem --tlsCAFile /etc/mongodb-ssl/ca.crt --tls" )
129
127
if ! echo $res | grep -q ' "ok" : 1' ; then
130
- collect_k8s_logs
131
128
echo " app database not dropped. Exiting.."
132
129
exit 1
133
130
fi
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ function stop_cluster() {
27
27
let passed_time=" ${passed_time} +${sleep_time} "
28
28
sleep ${sleep_time}
29
29
if [[ ${passed_time} -gt ${max_wait_time} ]]; then
30
- collect_k8s_logs
31
30
echo " We've been waiting for cluster stop for too long. Exiting..."
32
31
exit 1
33
32
fi
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ run_recovery_check() {
38
38
wait_restore " ${backup_name} " " ${cluster} " " ready" " 0" " 1800"
39
39
kubectl_bin get psmdb ${cluster} -o yaml
40
40
if [ $( kubectl_bin get psmdb ${cluster} -o yaml | yq ' .metadata.annotations."percona.com/resync-pbm"' ) == null ]; then
41
- collect_k8s_logs
42
41
echo " psmdb/${cluster} should be annotated with percona.com/resync-pbm after a physical restore"
43
42
exit 1
44
43
fi
@@ -53,7 +52,6 @@ check_exported_mongos_service_endpoint() {
53
52
local host=$1
54
53
55
54
if [ " $host " != " $( kubectl_bin get psmdb $cluster -o=jsonpath=' {.status.host}' ) " ]; then
56
- collect_k8s_logs
57
55
echo " Exported host is not correct after the restore"
58
56
exit 1
59
57
fi
@@ -82,7 +80,6 @@ wait_cluster_consistency ${cluster}
82
80
lbEndpoint=$( kubectl_bin get svc $cluster -mongos -o=jsonpath=' {.status}' |
83
81
jq -r ' select(.loadBalancer != null and .loadBalancer.ingress != null and .loadBalancer.ingress != []) | .loadBalancer.ingress[0][]' )
84
82
if [ -z $lbEndpoint ]; then
85
- collect_k8s_logs
86
83
echo " mongos service not exported correctly"
87
84
exit 1
88
85
fi
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ run_recovery_check() {
38
38
wait_restore " ${backup_name} " " ${cluster} " " ready" " 0" " 1800"
39
39
kubectl_bin get psmdb ${cluster} -o yaml
40
40
if [ $( kubectl_bin get psmdb ${cluster} -o yaml | yq ' .metadata.annotations."percona.com/resync-pbm"' ) == null ]; then
41
- collect_k8s_logs
42
41
echo " psmdb/${cluster} should be annotated with percona.com/resync-pbm after a physical restore"
43
42
exit 1
44
43
fi
Original file line number Diff line number Diff line change @@ -166,7 +166,6 @@ backup_exists=$(kubectl_bin run -i --rm aws-cli --image=perconalab/awscli --rest
166
166
/usr/bin/aws --endpoint-url http://minio-service:9000 s3 ls s3://operator-testing/ \
167
167
| grep -c ${backup_dest_minio} _ | cat)
168
168
if [[ $backup_exists -eq 1 ]]; then
169
- collect_k8s_logs
170
169
echo " Backup was not removed from bucket -- minio"
171
170
exit 1
172
171
fi
You can’t perform that action at this time.
0 commit comments