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 | 204 | 12 Nov 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.v0.set_status
-
- Last updated 16 Sep 2024
- Revision Library version 0.6
Code for handing statuses in the app and unit.
Index
class MongoDBStatusHandler
Description
Verifies versions across multiple integrated applications. None
Methods
MongoDBStatusHandler. __init__( self , charm: CharmBase )
Constructor for CrossAppVersionChecker.
Arguments
charm to inherit from.
Description
Sets the charm status and shares to app status and config-server if applicable. None
MongoDBStatusHandler. set_app_status( self )
Description
TODO Future Feature/Epic: parse statuses and set a status for the entire app. None
MongoDBStatusHandler. is_current_unit_ready( self , ignore_unhealthy_upgrade: bool )
Returns True if the current unit status shows that the unit is ready.
Description
Note: we allow the use of ignore_unhealthy_upgrade, to avoid infinite loops due to this function returning False and preventing the status from being reset.
Returns True if the current status is related to a mimsatch in revision.
Description
Note: A few functions calling this method receive states differently. One receives them by "goal state" which processes data differently and the other via the ".status" property. Hence we have to be flexible to handle each.
MongoDBStatusHandler. are_all_units_ready_for_upgrade( self , unit_to_ignore: str )
Description
Returns True if all charm units status's show that they are ready for upgrade. None
MongoDBStatusHandler. are_shards_status_ready_for_upgrade( self )
Returns True if all integrated shards status's show that they are ready for upgrade.
Description
A shard is ready for upgrade if it is either in the waiting for upgrade status or active status.
Description
Shares this shards status info to the config server. None
MongoDBStatusHandler. is_unit_status_ready_for_upgrade( self )
Description
Returns True if the status of the current unit reflects that it is ready for upgrade. None
MongoDBStatusHandler. process_statuses( self )
Retrieves statuses from processes inside charm and returns the highest priority status.
Description
When a non-fatal error occurs while processing statuses, the error is processed and returned as a statuses.
TODO: add more status handling here for other cases: i.e. TLS, or resetting a status that should not be reset
MongoDBStatusHandler. get_statuses( self )
Description
Retrieves statuses for the different processes running inside the unit. None
MongoDBStatusHandler. prioritize_statuses( self , statuses: Tuple )
Description
Returns the status with the highest priority from backups, sharding, and mongod. None
MongoDBStatusHandler. get_invalid_integration_status( self )
Description
Returns a status if an invalid integration is present. None
MongoDBStatusHandler. get_cluster_mismatched_revision_status( self )
Description
Returns a Status if the cluster has mismatched revisions. None
def
build_unit_status(
mongodb_config: MongoConfiguration,
unit_host: str
)
Description
Generates the status of a unit based on its status reported by mongod. None