kubernetes / kubernetes

Production-Grade Container Scheduling and Management
https://kubernetes.io
Apache License 2.0
110.98k stars 39.63k forks source link

CSINode's driver count never updated #111007

Open dulek opened 2 years ago

dulek commented 2 years ago

What happened?

After reconfiguring the openstack-cloud-provider (specifically Cinder CSI) to set new node-volume-attach-limit to 10, kubelet doesn't update the value held in CSINode object. The reason is most likely at [1] but [2] doesn't help either.

[1] https://github.com/kubernetes/kubernetes/blob/8174b0923cb60c13bd738f9baa6422f3445207d7/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go#L525-L538 [2] https://github.com/kubernetes/kubernetes/blob/0f41aaf138a2ac45dc5435dd42ea7f7ee932b155/pkg/apis/storage/validation/validation.go#L308-L318

What did you expect to happen?

I'd expect the CSINode to be updated with a new value so that scheduler can take it into account as specified in KEP [1]:

Kubelet will periodically reconcile CSINode and overwrite the value.

[1] https://github.com/kubernetes/enhancements/blob/0e4d5df19d396511fe41ed0860b0ab9b96f46a2d/keps/sig-storage/554-maximum-volume-count/README.md#implementation-detail-for-all-csi-drivers

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

Deploy K8s on OpenStack with Cinder CSI driver. Then change the CSI driver configuration to set:

[BlockStorage]
node-volume-attach-limit = 10

After restarting the CSI driver check the CSINode. The value of spec.drivers[0].allocatable.count will stay 256.

Anything else we need to know?

No response

Kubernetes version

```console $ kubectl version Kubernetes Version: v1.24.0+9ddc8b1 ```

Cloud provider

OpenStack (Cinder CSI)

OS version

No response

Install tools

OpenShift

Container runtime (CRI) and version (if applicable)

No response

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

No response

dulek commented 2 years ago

/sig storage

niulechuan commented 2 years ago

I think we trigger plugins reconcile by fsnotify, which cannot be triggered when we update the CSI driver config. for example node-volume-attach-limit.

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

dulek commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

dulek commented 1 year ago

/remove-lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

dulek commented 1 year ago

/remove-lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

xing-yang commented 1 year ago

/triage accepted

xing-yang commented 1 year ago

/remove-lifecycle stale

xing-yang commented 1 year ago

/help

k8s-ci-robot commented 1 year ago

@xing-yang: This request has been marked as needing help from a contributor.

Guidelines

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

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](https://github.com/kubernetes/kubernetes/issues/111007): >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
carlory commented 1 year ago

/assign

k8s-triage-robot commented 3 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted