MongoDB
- Canonical
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
6/stable | 199 | 04 Oct 2024 | |
6/candidate | 199 | 04 Oct 2024 | |
6/beta | 199 | 04 Oct 2024 | |
6/edge | 206 | 13 Dec 2024 | |
5/stable | 117 | 20 Apr 2023 | |
5/candidate | 117 | 20 Apr 2023 | |
5/edge | 139 | 21 Nov 2023 | |
5/edge | 109 | 06 Mar 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 09 Oct 2024
- Revision Library version 1.12
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
Returns True if all the sanity hook checks for sharding pass. 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
Updates the new CA for all related shards. None
Description
Returns the current status of the config-server. None
Description
Returns true if the status check should be skipped. None
Description
Returns a list of the shards related to the config-server. None
Description
Returns True if currently related to shards. None
Description
Returns a list of related shards. None
Description
Returns a list of relation data for 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
Description
Returns True if the cluster password is synced. 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. get_membership_auth_modes( self , event: RelationChangedEvent )
Description
Returns the available authentication membership forms. None
ConfigServerRequirer. update_member_auth( self , event: RelationChangedEvent , membership_auth )
Description
Updates the shard to have the same membership auth as the config-server. None
ConfigServerRequirer. get_cluster_passwords( self , relation_id: int )
Description
Retrieves shared cluster passwords. None
ConfigServerRequirer. sync_cluster_passwords( self , event: EventBase , operator_password: str , backup_password: str )
Description
Updates shared cluster passwords. None
ConfigServerRequirer. relation_created( self , event: RelationJoinedEvent )
Description
Sets status and flags in relation data relevant to sharding. None
ConfigServerRequirer. pass_hook_checks( self , event: EventBase )
Description
Runs the pre-hooks checks for ConfigServerRequirer, returns True if all pass. None
ConfigServerRequirer. pass_sanity_hook_checks( self , event: EventBase )
Description
Returns True if all the sanity hook checks for sharding pass. None
ConfigServerRequirer. pass_tls_hook_checks( self , event: EventBase )
Description
Returns True if the TLS checks for sharding pass. None
ConfigServerRequirer. wait_for_draining( self , mongos_hosts )
Description
Waits for shards to be drained from sharded cluster. None
ConfigServerRequirer. get_relations_statuses( self )
Description
Returns status based on relations and their validity regarding sharding. None
ConfigServerRequirer. get_tls_statuses( self )
Description
Returns statuses relevant to TLS. 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_password( self , username: str , new_password: str )
Description
Updates the password for the given user. None
ConfigServerRequirer. update_keyfile( self , key_file_contents: str )
Description
Updates keyfile on all units. None
ConfigServerRequirer. cluster_password_synced( self )
Description
Returns True if the cluster password is synced for the shard. None
ConfigServerRequirer. get_shard_members( self )
Returns a list of shard members.
Description
Raises: PyMongoError
ConfigServerRequirer. has_config_server( self )
Description
Returns True if currently related to config server. None
ConfigServerRequirer. get_config_server_name( self )
Description
Returns the related config server's name. None
ConfigServerRequirer. get_config_server_relation( self )
Description
Returns the related config server relation data. None
ConfigServerRequirer. get_mongos_hosts( self )
Description
Returns a list of IP addresses for the mongos hosts. None
ConfigServerRequirer. is_ca_compatible( self )
Description
Returns true if both the shard and the config server use the same CA. None
ConfigServerRequirer. is_shard_tls_missing( self )
Description
Returns true if the config-server has TLS enabled but the shard does not. None
ConfigServerRequirer. is_config_server_tls_missing( self )
Description
Returns true if the shard has TLS enabled but the config-server does not. None