qontract-reconcile 0.10.2.dev278__py3-none-any.whl → 0.10.2.dev279__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/RECORD +6 -6
- reconcile/aus/base.py +8 -41
- reconcile/utils/ocm/upgrades.py +0 -20
- {qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev279
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
|
6
6
|
Project-URL: repository, https://github.com/app-sre/qontract-reconcile
|
{qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/RECORD
RENAMED
@@ -117,7 +117,7 @@ reconcile/vpc_peerings_validator.py,sha256=aESqrhm1tpkc2iqSL1UV5to_HjNgjRSffD0cr
|
|
117
117
|
reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
118
118
|
reconcile/aus/advanced_upgrade_service.py,sha256=Cx-WthkvlcX58PrnnNeo_bQG17Xw3BGNu3f53Jc1VoA,23985
|
119
119
|
reconcile/aus/aus_label_source.py,sha256=o0S2f0qwcII_8nzhHZhRQ83gEZ1DrSXyO4xzSwLebuU,4382
|
120
|
-
reconcile/aus/base.py,sha256=
|
120
|
+
reconcile/aus/base.py,sha256=Gd76QvSO2PjINjsth7sEeJPrD1a0TLYtpgNzTWIzj2w,50016
|
121
121
|
reconcile/aus/cluster_version_data.py,sha256=VZWbUEIbrDKO-sroMpQtiWCTqDraTMd8tssKV0HyTQ0,7140
|
122
122
|
reconcile/aus/healthchecks.py,sha256=jR9c-syh9impnkV0fd6XW3Bnk7iRN5zv8oCRYM-yIRY,2700
|
123
123
|
reconcile/aus/metrics.py,sha256=BhIvZVTn25fIzijz3xFynJngS2sXDBTxxprUUVWJcFo,4246
|
@@ -737,7 +737,7 @@ reconcile/utils/ocm/sre_capability_labels.py,sha256=nqh0imrYczNeeeC7ZNX3pEwuAIVk
|
|
737
737
|
reconcile/utils/ocm/status_board.py,sha256=8DYeIrOsW8Bh5PCtKdvGGpaxb9Wugcc5rLxZJ8Z7b_s,4181
|
738
738
|
reconcile/utils/ocm/subscriptions.py,sha256=hehKXsDXIhnhqvWOuiYvx6y2FGq3zt0APGYj7WiBIdI,2765
|
739
739
|
reconcile/utils/ocm/syncsets.py,sha256=9IQm1l5BodOVZa2OFbQmow3afmh4nXe5pn-CCJ5LxTI,1169
|
740
|
-
reconcile/utils/ocm/upgrades.py,sha256=
|
740
|
+
reconcile/utils/ocm/upgrades.py,sha256=W8-sLgETI_418ftY9vBlXswyjx_KdhJTJO9cwBL3hfY,4162
|
741
741
|
reconcile/utils/rosa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
742
742
|
reconcile/utils/rosa/rosa_cli.py,sha256=zV8kKG5s3oFJwyW3E7xxNzqSE7JydrmBx169Jxm8sew,11331
|
743
743
|
reconcile/utils/rosa/session.py,sha256=CwlQJ7eEfaMjVOt_6KoNJZc4oQj-iC-EOZq8eSGzjuI,6861
|
@@ -797,7 +797,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
797
797
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=oF7C4hpIgyMTwTRm3Aun3cDCHIjVar65JoLp6NcJHlU,3909
|
798
798
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
799
799
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
800
|
-
qontract_reconcile-0.10.2.
|
801
|
-
qontract_reconcile-0.10.2.
|
802
|
-
qontract_reconcile-0.10.2.
|
803
|
-
qontract_reconcile-0.10.2.
|
800
|
+
qontract_reconcile-0.10.2.dev279.dist-info/METADATA,sha256=4VMuEqWlD_8n_w3YF3iolN1wiU0tvQrGBovEfdKuYHE,24501
|
801
|
+
qontract_reconcile-0.10.2.dev279.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
802
|
+
qontract_reconcile-0.10.2.dev279.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
803
|
+
qontract_reconcile-0.10.2.dev279.dist-info/RECORD,,
|
reconcile/aus/base.py
CHANGED
@@ -83,8 +83,6 @@ from reconcile.utils.ocm.upgrades import (
|
|
83
83
|
create_control_plane_upgrade_policy,
|
84
84
|
create_node_pool_upgrade_policy,
|
85
85
|
create_upgrade_policy,
|
86
|
-
delete_control_plane_upgrade_policy,
|
87
|
-
delete_upgrade_policy,
|
88
86
|
get_control_plane_upgrade_policies,
|
89
87
|
get_node_pool_upgrade_policies,
|
90
88
|
get_upgrade_policies,
|
@@ -467,7 +465,7 @@ class AddonUpgradePolicy(AbstractUpgradePolicy):
|
|
467
465
|
|
468
466
|
|
469
467
|
class ClusterUpgradePolicy(AbstractUpgradePolicy):
|
470
|
-
"""Class to create
|
468
|
+
"""Class to create ClusterUpgradePolicies in OCM"""
|
471
469
|
|
472
470
|
def create(self, ocm_api: OCMBaseClient) -> None:
|
473
471
|
policy = {
|
@@ -478,11 +476,7 @@ class ClusterUpgradePolicy(AbstractUpgradePolicy):
|
|
478
476
|
create_upgrade_policy(ocm_api, self.cluster.id, policy)
|
479
477
|
|
480
478
|
def delete(self, ocm_api: OCMBaseClient) -> None:
|
481
|
-
|
482
|
-
raise ValueError(
|
483
|
-
"Cannot delete cluster upgrade policy without id (not created yet)"
|
484
|
-
)
|
485
|
-
delete_upgrade_policy(ocm_api, self.cluster.id, self.id)
|
479
|
+
raise NotImplementedError("ClusterUpgradePolicy.delete() not implemented")
|
486
480
|
|
487
481
|
def summarize(self) -> str:
|
488
482
|
details = {
|
@@ -509,11 +503,7 @@ class ControlPlaneUpgradePolicy(AbstractUpgradePolicy):
|
|
509
503
|
create_control_plane_upgrade_policy(ocm_api, self.cluster.id, policy)
|
510
504
|
|
511
505
|
def delete(self, ocm_api: OCMBaseClient) -> None:
|
512
|
-
|
513
|
-
raise ValueError(
|
514
|
-
"Cannot delete controlplane upgrade policy without id (not created yet)"
|
515
|
-
)
|
516
|
-
delete_control_plane_upgrade_policy(ocm_api, self.cluster.id, self.id)
|
506
|
+
raise NotImplementedError("ControlPlaneUpgradePolicy.delete() not implemented")
|
517
507
|
|
518
508
|
def summarize(self) -> str:
|
519
509
|
details = {
|
@@ -527,7 +517,7 @@ class ControlPlaneUpgradePolicy(AbstractUpgradePolicy):
|
|
527
517
|
|
528
518
|
class NodePoolUpgradePolicy(AbstractUpgradePolicy):
|
529
519
|
node_pool: str
|
530
|
-
"""Class to create
|
520
|
+
"""Class to create NodePoolUpgradePolicies in OCM"""
|
531
521
|
|
532
522
|
def create(self, ocm_api: OCMBaseClient) -> None:
|
533
523
|
policy = {
|
@@ -910,38 +900,21 @@ def upgradeable_version(
|
|
910
900
|
def verify_current_should_skip(
|
911
901
|
current_state: Sequence[AbstractUpgradePolicy],
|
912
902
|
desired: ClusterUpgradeSpec,
|
913
|
-
|
914
|
-
addon_id: str = "",
|
915
|
-
) -> tuple[bool, UpgradePolicyHandler | None]:
|
903
|
+
) -> bool:
|
916
904
|
current_policies = [c for c in current_state if c.cluster.id == desired.cluster.id]
|
917
905
|
if not current_policies:
|
918
|
-
return False
|
906
|
+
return False
|
919
907
|
|
920
908
|
# there can only be one upgrade policy per cluster
|
921
909
|
if len(current_policies) != 1:
|
922
910
|
raise ValueError(
|
923
911
|
f"[{desired.org.org_id}/{desired.cluster.name}] expected only one upgrade policy"
|
924
912
|
)
|
925
|
-
current = current_policies[0]
|
926
|
-
version = current.version # may not exist in automatic upgrades
|
927
|
-
if version and not addon_id and desired.version_blocked(version):
|
928
|
-
next_run = current.next_run
|
929
|
-
if next_run and datetime.strptime(next_run, "%Y-%m-%dT%H:%M:%SZ") < now:
|
930
|
-
logging.warning(
|
931
|
-
f"[{desired.org.org_id}/{desired.org.name}/{desired.cluster.name}] currently upgrading to blocked version '{version}'"
|
932
|
-
)
|
933
|
-
return True, None
|
934
|
-
logging.debug(
|
935
|
-
f"[{desired.org.org_id}/{desired.org.name}/{desired.cluster.name}] found planned upgrade policy "
|
936
|
-
+ f"with blocked version {version}"
|
937
|
-
)
|
938
|
-
return False, UpgradePolicyHandler(action="delete", policy=current)
|
939
913
|
|
940
|
-
# else
|
941
914
|
logging.debug(
|
942
915
|
f"[{desired.org.org_id}/{desired.org.name}/{desired.cluster.name}] skipping cluster with existing upgrade policy"
|
943
916
|
)
|
944
|
-
return True
|
917
|
+
return True
|
945
918
|
|
946
919
|
|
947
920
|
def verify_schedule_should_skip(
|
@@ -1129,14 +1102,8 @@ def calculate_diff(
|
|
1129
1102
|
set_upgrading(spec.cluster.id, spec.effective_mutexes, sector_name)
|
1130
1103
|
continue
|
1131
1104
|
|
1132
|
-
|
1133
|
-
skip, delete_policy = verify_current_should_skip(
|
1134
|
-
current_state, spec, now, addon_id
|
1135
|
-
)
|
1136
|
-
if skip:
|
1105
|
+
if verify_current_should_skip(current_state, spec):
|
1137
1106
|
continue
|
1138
|
-
if delete_policy:
|
1139
|
-
diffs.append(delete_policy)
|
1140
1107
|
|
1141
1108
|
next_schedule = verify_schedule_should_skip(spec, now, addon_id)
|
1142
1109
|
if not next_schedule:
|
reconcile/utils/ocm/upgrades.py
CHANGED
@@ -77,15 +77,6 @@ def create_upgrade_policy(ocm_api: OCMBaseClient, cluster_id: str, spec: dict) -
|
|
77
77
|
ocm_api.post(f"{build_cluster_url(cluster_id)}/upgrade_policies", spec)
|
78
78
|
|
79
79
|
|
80
|
-
def delete_upgrade_policy(
|
81
|
-
ocm_api: OCMBaseClient, cluster_id: str, policy_id: str
|
82
|
-
) -> None:
|
83
|
-
"""
|
84
|
-
Deletes an existing Upgrade Policy
|
85
|
-
"""
|
86
|
-
ocm_api.delete(f"{build_cluster_url(cluster_id)}/upgrade_policies/{policy_id}")
|
87
|
-
|
88
|
-
|
89
80
|
#
|
90
81
|
# CONTROL PLANE UPGRADE POLICIES
|
91
82
|
#
|
@@ -120,17 +111,6 @@ def create_control_plane_upgrade_policy(
|
|
120
111
|
)
|
121
112
|
|
122
113
|
|
123
|
-
def delete_control_plane_upgrade_policy(
|
124
|
-
ocm_api: OCMBaseClient, cluster_id: str, upgrade_policy_id: str
|
125
|
-
) -> None:
|
126
|
-
"""
|
127
|
-
Deletes an existing Control Plane Upgrade Policy
|
128
|
-
"""
|
129
|
-
ocm_api.delete(
|
130
|
-
f"{build_cluster_url(cluster_id)}/control_plane/upgrade_policies/{upgrade_policy_id}"
|
131
|
-
)
|
132
|
-
|
133
|
-
|
134
114
|
#
|
135
115
|
# NODE POOLUPGRADE POLICIES
|
136
116
|
#
|
{qontract_reconcile-0.10.2.dev278.dist-info → qontract_reconcile-0.10.2.dev279.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|