cluster-api icon indicating copy to clipboard operation
cluster-api copied to clipboard

Improve "Waiting for Node volumes to be detached" log message

Open sbueringer opened this issue 1 year ago • 6 comments

Follow-up to: https://github.com/kubernetes-sigs/cluster-api/pull/11074#discussion_r1732579892

This issue is about improving the "Waiting for Node volumes to be detached" log message added in #11074.

Open questions: a) should we add details about the volumes that we are still waiting for? b) which information about the volumes should be added to the logs (e.g. are the AttachedVolume.name fields useful to users?) c) Should we add something to the condition?

Context:

// AttachedVolume describes a volume attached to a node
type AttachedVolume struct {
	// Name of the attached volume
	Name UniqueVolumeName `json:"name" protobuf:"bytes,1,rep,name=name"`

	// DevicePath represents the device path where the volume should be available
	DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"`
}

sbueringer avatar Aug 28 '24 10:08 sbueringer

/cc @enxebre @fabriziopandini

sbueringer avatar Aug 28 '24 10:08 sbueringer

/triage accepted /area logging /priority backlog

sbueringer avatar Aug 28 '24 10:08 sbueringer

/help

sbueringer avatar Aug 28 '24 14:08 sbueringer

@sbueringer: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/help

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-sigs/prow repository.

k8s-ci-robot avatar Aug 28 '24 14:08 k8s-ci-robot

I'd take this task. /assign

sivchari avatar Sep 10 '24 02:09 sivchari

Thx. I think we need some real life data to figure out what we can put in the logs

sbueringer avatar Sep 10 '24 06:09 sbueringer

Currently, I can't have time to work this. /unassign

sivchari avatar Jan 15 '25 01:01 sivchari

We did a lot of work in this area as part of improving conditions. @chrischdi I think this can be closed?

sbueringer avatar Jan 15 '25 06:01 sbueringer

Ack, we nowadays log information here:

https://github.com/kubernetes-sigs/cluster-api/blob/4d28be9bf30cb842d030ec9c9142cd9241981fa6/internal/controllers/machine/machine_controller.go#L987-L989

Which is a message Waiting for Node volumes to be detached and KV pairs for the following cases:

  • PersistentVolumeClaims
  • PersistentVolumesWithoutPVCClaimRef
  • NodeStatusVolumeNamesWithoutPV
  • PersistentVolumeNamesWithoutPV

And as addition also adding information to the deleting condition's message of v1beta2 conditions.

/close

chrischdi avatar Jan 15 '25 09:01 chrischdi

@chrischdi: Closing this issue.

In response to this:

Ack, we nowadays log information here:

https://github.com/kubernetes-sigs/cluster-api/blob/4d28be9bf30cb842d030ec9c9142cd9241981fa6/internal/controllers/machine/machine_controller.go#L987-L989

Which is a message Waiting for Node volumes to be detached and KV pairs for the following cases:

  • PersistentVolumeClaims
  • PersistentVolumesWithoutPVCClaimRef
  • NodeStatusVolumeNamesWithoutPV
  • PersistentVolumeNamesWithoutPV

And as addition also adding information to the deleting condition's message of v1beta2 conditions.

/close

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-sigs/prow repository.

k8s-ci-robot avatar Jan 15 '25 09:01 k8s-ci-robot