-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexceptions.py
More file actions
79 lines (41 loc) · 2.07 KB
/
Copy pathexceptions.py
File metadata and controls
79 lines (41 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
"""Charm-specific exceptions."""
from single_kernel_postgresql.compat.postgresql import PostgreSQLBaseError
class PostgreSQLFileOperationError(PostgreSQLBaseError):
"""Exception thrown when file operations related to PostgreSQL fail."""
class StorageUnavailableError(Exception):
"""Cannot find storage mountpoint."""
class SettingSystemPasswordError(PostgreSQLBaseError):
"""Exception thrown when setting the system password fails."""
class PostgreSQLCannotConnectError(Exception):
"""Cannot run smoke check on connected Database."""
class TlsError(Exception):
"""TLS implementation internal exception."""
class RaftPostgresqlNotUpError(Exception):
"""Postgresql not yet started."""
class RaftPostgresqlStillUpError(Exception):
"""Postgresql not yet down."""
class RaftNotPromotedError(Exception):
"""Leader not yet set when reinitialising raft."""
class ClusterNotPromotedError(Exception):
"""Raised when a cluster is not promoted."""
class NotReadyError(Exception):
"""Raised when not all cluster members healthy or finished initial sync."""
class EndpointNotReadyError(Exception):
"""Raised when an endpoint is not ready."""
class StandbyClusterAlreadyPromotedError(Exception):
"""Raised when a standby cluster is already promoted."""
class RemoveRaftMemberFailedError(Exception):
"""Raised when a remove raft member failed for some reason."""
class AddRaftMemberFailedError(Exception):
"""Raised when adding raft member failed for some reason."""
class SwitchoverFailedError(Exception):
"""Raised when a switchover failed for some reason."""
class SwitchoverNotSyncError(SwitchoverFailedError):
"""Raised when a switchover failed because node is not sync."""
class UpdateSyncNodeCountError(Exception):
"""Raised when updating synchronous_node_count failed for some reason."""
class DeployedWithoutTrustError(Exception):
"""Raised when the K8s API denies access because the app wasn't deployed with --trust."""