Module cartridge.admin

Administration functions.

Functions

get_servers ([uuid]) Get servers list.
get_replicasets ([uuid]) Get replicasets list.
probe_server (uri) Discover an instance.
join_server (args) Join an instance to the cluster.
edit_server (args) Edit an instance.
expel_server (uuid) Expel an instance.
enable_servers (uuids) Enable nodes after they were disabled.
disable_servers (uuids) Temporarily diable nodes.
edit_replicaset (args) Edit replicaset parameters.
get_failover_enabled () Get current failover state.
set_failover_enabled (enabled) Enable or disable automatic failover.
bootstrap () Call vshard.router.bootstrap().

Tables

ServerInfo Instance general information.
ReplicasetInfo Replicaset general information.

Local Functions

get_stat (uri) Retrieve box.slab.info of a remote server.
get_info (uri) Retrieve box.cfg and box.info of a remote server.
get_self () Get alias, uri and uuid of current instance.


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

  1. nil
  2. table Error description
edit_server (args)
Edit an instance.

Parameters:

Returns:

    boolean true

Or

  1. nil
  2. table Error description
expel_server (uuid)
Expel an instance. Forever.

Parameters:

Returns:

    boolean true

Or

  1. nil
  2. table Error description
enable_servers (uuids)
Enable nodes after they were disabled.

Parameters:

Returns:

    {ServerInfo,...}

Or

  1. nil
  2. table Error description
disable_servers (uuids)
Temporarily diable nodes.

Parameters:

Returns:

    {ServerInfo,...}

Or

  1. nil
  2. table Error description
edit_replicaset (args)
Edit replicaset parameters.

Parameters:

Returns:

    boolean true

Or

  1. nil
  2. table Error description
get_failover_enabled ()
Get current failover state.
set_failover_enabled (enabled)
Enable or disable automatic failover.

Parameters:

  • enabled boolean

Returns:

    boolean New failover state

Or

  1. nil
  2. table Error description
bootstrap ()
Call vshard.router.bootstrap(). This function distributes all buckets across the replica sets.

Returns:

    boolean true

Or

  1. nil
  2. table Error description

Tables

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.

Local Functions

get_stat (uri)
Retrieve box.slab.info of a remote server.

Parameters:

Returns:

    table

Or

  1. nil
  2. table Error description
get_info (uri)
Retrieve box.cfg and box.info of a remote server.

Parameters:

Returns:

    table

Or

  1. nil
  2. table Error description
get_self ()
Get alias, uri and uuid of current instance.

Returns:

    table
generated by LDoc 1.4.6 Last updated 2019-08-29 23:56:02