Module cartridge.admin
Administration functions.
-
get_servers ([uuid])
-
Get servers list.
Optionally filter out the server with given uuid.
Parameters:
Returns:
{ServerInfo,...}
-
get_replicasets ([uuid])
-
Get replicasets list.
Optionally filter out the replicaset with given uuid.
Parameters:
Returns:
{ReplicasetInfo,...}
-
probe_server (uri)
-
Discover an instance.
Parameters:
-
join_server (args)
-
Join an instance to the cluster.
Parameters:
Returns:
boolean
true
Or
-
nil
-
table
Error description
-
edit_server (args)
-
Edit an instance.
Parameters:
Returns:
boolean
true
Or
-
nil
-
table
Error description
-
expel_server (uuid)
-
Expel an instance.
Forever.
Parameters:
Returns:
boolean
true
Or
-
nil
-
table
Error description
-
enable_servers (uuids)
-
Enable nodes after they were disabled.
Parameters:
Returns:
{ServerInfo,...}
Or
-
nil
-
table
Error description
-
disable_servers (uuids)
-
Temporarily diable nodes.
Parameters:
Returns:
{ServerInfo,...}
Or
-
nil
-
table
Error description
-
edit_replicaset (args)
-
Edit replicaset parameters.
Parameters:
Returns:
boolean
true
Or
-
nil
-
table
Error description
-
get_failover_enabled ()
-
Get current failover state.
-
set_failover_enabled (enabled)
-
Enable or disable automatic failover.
Parameters:
Returns:
boolean
New failover state
Or
-
nil
-
table
Error description
-
bootstrap ()
-
Call
vshard.router.bootstrap()
.
This function distributes all buckets across the replica sets.
Returns:
boolean
true
Or
-
nil
-
table
Error description
-
ServerInfo
-
Instance general information.
Fields:
- alias
string
Human-readable instance name.
- uri
string
- uuid
string
- disabled
boolean
- status
string
Instance health.
- message
string
Auxilary health status.
- replicaset
ReplicasetInfo
Circular reference to a replicaset.
- priority
number
Leadership priority for automatic failover.
-
ReplicasetInfo
-
Replicaset general information.
Fields:
- uuid
string
The replicaset UUID.
- roles
{string,...}
Roles enabled on the replicaset.
- status
string
Replicaset health.
- master
ServerInfo
Replicaset leader according to configuration.
- active_master
ServerInfo
Active leader.
- weight
number
Vshard replicaset weight.
Matters only if vshard-storage role is enabled.
- vshard_group
string
Name of vshard group the replicaset belongs to.
- all_rw
boolean
A flag indicating that all servers in the replicaset should be read-write.
- alias
string
Human-readable replicaset name.
- servers
{ServerInfo,...}
Circular reference to all instances in the replicaset.
-
get_stat (uri)
-
Retrieve
box.slab.info
of a remote server.
Parameters:
Returns:
table
Or
-
nil
-
table
Error description
-
get_info (uri)
-
Retrieve
box.cfg
and box.info
of a remote server.
Parameters:
Returns:
table
Or
-
nil
-
table
Error description
-
get_self ()
-
Get alias, uri and uuid of current instance.
Returns:
table