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

Fix key and ownerRef bug #718

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Fix key and ownerRef bug #718

merged 2 commits into from
Nov 27, 2024

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Nov 27, 2024

csi-lib-utils/leaderelection:sanitizeName() is used to sanitize the leader identity used for the leases csiaddonsnode need to store the key with same format so that it can be used to get the connection.

The pod owned by deployment might move to new nodes and this might create the stale CSIAddonsNode object on the old node if we set Deployment as the ownerRef (this could leave stale connection in connection map and a CR).
so, we need to set the pod as the owner for the deployment as we dont store any details that are required later on for any other operations like Fencing etc.

@Madhu-1 Madhu-1 changed the title Fix key and ownerRef buy Fix key and ownerRef bug Nov 27, 2024
@Madhu-1
Copy link
Member Author

Madhu-1 commented Nov 27, 2024

@Mergifyio rebase

Copy link

mergify bot commented Nov 27, 2024

rebase

☑️ Nothing to do

  • queue-position = -1 [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • -conflict [📌 rebase requirement]
  • any of:
    • #commits > 1 [📌 rebase requirement]
    • #commits-behind > 0 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]

@Madhu-1
Copy link
Member Author

Madhu-1 commented Nov 27, 2024

@Mergifyio rebase

namespace + "/" + leader identity(pod name)
is the key for the connection.
this key is used by GetLeaderByDriver to
get the connection.
csi-lib-utils/leaderelection:sanitizeName() is
used to sanitize the leader identity used
for the leases csiaddonsnode need to store the
key with same format so that it can be used
to get the connection.

Signed-off-by: Madhu Rajanna <[email protected]>
The pod might move to new nodes and this
might create the stale CSIAddonsNode object.
so, we need to set the pod as the owner
for the deployment as we dont store any details
that are required later on for any other
operations like Fencing etc.

Signed-off-by: Madhu Rajanna <[email protected]>
Copy link

mergify bot commented Nov 27, 2024

rebase

☑️ Nothing to do

  • queue-position = -1 [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • -conflict [📌 rebase requirement]
  • any of:
    • #commits > 1 [📌 rebase requirement]
    • #commits-behind > 0 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]

@mergify mergify bot merged commit f037599 into csi-addons:main Nov 27, 2024
15 checks passed
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.

3 participants