Skip to content

Conversation

@anson627
Copy link

@anson627 anson627 commented Nov 12, 2025

fix #533

@anson627
Copy link
Author

@derekbit can you please help to take a look?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the robustness of persistent volume (PV) deletion by adding fallback logic to retrieve the node name from the local.path.provisioner/selected-node annotation when NodeAffinity information is missing or invalid. This addresses scenarios where PVs might have incomplete or corrupted NodeAffinity specifications but still have the annotation set during provisioning.

Key Changes:

  • Added annotation-based node name retrieval as a fallback mechanism when NodeAffinity is unavailable
  • Improved error messages to reference the missing annotation when both NodeAffinity and annotation are absent
  • Added debug logging when NodeAffinity and annotation values differ, with NodeAffinity taking precedence

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if annoNode != "" {
return path, annoNode, nil
}
return "", "", fmt.Errorf("cannot find affinited node and missing %s annotation", nodeNameAnnotationKey)
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

"affinited" is not a proper English word. Consider using "node with affinity" or "affinity-matched node" instead.

Suggested change
return "", "", fmt.Errorf("cannot find affinited node and missing %s annotation", nodeNameAnnotationKey)
return "", "", fmt.Errorf("cannot find affinity-matched node and missing %s annotation", nodeNameAnnotationKey)

Copilot uses AI. Check for mistakes.
@derekbit
Copy link
Member

@anson627
The issue is addessed by #533 (comment). Do we still need the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retry blocking reconcile loop when pv/pvc stuck with nodes are deleted

2 participants