8000 Event metadata for node reboot events is wrong · Issue #134503 · kubernetes/kubernetes · GitHub
[go: up one dir, main page]

Skip to content

Event metadata for node reboot events is wrong #134503

@alvaroaleman

Description

@alvaroaleman

What happened?

A node reboot event looks like this:

$ k get event kind-control-plane.186cd0d5e2253993 -oyaml
apiVersion: v1
count: 1
eventTime: null
firstTimestamp: "2025-10-09T11:59:31Z"
involvedObject:
  kind: Node
  name: kind-control-plane
  uid: kind-control-plane
kind: Event
lastTimestamp: "2025-10-09T11:59:31Z"
message: 'Node kind-control-plane has been rebooted, boot id: fda92249-bc38-49ea-b0c7-e664b214e43e'
metadata:
  creationTimestamp: "2025-10-09T11:59:34Z"
  name: kind-control-plane.186cd0d5e2253993
  namespace: default
  resourceVersion: "28264"
  uid: 7be02699-db88-4886-ae5c-f47be0b0c30c
reason: Rebooted
reportingComponent: kubelet
reportingInstance: kind-control-plane
source:
  component: kubelet
  host: kind-control-plane
type: Warning

This is missing involvedObject.apiVersion and has the uid set to the name of the node rather than the uid.
This seems to be caused by using a nodeRef in the recorder as opposed to an actual node object:

kl.recorder.Eventf(kl.nodeRef, eventType, event, "Node %s status is now: %s", kl.nodeName, event)

/sig node

What did you expect to happen?

Correctly set involvedObject.apiVersion and uid fields

How can we reproduce it (as minimally and precisely as possible)?

Reboot a node

Anything else we need to know?

No response

Kubernetes version

1.34 ```console $ kubectl version # paste output here ```

Cloud provider

any

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0