Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liveness probe fails starting with alpine 3.19.0 #228

Open
createdanew opened this issue Jan 7, 2025 · 0 comments
Open

Liveness probe fails starting with alpine 3.19.0 #228

createdanew opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
work-in-progress Issue is being worked on.

Comments

@createdanew
Copy link

createdanew commented Jan 7, 2025

Describe the bug: I noticed that starting with alpine 3.19.0 the liveness probe fails and needs to be adjusted in order for liveness probe to work. The other work around is to just use alpine 3.18.10 and then the liveness probe works as expected. The liveness probe is searching for the regex pattern of "^provisioner-loc.*"` but when using alpine 3.19.0 the provisioner process starts with "ld-linux-x86-"

Expected behavior: I expect for the liveness probe to work without having to adjust it.

Steps to reproduce the bug:

Deploy the local provisioner using alpine 3.19.0 using local provsioner version 4.1.1

The output of the following commands will help us better understand what's going on:

I'm using the following Dockerfile:

ARG DOCKER_REGISTRY=docker.xxxxx.com/images
FROM $DOCKER_REGISTRY/golang:1.23.4 AS builder
WORKDIR /go/src/app

ARG CTX_PATH=spock-storage/components/localpv-provisioner
COPY $CTX_PATH/src src
# below git commands are needed to be able to run the upstream 'make provisioner-localpv' make commands
# the Makefile apparently checks repo is a git dir and extracts before proceeding
# if not git, Makefile exits with error
RUN cd src && git init \
    && git config --global init.defaultBranch master \
    && git config user.name "AnyName" \
    && git config user.email "[email protected]" \
    && git commit --allow-empty -n -m "Initial commit." \
    && make provisioner-localpv

FROM $DOCKER_REGISTRY/alpine:3.19.0

RUN apk update && \
    apk add --no-cache \
    bash \
    ca-certificates \
    curl \
    iproute2 \
    libc6-compat \
    libcrypto3 \
    libssl3 \
    mii-tool \
    net-tools \
    procps

COPY --from=builder /go/src/app/src/bin/provisioner-localpv/provisioner-localpv /

ARG ARCH
ARG DBUILD_DATE
ARG DBUILD_REPO_URL
ARG DBUILD_SITE_URL
LABEL org.label-schema.name="provisioner-localpv"
LABEL org.label-schema.description="Dynamic Local PV Provisioner for OpenEBS"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$DBUILD_DATE
LABEL org.label-schema.vcs-url=$DBUILD_REPO_URL
LABEL org.label-schema.url=$DBUILD_SITE_URL

ENTRYPOINT ["/provisioner-localpv"]
eanico@bos-lhvk0g:~/git/spock-storage$ kubectl get pods -n spock-storage  --show-labels
NAME                                                 READY   STATUS    RESTARTS      AGE     LABELS
spock-storage-localpv-provisioner-7ccf47f69c-4lc9k   1/1     Running   1 (81s ago)   4m21s   app=localpv-provisioner,chart=localpv-provisioner-4.1.1,component=localpv-provisioner,heritage=Helm,name=openebs-localpv-provisioner,openebs.io/component-name=openebs-localpv-provisioner,openebs.io/version=4.1.1,pod-template-hash=7ccf47f69c,release=spock-storage,skaffold.dev/run-id=db8f526b-2a54-4a03-a7d6-5b9a302c20ed
eanico@bos-lhvk0g:~/git/spock-storage$
eanico@bos-lhvk0g:~/git/spock-storage$ kubectl logs spock-storage-localpv-provisioner-7ccf47f69c-4lc9k -n spock-storage
I0107 21:00:43.358252       1 start.go:47] Starting Provisioner...
I0107 21:00:43.363599       1 start.go:113] Leader election enabled for localpv-provisioner via leaderElectionKey
I0107 21:00:43.419076       1 leaderelection.go:248] attempting to acquire leader lease spock-storage/openebs.io-local...
I0107 21:01:01.479676       1 leaderelection.go:258] successfully acquired lease spock-storage/openebs.io-local
I0107 21:01:01.479753       1 controller.go:811] Starting provisioner controller openebs.io/local_spock-storage-localpv-provisioner-7ccf47f69c-4lc9k_30a0849a-981a-4c20-be6c-a02967a44ef5!
I0107 21:01:01.479768       1 event.go:285] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"spock-storage", Name:"openebs.io-local", UID:"dcc40d03-645b-46c0-ac96-af7cba66ac5e", APIVersion:"v1", ResourceVersion:"25190468", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' spock-storage-localpv-provisioner-7ccf47f69c-4lc9k_30a0849a-981a-4c20-be6c-a02967a44ef5 became leader
I0107 21:01:01.479801       1 event.go:285] Event(v1.ObjectReference{Kind:"Lease", Namespace:"spock-storage", Name:"openebs.io-local", UID:"19800dc8-31d4-4e34-bb2b-142cd28daff7", APIVersion:"coordination.k8s.io/v1", ResourceVersion:"25190469", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' spock-storage-localpv-provisioner-7ccf47f69c-4lc9k_30a0849a-981a-4c20-be6c-a02967a44ef5 became leader
I0107 21:01:01.579886       1 controller.go:860] Started provisioner controller openebs.io/local_spock-storage-localpv-provisioner-7ccf47f69c-4lc9k_30a0849a-981a-4c20-be6c-a02967a44ef5!
eanico@bos-lhvk0g:~/git/spock-storage$

When i do a describe on the pod and check the events section I noticed the following :

  Normal   Created         60s (x3 over 7m)  kubelet            Created container spock-storage-localpv-provisioner
  Normal   Started         60s (x3 over 7m)  kubelet            Started container spock-storage-localpv-provisioner
  Warning  Unhealthy       60s (x6 over 6m)  kubelet            Liveness probe failed: pgrep: pattern that searches for process name longer than 15 characters will result in zero matches
Try `pgrep -f' option to match against the complete command line.
  Normal  Killing  60s (x2 over 4m)  kubelet  Container spock-storage-localpv-provisioner failed liveness probe, will be restarted
