Mongos
- Canonical
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/candidate | 24 | 04 Oct 2024 | |
latest/beta | 24 | 04 Oct 2024 | |
6/stable | 24 | 08 Oct 2024 | |
6/beta | 10 | 26 Mar 2024 | |
6/edge | 30 | 12 Nov 2024 |
juju deploy mongos --channel candidate
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
charms.mongos.v0.upgrade_helpers
-
- Last updated 12 Nov 2024
- Revision Library version 0.4
Manager for handling Mongos in-place upgrades.
Index
def unit_number(unit_: Unit)
Description
Get unit number. None
class StatusException
Description
Exception with ops status. None
Methods
StatusException. __init__( self , status: StatusBase )
class PrecheckFailed
Description
App is not ready to upgrade. None
Methods
PrecheckFailed. __init__( self , message: str )
class FailedToElectNewPrimaryError
Description
Raised when a new primary isn't elected after stepping down. None
class ClusterNotHealthyError
Description
Raised when the cluster is not healthy. None
class BalancerStillRunningError
Description
Raised when the balancer is still running after stopping it. None
class PeerRelationNotReady
Description
Upgrade peer relation not available (to this unit). None
class UnitState
Description
Unit upgrade state. None
class AbstractUpgrade
In-place upgrades abstract class (typing).
Description
Based off specification: DA058 - In-Place Upgrades - Kubernetes v2 (https://docs.google.com/document/d/1tLjknwHudjcHs42nzPVBNkHs98XxAOT2BXGGpP7NyEU/)
Methods
AbstractUpgrade. __init__( self , charm_: CharmBase )
AbstractUpgrade. unit_state( self )
Description
Unit upgrade state. None
AbstractUpgrade. unit_state( self , value: UnitState )
AbstractUpgrade. is_compatible( self )
Description
Whether upgrade is supported from previous versions. None
AbstractUpgrade. in_progress( self )
Description
Whether upgrade is in progress. None
AbstractUpgrade. get_unit_juju_status( self )
Description
Unit upgrade status. None
AbstractUpgrade. app_status( self )
Description
App upgrade status. None
AbstractUpgrade. versions_set( self )
Whether versions have been saved in app databag.
Description
Should only be False
during first charm install.
If a user upgrades from a charm that does not set versions, this charm will get stuck.
AbstractUpgrade. set_versions_in_app_databag( self )
Save current versions in app databag.
Description
Used after next upgrade to check compatibility (i.e. whether that upgrade should be allowed).
Whether this unit is authorized to upgrade.
Description
Only applies to machine charm
AbstractUpgrade. upgrade_unit( self )
Upgrade this unit.
Description
Only applies to machine charm
AbstractUpgrade. pre_upgrade_check( self )
Check if this app is ready to upgrade.
Description
Runs before any units are upgraded
Does not run during rollback
On machines, this runs before any units are upgraded (after juju refresh
)
On machines & Kubernetes, this also runs during pre-upgrade-check action
Can run on leader or non-leader unit
class GenericMongosUpgrade
Description
Substrate agnostif, abstract handler for upgrade events. None
Methods
GenericMongosUpgrade. __init__( self , charm: CharmBase )
GenericMongosUpgrade. is_mongos_able_to_read_write( self )
Description
Returns True if mongos is able to read and write. None
GenericMongosUpgrade. get_random_write_and_collection( self )
Description
Returns a tuple for a random collection name and a unique write to add to it. None
GenericMongosUpgrade. add_write_to_sharded_cluster( self , collection_name , write_value )
Description
Adds a the provided write to the provided database with the provided collection. None
GenericMongosUpgrade. confirm_excepted_write_cluster( self , collection_name: str , expected_write_value: str )
Description
Returns True if the replica contains the expected write in the provided collection. None
GenericMongosUpgrade. clear_tmp_collection( self , collection_name: str )
Description
Clears the temporary collection. None