Bug 1574299 - Undeploy logging(enabled ops cluster), ansible throws out error "field is immutable, try updating the namespace"
Summary: Undeploy logging(enabled ops cluster), ansible throws out error "field is imm...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.0
Assignee: ewolinet
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-03 03:17 UTC by Junqi Zhao
Modified: 2018-07-30 19:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When uninstalling logging, the role was attempting to modify the 'project' api object Consequence: The task failed to remove an annotation on the project. Fix: Updated the role to modify the 'namespace' object instead. Result: The task completes successfully, as intended.
Clone Of:
Environment:
Last Closed: 2018-07-30 19:14:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:14:59 UTC

Description Junqi Zhao 2018-05-03 03:17:25 UTC
Description of problem:
Deploy logging with OPS enabled cluster firstly and undeploy logging later,ansible throws out error "field is immutable, try updating the namespace", although this error, acutually logging is undeployed.

it does not have this issue when uninstall logging without ops cluster enabled.

failed: [host-8-249-35.host.centralci.eng.rdu2.redhat.com] (item=default) => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "annotate", "project/default", "openshift.io/logging.ui.hostname-"], "delta": "0:00:00.150766", "end": "2018-05-02 22:49:53.563247", "failed": true, "msg": "non-zero return code", "project": "default", "rc": 1, "start": "2018-05-02 22:49:53.412481", "stderr": "The Project \"default\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace", "stderr_lines": ["The Project \"default\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace"], "stdout": "", "stdout_lines": []}
failed: [host-8-249-35.host.centralci.eng.rdu2.redhat.com] (item=default) => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "annotate", "project/kube-system", "openshift.io/logging.ui.hostname-"], "delta": "0:00:00.160766", "end": "2018-05-02 22:49:53.872717", "failed": true, "msg": "non-zero return code", "project": "kube-system", "rc": 1, "start": "2018-05-02 22:49:53.711951", "stderr": "The Project \"kube-system\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace", "stderr_lines": ["The Project \"kube-system\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace"], "stdout": "", "stdout_lines": []}
failed: [host-8-249-35.host.centralci.eng.rdu2.redhat.com] (item=default) => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "annotate", "project/openshift", "openshift.io/logging.ui.hostname-"], "delta": "0:00:00.144843", "end": "2018-05-02 22:49:54.166567", "failed": true, "msg": "non-zero return code", "project": "openshift", "rc": 1, "start": "2018-05-02 22:49:54.021724", "stderr": "The Project \"openshift\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace", "stderr_lines": ["The Project \"openshift\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace"], "stdout": "", "stdout_lines": []}
failed: [host-8-249-35.host.centralci.eng.rdu2.redhat.com] (item=default) => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "annotate", "project/openshift-infra", "openshift.io/logging.ui.hostname-"], "delta": "0:00:00.143219", "end": "2018-05-02 22:49:54.449129", "failed": true, "msg": "non-zero return code", "project": "openshift-infra", "rc": 1, "start": "2018-05-02 22:49:54.305910", "stderr": "The Project \"openshift-infra\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace", "stderr_lines": ["The Project \"openshift-infra\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace"], "stdout": "", "stdout_lines": []}
failed: [host-8-249-35.host.centralci.eng.rdu2.redhat.com] (item=default) => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "annotate", "project/openshift-logging", "openshift.io/logging.ui.hostname-"], "delta": "0:00:00.142494", "end": "2018-05-02 22:49:54.734202", "failed": true, "msg": "non-zero return code", "project": "openshift-logging", "rc": 1, "start": "2018-05-02 22:49:54.591708", "stderr": "The Project \"openshift-logging\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace", "stderr_lines": ["The Project \"openshift-logging\" is invalid: metadata.annotations[openshift.io/logging.ui.hostname]: Invalid value: \"kibana-ops.apps.0502-x-a.qe.rhcloud.com\": field is immutable, try updating the namespace"], "stdout": "", "stdout_lines": []}

Version-Release number of selected component (if applicable):
openshift-ansible-3.10.0-0.32.0.git.0.bb50d68.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Deploy logging with OPS enabled cluster firstly
2. Undeploy logging
3.

Actual results:
Failed to uninstall logging

Expected results:
Should be no error when uninstall logging

Additional info:

Comment 1 Junqi Zhao 2018-05-03 03:20:25 UTC
it trying to update the annotations of project: default,kube-system,openshift,openshift-infra,openshift-logging

Comment 4 Junqi Zhao 2018-05-16 02:27:25 UTC
Tested with openshift-ansible-3.10.0-0.46.0.git.0.85c3afd.el7.noarch,  Undeploy logging(enabled ops cluster) is successful.

Note:
annotation openshift.io/logging.ui.hostname is removed from project: default,kube-system,openshift,openshift-infra,openshift-logging

Comment 6 errata-xmlrpc 2018-07-30 19:14:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816


Note You need to log in before you can comment on or make changes to this bug.