[jboss-jira] [JBoss JIRA] (WFWIP-254) Changes in volumeClaimTemplate triggers creation of a new statefulset
Petr Kremensky (Jira)
issues at jboss.org
Thu Oct 17 10:03:00 EDT 2019
Petr Kremensky created WFWIP-254:
------------------------------------
Summary: Changes in volumeClaimTemplate triggers creation of a new statefulset
Key: WFWIP-254
URL: https://issues.jboss.org/browse/WFWIP-254
Project: WildFly WIP
Issue Type: Bug
Components: OpenShift
Reporter: Petr Kremensky
Assignee: Jeff Mesnil
Adding a volumeClaimTemplate, or existing an existing one leads to the re-creation of statefulset -> all pods are immediately terminated and route is unavailable until some of the pods is ready again.
*reproduce*
* deploy operator {noformat}./build/run-openshift.sh{noformat}
* deploy updatedquickstart project from operator repository {noformat}cat deploy/crds/quickstart-cr.yaml
apiVersion: wildfly.org/v1alpha1
kind: WildFlyServer
metadata:
name: quickstart
spec:
applicationImage: "quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0"
replicas: 2
storage:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 1Mi
oc apply -f deploy/crds/quickstart-cr.yaml{noformat}
* wait for both replicas to be ready & print ss creation timestamp & verify application readiness {noformat}oc get pods
NAME READY STATUS RESTARTS AGE
quickstart-0 1/1 Running 0 2m48s
quickstart-1 1/1 Running 0 2m48s
wildfly-operator-54455dbcd8-flnd4 1/1 Running 0 69m
oc get statefulset.apps/quickstart --template={{.metadata.creationTimestamp}}
2019-10-17T13:55:03Z
curl quickstart-route-wildfly.apps-crc.testing
{"ip":"10.128.1.36"}
{noformat}
* edit the storage field (e.g. storage: 1Mi -> storage: 2Mi)
* notice the both pods are terminating, stateful set creation timestamp has changed and application route is not available until one of the pods will start again (could take a minute){noformat}oc get pods
NAME READY STATUS RESTARTS AGE
quickstart-0 1/1 Terminating 0 5m42s
quickstart-1 1/1 Terminating 0 5m42s
wildfly-operator-54455dbcd8-flnd4 1/1 Running 0 72m
oc get statefulset.apps/quickstart --template={{.metadata.creationTimestamp}}
2019-10-17T14:00:44Z
curl quickstart-route-wildfly.apps-crc.testing
...
Application is not available
...
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list