New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure corev1 schema is registered #1518
Make sure corev1 schema is registered #1518
Conversation
When upgrading 4.2.16 to 4.2.18 I noticed that the `machine-config` cluster operator remained at 4.2.16. Looking at the logs of the `machine-config-operator` I noticed the following: ``` I0227 20:34:38.428822 1 start.go:42] Version: v4.2.15-202001171551-dirty (31fed93) E0227 20:34:38.458532 1 event.go:247] Could not construct reference to: '&v1.ConfigMap{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"machine-config", GenerateName:"", Namespace:"openshift-machine-config-operator", SelfLink:"/api/v1/namespaces/openshift-machine-config-operator/configmaps/machine-config", UID:"9305be83-59a0-11ea-a084-064dd2f0c578", ResourceVersion:"42279333", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63718432478, loc:(*time.Location)(0x23664a0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string{"control-plane.alpha.kubernetes.io/leader":"{\"holderIdentity\":\"machine-config-operator-596785879d-qsb4k_9302eaa1-59a0-11ea-923a-0a580a810191\",\"leaseDurationSeconds\":90,\"acquireTime\":\"2020-02-27T20:34:38Z\",\"renewTime\":\"2020-02-27T20:34:38Z\",\"leaderTransitions\":0}"}, OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Data:map[string]string(nil), BinaryData:map[string][]uint8(nil)}' due to: 'no kind is registered for the type v1.ConfigMap in scheme "github.com/openshift/machine-config-operator/cmd/common/helpers.go:30"'. Will not report event: 'Normal' 'LeaderElection' 'machine-config-operator-596785879d-qsb4k_9302eaa1-59a0-11ea-923a-0a580a810191 became leader' I0227 20:34:38.786752 1 operator.go:246] Starting MachineConfigOperator ``` It seemed to me that the corev1 schema was not registered so I added `corev1.AddToScheme(scheme)` for the schema used by the `recorder`.
Hi @zregvart. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
Thanks for the patch! |
/retest |
Thanks @sinnykumari looks like the error is no longer present on this PRs build. |
Does this need a bugzilla? And do we want to backport this? |
/approve |
@runcom could you PTAL are we missing something here or is it good to go? |
Just checking if there is something I need to do on my end to get this merged? |
We will review and merge once master reopens. 🙂 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: runcom, sinnykumari, zregvart The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
When upgrading 4.2.16 to 4.2.18 I noticed that the
machine-config
cluster operator remained at 4.2.16. Looking at the logs of the
machine-config-operator
I noticed the following:It seemed to me that the corev1 schema was not registered so I added
corev1.AddToScheme(scheme)
for the schema used by therecorder
.- What I did
Run the upgrade from 4.2.16 to 4.2.18, looked at the logs of the
machine-config-operator
, so addedcorev1.AddToScheme(scheme)
for the schema used by therecorder
incmd/common/helpers.go
.- How to verify it
Not sure if this has anything to do with the upgrade. Perhaps just running the operator and seeing that the message
Could not construct reference to...
is not logged.- Description for the changelog
Fixed recording of LeaderElection event