History | View | Annotate | Download (26.6 kB)
cluster-merge: remove a hardcoded constant
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
cluster-merge: add instance restart strategy opt
Right now we always restart all instances, which is not right if someinstances were already down for other reasons. Thus we add an option todecide how to handle this. The right default should be "up" which is:...
cluster-merge: remove option list from usage
It doesn't make sense to have to keep them up to date twice, and --helpalready lists all of them with help strings.
Merge branch 'stable-2.4' into devel-2.4
Add error checking and merging for cluster params
Set the default stderr logging level to WARNING so the relevant outputcan be seen.
Signed-off-by: Stephen Shirley <diamond@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Revert "Only merge nodes that are known to not be offline"
This reverts commit 288f240f62dafa8bd8ba7482c8367adbdf6d96c2.
That commit was buggy at various levels: - broke ssh access to the second cluster, making cluster-merge unusable (unless ssh key were previously setup?)...
cluster-merge: only operate on online nodes
The node list in MergerData is used only to: - stop ganeti on the nodes - readd the nodes to the clusterAs such offline nodes should be skipped from it.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Only merge nodes that are known to not be offline
Otherwise the readd will fail, breaking the merge.
Signed-off-by: Stephen Shirley <diamond@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix pylint warnings
- 1 80-char line infraction- 4 changes in how arguments are passed to logging functions- 3 pylint disable-msg's because cluster-merge needs to access ganeti config internals
Signed-off-by: Stephen Shirley <diamond@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>...
Add support for merging node groups
Signed-off-by: Stephen Shirley <diamond@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add option to rename groups on conflict
Don't remove master_candidate flag from merged nodes
Prevents lots of spurious warnings like:2011-02-10 17:00:22,776: CRITICAL Configuration data is not consistent:Not enough master candidates: actual 3, target 4
Signed-off-by: Stephen Shirley <diamond@google.com>...
Use a consistent ECID base
ECID was being calculated completely differently in__MergeNodeGroups() and _MergeConfig()
Revert "Disable the cluster-merge tool for the moment"
This reverts commit c0711f2cb989facd60430ab18c5b0e59a1f279ac.
Signed-off-by: Stephen Shirley <diamond@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix cluster-merging by not stopping noded
cli.RunWhileClusterStopped() stops noded on all of the nodes in theoriginal cluster. This prevents /etc/hosts updates on the master, andconfig redistribution doesn't reach the other nodes in the originalcluster. As all we want to do is merge while the master is stopped,...
Minor reordering to match param order
Use gnt-node add --force-join to add foreign nodes
Fix iterating over node groups
Current line tries to unpack dict incorrectly
Disable the cluster-merge tool for the moment
Hopefully this can be fixed before the final 2.4 release…
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>Reviewed-by: Stephen Shirley <diamond@google.com>
Merge node groups from other cluster
Fix grammar of var naming
flatten is the verb, flattened is the adjective.
cluster-merge should refuse to merge own cluster
Also fix type of Merger.cluster_name from list to string. This wouldhave triggered an error in sshRunner if cluster keys were in use.
Signed-off-by: Stephen Shirley <diamond@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Open other clusters' config in foreign mode
Add (unused) arg to _OfflineClusterMerge
cli._RunWhileClusterStoppedHelper.Call passes (self, *args) to functionscalled via cli.RunWhileClusterStoppedHelper(). The code in cluster-mergewas broken by commit d8aab233.
Using the added stop-all functionality from daemon-utils in cluster-merge
Additionally also move to the RunWhileStopped method for the configuration merger.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>...
Update docstrings in tools/ and enable epydoc
This patch updates the docstrings in tools/ (mostly in lvmstrap, whichis very very old code-base) and then enabled the tools in this directoryfor 'make apidoc' too.
Signed-off-by: Iustin Pop <iustin@google.com>...
Mark cluster-merge as executable
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Switch from os.path.join to utils.PathJoin
This passes a full burnin with lots of instances, and should be safe aswe mostly to join a known root (various constants) to a run-timevariable.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Make pylint happy
I was using a too old version which doesn't got all those. Thispatch is fixing the new lint errors.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Adding tool for automated cluster-merger
This is the implementation of docs/design-cluster-merger.rst. It allowsthe automatic merging of one or more clusters into the invoking cluster.
While this version is tested and working it still needs some tweaking...