Skip to content
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

bugfix: the csinode driver status failed updating #2509

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

elinx
Copy link

@elinx elinx commented Sep 27, 2022

fix #2508 the existing implementation still keeps the deleted driver
status as true, this pr fix it.

Signed-off-by: xilinxing [email protected]

@volcano-sh-bot volcano-sh-bot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Sep 27, 2022
@volcano-sh-bot volcano-sh-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 27, 2022
@elinx elinx changed the title bugfix: the csinode driver status failed deleted bugfix: the csinode driver status failed updating Sep 27, 2022
@volcano-sh-bot volcano-sh-bot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Sep 27, 2022
@volcano-sh-bot
Copy link
Contributor

@elinx: GitHub didn't allow me to assign the following users: jiangkaihua.

Note that only volcano-sh members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @jiangkaihua

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.

@elinx
Copy link
Author

elinx commented Sep 27, 2022

@william-wang @jiangkaihua


for i := range csiNode.Spec.Drivers {
d := csiNode.Spec.Drivers[i]
csiNodeStatus.DriverStatus[d.Name] = d.Allocatable != nil && d.Allocatable.Count != nil
}
sc.CSINodesStatus[csiNode.Name] = csiNodeStatus
Copy link
Member

Choose a reason for hiding this comment

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

if csiNodeStatus exists in sc.CSINodesStatus[csiNode.Name], we still create a new csiNodeStatus?

Copy link
Author

@elinx elinx Sep 27, 2022

Choose a reason for hiding this comment

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

Yes, the old status should be overrided completely because we don't know which driver pod is dead or recreated, otherwise there may left some non existent driver status as true.

The existing implementation still keeps the deleted driver
status as true, this pr fix it.

Signed-off-by: xilinxing <[email protected]>
Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2022
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 28, 2022
@volcano-sh-bot volcano-sh-bot merged commit b485ba8 into volcano-sh:release-1.6 Sep 28, 2022
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. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants