Bug 1701450

Summary: Controller prints namespace and label in wrong order
Product: OpenShift Container Platform Reporter: Jianwei Hou <jhou>
Component: Cloud ComputeAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: Jianwei Hou <jhou>
Severity: low Docs Contact:
Priority: low    
Version: 4.1.0CC: agarcial, zhsun
Target Milestone: ---   
Target Release: 4.1.0   
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: 2019-06-04 10:47:47 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 Jianwei Hou 2019-04-19 04:45:55 UTC
Description of problem:
The controller-manager mistook the MachineSet's label for its namespace and vice versa.

I0419 03:39:00.297342       1 controller.go:296] MachineSet "jhou1-95htj-worker-ap-northeast-1c" in namespace "cluster.k8s.io/cluster-name" doesn't specify "openshift-machine-api" label, assuming nil cluster
I0419 03:39:00.298353       1 controller.go:296] MachineSet "jhou1-95htj-worker-ap-northeast-1c" in namespace "cluster.k8s.io/cluster-name" doesn't specify "openshift-machine-api" label, assuming nil cluster

Version-Release number of selected component (if applicable):
4.1.0-0.nightly-2019-04-18-210657

How reproducible:
Always

Steps to Reproduce:
1. oc logs machine-api-controllers-56fdc847d7-fjqgc -c controller-manager -f

Actual results:
This needs to be corrected on both machine and machineSet.

https://github.com/openshift/cluster-api-provider-aws/blob/master/vendor/github.com/openshift/cluster-api/pkg/controller/machine/controller.go#L300

https://github.com/openshift/cluster-api-provider-aws/blob/master/vendor/github.com/openshift/cluster-api/pkg/controller/machineset/controller.go#L296

Expected results:


Additional info:

Comment 1 Jan Chaloupka 2019-04-23 08:15:58 UTC
Upstream PR: https://github.com/kubernetes-sigs/cluster-api/pull/871

Comment 2 Jan Chaloupka 2019-04-23 08:29:22 UTC
Backported PR: https://github.com/openshift/cluster-api/pull/32

Comment 3 Jan Chaloupka 2019-04-25 10:49:29 UTC
Backporting changes to aws-actuator for the machine controller: https://github.com/openshift/cluster-api-provider-aws/pull/204

Comment 5 sunzhaohua 2019-04-26 08:17:48 UTC
verified.

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-0.nightly-2019-04-25-121505   True        False         4h47m   Cluster version is 4.1.0-0.nightly-2019-04-25-121505

I0426 08:07:52.575421       1 controller.go:128] Reconciling Machine "zhsun9-pgmk8-worker-us-east-2b-mnf6r"
I0426 08:07:52.575445       1 controller.go:307] Machine "zhsun9-pgmk8-worker-us-east-2b-mnf6r" in namespace "cluster.k8s.io/cluster-name" doesn't specify "openshift-machine-api" label, assuming nil cluster
I0426 08:07:52.575458       1 actuator.go:377] Checking if machine exists
I0426 08:07:52.682385       1 actuator.go:390] Instance exists as "i-0b4008d507322c230"
I0426 08:07:52.682415       1 controller.go:241] Reconciling machine "zhsun9-pgmk8-worker-us-east-2b-mnf6r" triggers idempotent update
I0426 08:07:52.682424       1 actuator.go:303] updating machine
I0426 08:07:52.682570       1 actuator.go:311] obtaining EC2 client for region
I0426 08:07:52.722231       1 actuator.go:328] found 1 instances for machine
I0426 08:07:52.722259       1 actuator.go:347] instance found
I0426 08:07:52.722287       1 actuator.go:474] Updating status
I0426 08:07:52.722344       1 actuator.go:518] finished calculating AWS status
I0426 08:07:52.722437       1 actuator.go:151] status unchanged

Comment 7 errata-xmlrpc 2019-06-04 10:47:47 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-2019:0758