Repairing the cluster
cartridge repair command repairs a running application.
Here are several simple rules you need to know before using this command:
- Do not use
repairif you aren’t sure that it’s exactly what you need.
- Always run
- Do not hesitate to use the
- Do not use the
--forceoption if you aren’t sure that it’s exactly what you need.
Please look at the
cartridge repair [subcommand]
Below is a list of the available repair commands.
cartridge repair remove-instance UUID [flags]
Removes an instance with the specified UUID from the cluster. If the instance isn’t found, raises an error.
cartridge repair set-leader REPLICASET-UUID INSTANCE-UUID [flags]
Sets an instance as the leader of the replica set. Raises an error in the following cases:
- There is no replica set or instance with that UUID.
- The instance doesn’t belong to the replica set.
- The instance has been disabled or expelled.
cartridge repair set-uri INSTANCE-UUID URI-TO [flags]
Rewrites the instance’s advertise_uri parameter. Raises an error if the instance isn’t found or is expelled.
The following flags work with any
||(Required) Application name.|
||The directory containing the instances“ working directories.
The following flags work with any repair command except
||The directory where PID and socket files are stored.
||Launch in dry-run mode: show changes but do not apply them.|
||Enable instance configuration reload after the patch.|
The default data and run directories for
repair differ from those
used by other
cartridge-cli commands. This is because
intended for production use, while other commands are for local development.
repair also supports global flags.
It patches cluster-wide instance configuration files that you have on your local machine. Note that it’s not enough to apply the new configuration, the instance has to reload it.
repair was created for production use, it can still be applied in
local development. The command requires to specify
--name, the application name.
Also, remember that the default data directory is
the default run directory is
To specify other directories, use the
--run-dir options correspondingly
or provide the paths in the
In default mode,
repair walks through all cluster-wide configurations
<data-dir>/<app-name>.* directories, patching all the configuration
files it locates.
--dry-run flag specified, files won’t be patched,
and you will only see the computed configuration diff.
If different instances on the local machine use different configuration files,
repair raises an error.
To patch different configuration versions independently, use the
If your application uses
cartridge >= 2.0.0,
you can also run
repair with the
to reload configuration for all your instances
through the console sockets in the run directory.
Make sure that you have the correct run directory specified
when you use