-
Notifications
You must be signed in to change notification settings - Fork 11
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
[WIP] Allow to respawn node with different set of arguments #190
base: main
Are you sure you want to change the base?
Conversation
Hi @s0me0ne-unkn0wn, thanks for your feedback and contribution!! Related to individual changes:
This looks great!
Did you think make sense to expose this method? Looks like will be always using followed by a re-spawn call since only kill the node will leave the node in the network but the process/pod inaccessible (maybe we can add a state flag). Maybe we can call it internally in the respawn method.
I think this is a great, we made some hack in v1 to allow to restart the node with a modified
This looks great!!
Sounds good,
Yes, Again, thanks for your feedback and contribution!! If you have time I will ping you to talks about this and implement the needed changes to support this feature also in kubernetes. Thx! -- |
Sure! It's a great tool we're actively using so I'm interested in making it better :) |
based on #190 cc: @s0me0ne-unkn0wn
I made these changes while researching a quite specific use case. Not all of them may be useful for the general public, but I believe some of them may.
Everything is implemented for the native provider only at the moment. I currently lack the expertise to implement it for Kubernetes.
It also introduces changes in publicly exposed interfaces, so that should be considered a breaking change.
An approximate list of what's been done and why:
nodes_by_name
hashmap in theorchestrator::Network
. It didn't make sense from the POV of performance (as a zombienet is unlikely to be of size exceeding a couple of hundreds of nodes), but cloning structures around was effectively sealing the network at the moment it was spawned, not allowing to change it dynamically;network::network::Relaychain
andnetwork::network::Parachain
when a new validator or collator is added;Thoughts and ideas:
pub async fn restart_with(&mut self, mutate: impl FnMut(&mut NetworkNode))
that would kill the node, run the closure to alter its configuration, and then re-spawn the node, but that gives less leverage to the developer. This needs to be discussed as well.I'll add a usage example a bit later. Feel free to ask questions, provide suggestions, add your commits, etc.