-
Bug
-
Resolution: Done
-
Major
-
OP-2.4.0.GA
-
None
-
False
-
None
-
False
-
-
-
-
-
-
-
When we are deploying an application from an image stream, the pod is deleted immediately after being created the first time. It only happens when the application image is retrieved from an image stream.
To reproduce we can follow these steps:
1. Install the Operator via OML and wait until it is available:
$ cat <<EOF | oc create -f - apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: eap namespace: openshift-operators spec: channel: stable installPlanApproval: Automatic name: eap source: redhat-operators sourceNamespace: openshift-marketplace EOF $ oc get csv -n openshift-operators
2. Build EAP 7.4 microprofile-config example using Helm Charts:
$ cat <<EOF > /tmp/helm-chart-EAP74-XP-build.yaml image: tag: latest build: enabled: true mode: s2i uri: 'https://github.com/jboss-developer/jboss-eap-quickstarts.git' ref: xp-4.0.x contextDir: microprofile-config s2i: jdk: "11" galleonLayers: - jaxrs-server - microprofile-platform deploy: enabled: false EOF $ helm install microprofile-config-eap74-xp-app \ -f /tmp/helm-chart-EAP74-XP-build.yaml \ jboss-eap/eap-xp4
3. Deploy the application using the Operator:
cat <<EOF | oc create -f - apiVersion: wildfly.org/v1alpha1 kind: WildFlyServer metadata: name: microprofile-config-eap74-xp-app spec: applicationImage: 'microprofile-config-eap74-xp-app:latest' replicas: 1 EOF
Monitoring the pods we will see the following:
$ oc get pods -w NAME READY STATUS RESTARTS AGE microprofile-config-eap74-xp-app-2-build 0/1 Completed 0 112s microprofile-config-eap74-xp-app-build-artifacts-1-build 0/1 Completed 0 4m22s microprofile-config-eap74-xp-app-0 0/1 Pending 0 0s microprofile-config-eap74-xp-app-0 0/1 Pending 0 0s microprofile-config-eap74-xp-app-0 0/1 ContainerCreating 0 0s microprofile-config-eap74-xp-app-0 0/1 Terminating 0 1s microprofile-config-eap74-xp-app-0 0/1 Terminating 0 3s microprofile-config-eap74-xp-app-0 0/1 Terminating 0 6s microprofile-config-eap74-xp-app-0 0/1 Terminating 0 7s microprofile-config-eap74-xp-app-0 0/1 Terminating 0 7s microprofile-config-eap74-xp-app-0 0/1 Pending 0 0s microprofile-config-eap74-xp-app-0 0/1 Pending 0 0s microprofile-config-eap74-xp-app-0 0/1 ContainerCreating 0 0s microprofile-config-eap74-xp-app-0 0/1 ContainerCreating 0 1s microprofile-config-eap74-xp-app-0 0/1 Running 0 13s microprofile-config-eap74-xp-app-0 1/1 Running 0 50s
We can observe the pod status moves to "ContainerCreating" and then, the pod is deleted and moves to "Terminating"
Monitoring the events we can see there is a event that deletes the pod after being created the first time:
0s Normal SuccessfulCreate statefulset/microprofile-config-eap74-xp-app create Pod microprofile-config-eap74-xp-app-0 in StatefulSet microprofile-config-eap74-xp-app successful 0s Normal Scheduled pod/microprofile-config-eap74-xp-app-0 Successfully assigned eap-operator/microprofile-config-eap74-xp-app-0 to crc-8cf2w-master-0 0s Normal SuccessfulDelete statefulset/microprofile-config-eap74-xp-app delete Pod microprofile-config-eap74-xp-app-0 in StatefulSet microprofile-config-eap74-xp-app successful 0s Normal AddedInterface pod/microprofile-config-eap74-xp-app-0 Add eth0 [10.217.0.67/23] from openshift-sdn 0s Normal Pulling pod/microprofile-config-eap74-xp-app-0 Pulling image "microprofile-config-eap74-xp-app:latest" 0s Warning Failed pod/microprofile-config-eap74-xp-app-0 Failed to pull image "microprofile-config-eap74-xp-app:latest": rpc error: code = Unknown desc = reading manifest latest in docker.io/library/microprofile-config-eap74-xp-app: requested access to the resource is denied 0s Warning Failed pod/microprofile-config-eap74-xp-app-0 Error: ErrImagePull 0s Normal SuccessfulCreate statefulset/microprofile-config-eap74-xp-app create Pod microprofile-config-eap74-xp-app-0 in StatefulSet microprofile-config-eap74-xp-app successful 0s Normal Scheduled pod/microprofile-config-eap74-xp-app-0 Successfully assigned eap-operator/microprofile-config-eap74-xp-app-0 to crc-8cf2w-master-0 0s Normal AddedInterface pod/microprofile-config-eap74-xp-app-0 Add eth0 [10.217.0.68/23] from openshift-sdn 0s Normal Pulling pod/microprofile-config-eap74-xp-app-0 Pulling image "image-registry.openshift-image-registry.svc:5000/eap-operator/microprofile-config-eap74-xp-app@sha256:e132ac73dccf103ac799e7b9a4e8ba25494bb2b50d2a51b3ca3656dbe637bc06" 0s Normal Pulled pod/microprofile-config-eap74-xp-app-0 Successfully pulled image "image-registry.openshift-image-registry.svc:5000/eap-operator/microprofile-config-eap74-xp-app@sha256:e132ac73dccf103ac799e7b9a4e8ba25494bb2b50d2a51b3ca3656dbe637bc06" in 10.252595782s (10.252607922s including waiting) 0s Normal Created pod/microprofile-config-eap74-xp-app-0 Created container microprofile-config-eap74-xp-app 0s Normal Started pod/microprofile-config-eap74-xp-app-0 Started container microprofile-config-eap74-xp-app
When the application image is created via S2I, the pod is just created and never is deleted. The deletion event we get is completely unexpected. It seems TX recovery is not triggered during the pod deletion in this case.
- is incorporated by
-
JBEAP-25079 EAP Operator 3.0 release
- Closed
- relates to
-
JBEAP-24439 EAP Operator scaling down shutdowns two pods instead of one
- Closed