Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Converted readiness.py to bash script. #256

Closed
wants to merge 6 commits into from
Closed

Converted readiness.py to bash script. #256

wants to merge 6 commits into from

Conversation

andrecolin
Copy link

What is the purpose of this pull request?: Replace readiness python script since python not in kolla base image

What issue does this pull request address?: Fixes #253

Notes for reviewers to consider: Still need to convert peerfinder python script next

Specific reviewers for pull request:

@wilreichert
Copy link
Contributor

pulled your patch & tested on our cluster with

helm install --name mariadbtest \
--set images.mariadb=kolla/ubuntu-binary-mariadb:3.0.2 \
--set replicas=1 \
--set volume.class_name=ceph \
local/mariadb --namespace=test

Looks like you missed a bash in the deployment.yaml

% kubectl get ev -n test | grep Readiness                                                                                                                 :( 1 17-03-09 - 4:23:01
6s         3m          21        mariadb-0   Pod       spec.containers{mariadb}   Warning   Unhealthy          {kubelet oreo05}       Readiness probe failed: rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"/tmp/mariadb-readiness.sh\": permission denied"

@andrecolin
Copy link
Author

@wilreichert Can you pull again and test on your server

@wilreichert
Copy link
Contributor

Single instance case above works fine now but clustered still has issues. When launching

helm install --name mariadbtest \
--set images.mariadb=kolla/ubuntu-binary-mariadb:3.0.2 \
--set replicas=3 \
--set volume.class_name=ceph \
local/mariadb --namespace=test

it looks like the peer-finder script has perms isues & init goes bad - pod logs

FWIW, I made sure to nuke pvc's in-between tests.

@andrecolin
Copy link
Author

@wilreichert There were some extra items in the script bang entry. Can you try again

@wilreichert
Copy link
Contributor

Copy link
Contributor

@intlabs intlabs left a comment

Choose a reason for hiding this comment

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

Minor change required to fix permissions.

@@ -49,7 +49,7 @@ function wait_for_cluster {
continue
fi
# Count number of endpoint separators.
ENDPOINTS_CNT=`python /tmp/peer-finder.py mariadb 1 | grep -o ',' | wc -l`
ENDPOINTS_CNT=`/tmp/peer-finder.sh mariadb 1 | grep -o ',' | wc -l`
Copy link
Contributor

@intlabs intlabs Mar 16, 2017

Choose a reason for hiding this comment

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

this line should read: ENDPOINTS_CNT=`bash /tmp/peer-finder.sh mariadb 1 | grep -o ',' | wc -l
which will fix the permissions issue in @wilreichert's linked output.

@andrecolin
Copy link
Author

andrecolin commented Mar 17, 2017

Found two places that did an eval and bash was missing from the eval. Permission issue should be gone
@wilreichert Can you pull again and verify on your servers

@andrecolin
Copy link
Author

Redoing pull request

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: mariadb chart readiness probe fails with kolla/*-binary-mariadb image
4 participants