You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
feat(cmapi): MCOL-5133: Stage3 stand alone cli tool.
MAJOR: Some logic inside node remove changed significantly using active nodes list from Columnstore.xml to broadcast config after remove. [fix] TransactionManager passsing extra, remove and optional nodes arguments to start_transaction function [fix] commit and rollback methods of TransactionManager adding nodes argument [fix] TransactionManager using success_txn_nodes inside [fix] remove node logic to use Transaction manager [fix] cluster set api key call using totp on a top level cli call [add] missed docstrings [fix] cluster shutdown timeout for next release
This commit is contained in:
committed by
Leonid Fedorov
parent
c40e4ba00d
commit
27e3b8d808
@ -22,7 +22,7 @@ from cmapi_server.helpers import (
|
||||
from cmapi_server.managers.transaction import TransactionManager
|
||||
from mcs_cluster_tool.decorators import handle_output
|
||||
from mcs_node_control.models.node_config import NodeConfig
|
||||
from cmapi.cmapi_server.controllers.api_clients import ClusterControllerClient
|
||||
from cmapi_server.controllers.api_clients import ClusterControllerClient
|
||||
|
||||
|
||||
logger = logging.getLogger('mcs_cli')
|
||||
@ -191,9 +191,6 @@ def restart():
|
||||
|
||||
@node_app.command(rich_help_panel='cluster node commands')
|
||||
@handle_output
|
||||
@TransactionManager(
|
||||
timeout=timedelta(days=1).total_seconds(), handle_signals=True
|
||||
)
|
||||
def add(
|
||||
nodes: Optional[List[str]] = typer.Option(
|
||||
...,
|
||||
@ -206,8 +203,12 @@ def add(
|
||||
):
|
||||
"""Add nodes to the Columnstore cluster."""
|
||||
result = []
|
||||
for node in nodes:
|
||||
result.append(client.add_node({'node': node}))
|
||||
with TransactionManager(
|
||||
timeout=timedelta(days=1).total_seconds(), handle_signals=True,
|
||||
extra_nodes=nodes
|
||||
):
|
||||
for node in nodes:
|
||||
result.append(client.add_node({'node': node}))
|
||||
return result
|
||||
|
||||
|
||||
@ -224,8 +225,12 @@ def remove(nodes: Optional[List[str]] = typer.Option(
|
||||
):
|
||||
"""Remove nodes from the Columnstore cluster."""
|
||||
result = []
|
||||
for node in nodes:
|
||||
result.append(client.remove_node(node))
|
||||
with TransactionManager(
|
||||
timeout=timedelta(days=1).total_seconds(), handle_signals=True,
|
||||
remove_nodes=nodes
|
||||
):
|
||||
for node in nodes:
|
||||
result.append(client.remove_node(node))
|
||||
return result
|
||||
|
||||
|
||||
@ -265,6 +270,7 @@ def api_key(key: str = typer.Option(..., help='API key to set.')):
|
||||
return client.set_api_key(key)
|
||||
|
||||
|
||||
#TODO: remove in next releases
|
||||
@set_app.command()
|
||||
@handle_output
|
||||
def log_level(level: str = typer.Option(..., help='Logging level to set.')):
|
||||
|
Reference in New Issue
Block a user