lightdb_service.py — start/stop/restart a LightDB service
lightdb_service.py
[ --help
| -h
] [
--filename
| -F
install_info
] [
--command
| -c
start,stop,restart,status
] [ --cn_only
| -C
] [ --dn_only
| -D
] [ --primary_only
| -P
] [ --standby_only
| -S
] [
--node
| -n
node_info
] --dry-run
[ --force
| -f
] [ --verbose
| -v
] [ --quiet
| -q
] [
--parallel
| -B
parallel_processes
] [
--log_dir
| -l
directory
]
lightdb_service.py is a utility for start/stop a LightDB service. It can full start or stop all component in a LightDB service installed by installer. It also has a simple status detection feature and can use some special mode to start or stop service.
The LightDB service must be installed by installer to use this application.
lightdb_service.py accepts the following command-line arguments:
-h
--help
show this help message and exit.
[-F] install_info
[--filename ]install_info
Specifies a path to a json file containing installation information(default use uninstall/uninstallFile.json).
[-c] start,stop,restart,status
[--command ]start,stop,restart,status
start/stop/restart/status lightdb service.
-C
--cn_only
Only start/stop/restart coordinator node.
-D
--dn_only
Only start/stop/restart data node.
-P
--primary_only
Only start/stop/restart primary node for primary restart.
-S
--standby_only
Only start/stop/restart standby node for standby restart.
-D
--quiet
Do not display progress messages.
-n node_info
--node node_info
Only start/stop/restart specified node, node_info formart: ip:port.
--dry-run
Show what would happen for action, but don't execute it.
-f
--force
force stop, even if some nodes are in incorrect state, skip incorrect nodes.
-B parallel_processes
--parallel parallel_processes
Number of segment hosts to run in parallel. Default is 1.
-v
--verbose
Debug print
-q
--quiet
suppress status messages for stdout logging
-l directory
--log_dir directory
Logfile directory, default is /tmp/ltAdminLogs.
In case of difficulty, see log file for detail error messge.
To start all test
:
$
lightdb_service.py -c start
To stop all:
$
lightdb_service.py -c stop
To restart all:
$
lightdb_service.py -c restart
To check status:
$
lightdb_service.py -c status
To start/stop/restart primary only(The active and standby states remain unchanged):
$
lightdb_service.py -c start/stop/restart --primary_only
To start/stop/restart standby only(The active and standby states remain unchanged):
$
lightdb_service.py -c start/stop/restart --standby_only
To start/stop/restart cn node only:
$
lightdb_service.py -c start/stop/restart --cn_only
To start/stop/restart dn node only:
$
lightdb_service.py -c start/stop/restart --dn_only
To start/stop/restart primary in dn node only:
$
lightdb_service.py -c start/stop/restart --dn_only --primary_only
To start/stop/restart specify node only(The active and standby states remain unchanged):
$
lightdb_service.py -c start/stop/restart -n 10.20.148.122:54333
To force stop:
$
lightdb_service.py -c stop -f
To dry run start command:
$
lightdb_service.py -c start --dry-run