Charmed MongoDB
- By Canonical Data Platform
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
6/stable | 164 | 26 Mar 2024 | |
6/candidate | 164 | 26 Mar 2024 | |
6/beta | 164 | 26 Mar 2024 | |
6/edge | 170 | 17 Apr 2024 | |
5/stable | 117 | 20 Apr 2023 | |
5/candidate | 117 | 20 Apr 2023 | |
5/edge | 139 | 21 Nov 2023 | |
3.6/stable | 100 | 28 Apr 2023 | |
3.6/candidate | 100 | 13 Apr 2023 | |
3.6/edge | 100 | 03 Feb 2023 |
juju deploy mongodb --channel 6/stable
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
charms.mongodb.v1.shards_interface
-
- Last updated 16 Feb 2024
- Revision Library version 1.6
In this class, we manage relations between config-servers and shards.
This class handles the sharing of secrets between sharded components, adding shards, and removing shards.
Index
class ShardAuthError
Description
Raised when a shard doesn't have the same auth as the config server. None
Methods
class RemoveLastShardError
Description
Raised when there is an attempt to remove the last shard in the cluster. None
class ShardingProvider
Description
Manage relations between the config server and the shard, on the config-server's side. None
Methods
Description
Constructor for ShardingProvider object. None
Description
Runs the pre-hooks checks for ShardingProvider, returns True if all pass. None
Adds shards to cluster.
Description
raises: PyMongoError
Removes shards from cluster.
Description
raises: PyMongoError, NotReadyError
Description
Sends new credentials, for a key value pair across all shards. None
Description
Updates the hosts for mongos on the relation data. None
Description
Returns the current status of the config-server. None
Description
Returns true if the status check should be skipped. None
Description
Returns True if currently related to shards. None
Description
Returns a list of related shards. None
Description
Returns a list of unreable shard hosts. None
Description
Returns true if mongos service is running. None
Description
Returns the shard that is currently draining. None
class ConfigServerRequirer
Description
Manage relations between the config server and the shard, on the shard's side. None
Methods
ConfigServerRequirer. __init__( self , charm: CharmBase , relation_name: str )
Description
Constructor for ShardingProvider object. None
ConfigServerRequirer. pass_hook_checks( self , event )
Description
Runs the pre-hooks checks for ConfigServerRequirer, returns True if all pass. None
ConfigServerRequirer. wait_for_draining( self , mongos_hosts )
Description
Waits for shards to be drained from sharded cluster. None
ConfigServerRequirer. get_shard_status( self )
Returns the current status of the shard.
Description
Note: No need to report if currently draining, since that check block other hooks from executing.
ConfigServerRequirer. skip_shard_status( self )
Description
Returns true if the status check should be skipped. None
ConfigServerRequirer. drained( self , mongos_hosts , shard_name: str )
Returns whether a shard has been drained from the cluster.
Description
Raises: ConfigurationError, OperationFailure, ShardNotInClusterError, ShardNotPlannedForRemovalError
ConfigServerRequirer. update_operator_password( self , new_password: str )
Updates the password for the operator user.
Description
Raises: RetryError
ConfigServerRequirer. update_keyfile( self , key_file_contents: str )
Description
Updates keyfile on all units. None
ConfigServerRequirer. has_config_server( self )
Description
Returns True if currently related to config server. None
Description
Returns the related config server. None
ConfigServerRequirer. get_mongos_hosts( self )
Description
Returns a list of IP addresses for the mongos hosts. None