eanico@bos-lhvk0g:~/git/spock-storage$

Anything else we need to know?:
Add any other context about the problem here.

Environment details:

  • OpenEBS version (use kubectl get po -n openebs --show-labels):
eanico@bos-lhvk0g:~/git/spock-storage$ kubectl get po -n spock-storage --show-labels
NAME                                                 READY   STATUS    RESTARTS        AGE     LABELS
spock-storage-localpv-provisioner-7ccf47f69c-4lc9k   1/1     Running   2 (2m22s ago)   8m22s   app=localpv-provisioner,chart=localpv-provisioner-4.1.1,component=localpv-provisioner,heritage=Helm,name=openebs-localpv-provisioner,openebs.io/component-name=openebs-localpv-provisioner,openebs.io/version=4.1.1,pod-template-hash=7ccf47f69c,release=spock-storage,skaffold.dev/run-id=db8f526b-2a54-4a03-a7d6-5b9a302c20ed
eanico@bos-lhvk0g:~/git/spock-storage$
  • Kubernetes version (use kubectl version):
eanico@bos-lhvk0g:~/git/spock-storage$ kubectl version
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.31.1+rke2r1
WARNING: version difference between client (1.28) and server (1.31) exceeds the supported minor version skew of +/-1
eanico@bos-lhvk0g:~/git/spock-storage$
/ # uname -a
Linux spock-storage-localpv-provisioner-7ccf47f69c-4lc9k 6.1.89-6.1.3-amd64-62cb68e96ac1b3de #1 SMP PREEMPT_DYNAMIC Fri Jul 19 19:47:54 UTC 2024 x86_64 Linux
/ #

  • others:
eanico@bos-lhvk0g:~/git/spock-storage$ kubectl exec -ti spock-storage-localpv-provisioner-7ccf47f69c-4lc9k -n spock-storage -- ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.2  0.0 1275512 41100 ?       Ssl  21:09   0:00 ld-linux-x86-
root          45 33.3  0.0   2508  1724 pts/0    Rs+  21:10   0:00 ps aux
eanico@bos-lhvk0g:~/git/spock-storage$
@niladrih niladrih self-assigned this Jan 13, 2025
@sinhaashish sinhaashish added the work-in-progress Issue is being worked on. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress Issue is being worked on.
Projects
None yet
Development

No branches or pull requests

3 participants