Skip to content

Conversation

@davidz627
Copy link
Contributor

@davidz627 davidz627 commented Nov 1, 2018

/assign @verult @saad-ali
/cc @bertinatto @jsafrane @vladimirvivien

/kind feature
/sig storage

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #70504

This PR Introduces the Installed field and MigratedOnNode field to the CSINodeInfo object. The semantics of the object have also been changed so that on driver installation we create/update the driver info with Installed=true and on uninstallation of the driver the driver info object persists but Installed=false. This enables detection of version/configuration skew between master and node for CSI Migration (kubernetes/enhancements#625).

I have also added hooks for un-registering/uninstalling the driver

Breaking change: CSINodeInfo split into Spec and Status. New fields Available and VolumePluginMechanism added to CSINodeInfo csi-api object. CSIDriverInfo no longer deleted on Driver uninstallation, instead Available flag is set to false.

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 1, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Nov 1, 2018
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Nov 1, 2018
@davidz627
Copy link
Contributor Author

/assign @liggitt
for API review/approval

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this block removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodeInfo should never be nil here, it's an error if it is and we want to fail fast

@davidz627
Copy link
Contributor Author

/assign @thockin @lavalamp @smarterclayton
the original API reviewers for this API

@davidz627 davidz627 force-pushed the feature/csiNodeInfo branch from 750c423 to 1ee61f6 Compare November 1, 2018 21:18
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Nov 1, 2018
@davidz627 davidz627 force-pushed the feature/csiNodeInfo branch 3 times, most recently from 0fe427d to 02b677b Compare November 1, 2018 22:00
@davidz627
Copy link
Contributor Author

/retest

@davidz627 davidz627 force-pushed the feature/csiNodeInfo branch from 7c96be0 to ca72b25 Compare November 8, 2018 22:39
Copy link
Contributor

@verult verult left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic largely LGTM, minus a couple of nits.

Will leave to API reviewers to give the final LGTM

@davidz627 davidz627 force-pushed the feature/csiNodeInfo branch from ca72b25 to c7e7c90 Compare November 9, 2018 00:44
@davidz627
Copy link
Contributor Author

/retest

1 similar comment
@davidz627
Copy link
Contributor Author

/retest

@davidz627 davidz627 force-pushed the feature/csiNodeInfo branch from c7e7c90 to 06f3b26 Compare November 9, 2018 03:45
description: Whether the CSI driver is installed.
type: boolean
volumePluginMechanism:
description: Indicates to external components the required mechanism
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd expect these descriptions to match the comments on the go type? We can fix that in a followup since it's probably a tooling problem...

@lavalamp
Copy link
Contributor

lavalamp commented Nov 9, 2018

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627, lavalamp, mikedanese, saad-ali

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2018
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit e133ab2 into kubernetes:master Nov 9, 2018
@davidz627 davidz627 deleted the feature/csiNodeInfo branch November 9, 2018 18:05
Copy link
Member

@msau42 msau42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please work with @verult to update and cut a new external provisioner. This impacts his e2e work for csi topology.

For CSI Migration Alpha we expect any user who turns on the feature has both
Kubelet and ADC at a version where the CSINodeInfo's are being created on
Kubelet startup. We will not promote the feature to Beta (on by default) until
the CSINodeInfo's are being created on Kubelet startup for a 2 version skew to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is going to work. CSINodeInfo is under an alpha feature gate which means they won't be created by default. I think you might need two feature gates, one for controller and one for nodes, then move the node feature gate to beta first.

Or ADC should fallback to intree if migration is on but CSINodeInfo doesn't exist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nm I think I got it now. The CSIMigration feature gate cannot move to beta until 2 releases after CSINodeInfo is beta. It might be good to explicitly detail this here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no I'm confused again. The logic that auto creates CSINodeInfo objects for migrated drivers will be under the specific plugin's CSIMigration feature gate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#70909

The plan is that CSINodeInfo objects are auto created iff CSINodeInfo feature gate is on.
Then the gates for each CSIMigration plugin can only go Beta (default) 2 releases after the CSINodeInfos have been added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be happy to discuss in-person

// This MUST be the same name returned by the CSI GetPluginName() call for
// that driver.
Driver string `json:"driver"`
Name string `json:"name"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the driver is upgraded and changes values stored in the spec? Are we allowing spec to be mutable for this reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Spec should be mutable as topology keys or node ID may change for the driver

@liggitt liggitt removed the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add explicit "Installed" and "MigratedOnNode" fields to CSINodeInfo