Skip to content

support moving ctdb enabled pods to new addresses #9

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

Merged

Conversation

phlogistonjohn
Copy link
Collaborator

The pod that acts as a CTDB node may be migrated/restarted/or otherwise change IP address. Tweaking our approach to populating the nodes file we can update the CTDB cluster to use the node with it's new address.

Please review by 2021-09-09

I forgot my own advice against persisting booleans and so the first
step to teaching this code to do more than *just* add nodes is to
convert the "in_nodes" bool to a state value.

Signed-off-by: John Mulligan <[email protected]>
Coulda sworn I ran 'black' on this before, but apparently not?


Signed-off-by: John Mulligan <[email protected]>
This is a unique, opaque(ish) string that disambiguates a node outside
of the pnn.


Signed-off-by: John Mulligan <[email protected]>
The identity of a node helps us track the logical cluster member outside
of the strict pnn/node-ip needed by ctdb.


Signed-off-by: John Mulligan <[email protected]>
If the IP is different the state will be set to "changed" so that we
can update ctdb nodes file later.


Signed-off-by: John Mulligan <[email protected]>
Instead of only adding nodes, the command can now update an existing entry in
the state file.


Signed-off-by: John Mulligan <[email protected]>
The idea is that we end up removing/replacing the ctdb node line if our
container based node gets a new IP address.


Signed-off-by: John Mulligan <[email protected]>
@spuiuk
Copy link
Collaborator

spuiuk commented Sep 10, 2021

Still pending on me. Please give me another couple of days.

Copy link
Collaborator

@spuiuk spuiuk left a comment

Choose a reason for hiding this comment

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

Sorry for the time taken in going through the patches. I have gone through the set and they look good to me.

@phlogistonjohn
Copy link
Collaborator Author

Sorry for the time taken in going through the patches. I have gone through the set and they look good to me.

Thanks! I do appreciate it. :-)

@phlogistonjohn phlogistonjohn merged commit f3bd8e0 into samba-in-kubernetes:master Sep 13, 2021
@phlogistonjohn phlogistonjohn deleted the jjm-ctdb-replace branch June 13, 2024 18:19
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.

2 participants