[jboss-jira] [JBoss JIRA] (WFWIP-175) Operator doesn't react on env removal

Petr Kremensky (Jira) issues at jboss.org
Fri Aug 16 08:28:00 EDT 2019


     [ https://issues.jboss.org/browse/WFWIP-175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Petr Kremensky updated WFWIP-175:
---------------------------------
    Description: 
Removing env from WildFlyServerSpec is not reflected by Operator.

*Actual:*
 * removing env doesn't trigger update action
 * removed envs are never actually removed prom the projects

*Expected:*
 * removing env does trigger update action
 * removed envs are removed prom the projects

*Steps to reproduce:*

{code}
cat  eap-operator.yaml
...
spec:
  applicationImage: <image>
  env:
    - name: TEST_START
      value: INITIAL
  size: 1
...
{code}
Deploy and see the envs
{code}
oc apply -f eap-operator.yaml
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=INITIAL
{code}

change the value of variable to TEST_START=UPDATE
{code}
oc edit wildflyserver eap-operator
  env:
  - name: TEST_START
    value: UPDATE
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
{code}

change the name of variable to TEST_UPDATE=UPDATE - {color:red}a new one is created!{color}
{code}
oc edit wildflyserver eap-operator
  env:
  - name: TEST_UPDATE
    value: UPDATE
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
{code}

remove the entire env section from spec - {color:red}delete envs are not removed!{color}
{code}
oc edit wildflyserver eap-operator
# no pods update is triggered, operator didn't react on envs removal
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
{code}

add a new env - {color:red}pod still contains deleted envs!{color}
{code}
oc edit wildflyserver eap-operator
  env:
  - name: TEST_ADD
    value: ADD
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
TEST_ADD=ADD
{code}

  was:
Removing env from WildFlyServerSpec is not reflected by Operator.

*Actual:*
 * removing env doesn't trigger update action
 * removed envs are never actually removed prom the projects

*Expected:*
 * removing env does trigger update action
 * removed envs are removed prom the projects

*Steps to reproduce:*

{code}
cat  eap-operator.yaml
...
spec:
  applicationImage: <image>
  env:
    - name: TEST_START
      value: INITIAL
  size: 1
...
{code}
Deploy and see the envs
{code}
oc apply -f eap-operator.yaml
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=INITIAL
{code}

change the value of variable to TEST_START=UPDATE
{code}
oc edit wildflyserver eap-operator
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
{code}

change the name of variable to TEST_UPDATE=UPDATE - {color:red}a new one is created!{color}
{code}
oc edit wildflyserver eap-operator
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
{code}

remove the env section from spec - {color:red}delete envs are not removed!{color}
{code}
oc edit wildflyserver eap-operator
# no pods update is triggered, operator didn't react on envs removal
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
{code}

add a new env - {color:red}pod still contains deleted envs!{color}
{code}
oc edit wildflyserver eap-operator
  env:
  - name: TEST_ADD
    value: ADD
# wait till the eap pod is terminated, a new one is started instead
oc set env pod/eap-operator-0 --list | grep TEST
TEST_START=UPDATE
TEST_UPDATE=UPDATE
TEST_ADD=ADD
{code}



> Operator doesn't react on env removal
> -------------------------------------
>
>                 Key: WFWIP-175
>                 URL: https://issues.jboss.org/browse/WFWIP-175
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: OpenShift
>            Reporter: Petr Kremensky
>            Assignee: Brian Stansberry
>            Priority: Blocker
>
> Removing env from WildFlyServerSpec is not reflected by Operator.
> *Actual:*
>  * removing env doesn't trigger update action
>  * removed envs are never actually removed prom the projects
> *Expected:*
>  * removing env does trigger update action
>  * removed envs are removed prom the projects
> *Steps to reproduce:*
> {code}
> cat  eap-operator.yaml
> ...
> spec:
>   applicationImage: <image>
>   env:
>     - name: TEST_START
>       value: INITIAL
>   size: 1
> ...
> {code}
> Deploy and see the envs
> {code}
> oc apply -f eap-operator.yaml
> oc set env pod/eap-operator-0 --list | grep TEST
> TEST_START=INITIAL
> {code}
> change the value of variable to TEST_START=UPDATE
> {code}
> oc edit wildflyserver eap-operator
>   env:
>   - name: TEST_START
>     value: UPDATE
> # wait till the eap pod is terminated, a new one is started instead
> oc set env pod/eap-operator-0 --list | grep TEST
> TEST_START=UPDATE
> {code}
> change the name of variable to TEST_UPDATE=UPDATE - {color:red}a new one is created!{color}
> {code}
> oc edit wildflyserver eap-operator
>   env:
>   - name: TEST_UPDATE
>     value: UPDATE
> # wait till the eap pod is terminated, a new one is started instead
> oc set env pod/eap-operator-0 --list | grep TEST
> TEST_START=UPDATE
> TEST_UPDATE=UPDATE
> {code}
> remove the entire env section from spec - {color:red}delete envs are not removed!{color}
> {code}
> oc edit wildflyserver eap-operator
> # no pods update is triggered, operator didn't react on envs removal
> oc set env pod/eap-operator-0 --list | grep TEST
> TEST_START=UPDATE
> TEST_UPDATE=UPDATE
> {code}
> add a new env - {color:red}pod still contains deleted envs!{color}
> {code}
> oc edit wildflyserver eap-operator
>   env:
>   - name: TEST_ADD
>     value: ADD
> # wait till the eap pod is terminated, a new one is started instead
> oc set env pod/eap-operator-0 --list | grep TEST
> TEST_START=UPDATE
> TEST_UPDATE=UPDATE
> TEST_ADD=ADD
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list