You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Bring pinned_fcv feature into advanced_cluster TPF implementation (#2970)
* wip
* small fix
* adjusting model after update
* add existing workaround
* remove todos after verifying
* set fcv changes into resulting model during create
* remove create TODO after verifying and make testing adjustments
* adjust checks to work with V2 schema
* adjust checks to consider schema v2 attributes
* small revert
* move related functions in diags file
* avoid creation of empty slice when not needed
* refactor CheckRSAndDSSchemaV2 to reuse CheckRSAndDS for implementation
* one liner for request definition
* remove unnecessary isAcc from pinned fcv function
ifpresentInState&&!pinIsActive { // pin is not active but present in state (and potentially in config file)
795
-
return diag.Diagnostics{
796
-
diag.Diagnostic{
797
-
Severity: diag.Warning,
798
-
Summary: "FCV pin is no longer active",
799
-
Detail: "Please remove `pinned_fcv` from the configuration and apply changes to avoid re-pinning the FCV. Warning can be ignored if `pinned_fcv` block has been removed from the configuration.",
iftime.Now().After(expirationDate) { // pin is active, present in state, but its expiration date has passed
806
-
return diag.Diagnostics{
807
-
diag.Diagnostic{
808
-
Severity: diag.Warning,
809
-
Summary: "FCV pin expiration date has expired",
810
-
Detail: "During the next maintenance window FCV will be unpinned. FCV expiration date can be extended, or `pinned_fcv` block can be removed to trigger the unpin immediately.",
// isUsingOldShardingConfiguration is identified if at least one replication spec defines num_shards > 1. This legacy form is from 2023-02-01 API and can only represent symmetric sharded clusters.
iffcvPresentInState&&!pinIsActive { // pin is not active but present in state (and potentially in config file)
69
+
warning:=diag.NewWarningDiagnostic(
70
+
"FCV pin is no longer active",
71
+
"Please remove `pinned_fcv` from the configuration and apply changes to avoid re-pinning the FCV. Warning can be ignored if `pinned_fcv` block has been removed from the configuration.")
72
+
return []diag.Diagnostic{warning}
73
+
}
74
+
iffcvPresentInState&&pinIsActive {
75
+
iftime.Now().After(*apiRespFCVExpirationDate) { // pin is active, present in state, but its expiration date has passed
76
+
warning:=diag.NewWarningDiagnostic(
77
+
"FCV pin expiration date has expired",
78
+
"During the next maintenance window FCV will be unpinned. FCV expiration date can be extended, or `pinned_fcv` block can be removed to trigger the unpin immediately.")
0 commit comments