Bug 1387130

Summary: Upgrading OpenShift 3.3.0 metrics fails with "spec: Forbidden: pod updates may not change fields other than `containers[*].image` or `spec.activeDeadlineSeconds`"
Product: OpenShift Container Platform Reporter: Miheer Salunke <misalunk>
Component: HawkularAssignee: Matt Wringe <mwringe>
Status: CLOSED DUPLICATE QA Contact: Peng Li <penli>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aos-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-20 14:19:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miheer Salunke 2016-10-20 07:57:05 UTC
Description of problem:

I have upgraded by OpenShift cluster to 3.3.0. I have upgraded the logging EFK stack. Upgrading the metrics stack fails.

I am running
[root@master ~]# oc new-app -f /usr/share/openshift/examples/infrastructure-templates/enterprise/metrics-deployer.yaml -p HAWKULAR_METRICS_HOSTNAME=metrics.xxxxx.xxx.xxxxxxxxx.xx,CASSANDRA_PV_SIZE=10Gi,METRIC_DURATION=800,MODE=refresh

this ends up with the following message:

PREFLIGHT CHECK SUCCEEDED
validate_master_accessible: ok
validate_hostname: The HAWKULAR_METRICS_HOSTNAME value is deemed acceptable.
validate_deployer_secret: ok
Deleting any previous deployment (leaving route and PVCs)
POD_NAME metrics-deployer-hxetq
The Pod "metrics-deployer-hxetq" is invalid.
spec: Forbidden: pod updates may not change fields other than `containers[*].image` or `spec.activeDeadlineSeconds`


Version-Release number of selected component (if applicable):
OCP 3.3

How reproducible:
Always

Steps to Reproduce:
1.Mentioned in the description
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Matt Wringe 2016-10-20 14:19:28 UTC
This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1381336

The solution is to slightly change how your run the command so that is has consistent behaviour, and its actually a more correct way of doing it. The old documented way of doing things works in most situations, unless you happen to give your admin the anyuid permission, then you can run into problems.

PR for doc update: https://github.com/openshift/openshift-docs/pull/3018

In essence, when you deploy metrics you need to run it as the deployer user.

Eg:

$ oc new-app --as=system:serviceaccount:openshift-infra:metrics-deployer \
    -f metrics-deployer.yaml \
    -p HAWKULAR_METRICS_HOSTNAME=hawkular-metrics.example.com

*** This bug has been marked as a duplicate of bug 1381336 ***