Skip to content

Commit 49cf9d9

Browse files
committed
Move rollout tracker into operator-rs
1 parent f0df2b7 commit 49cf9d9

File tree

8 files changed

+550
-714
lines changed

8 files changed

+550
-714
lines changed

Cargo.lock

Lines changed: 162 additions & 140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 377 additions & 515 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ tokio = { version = "1.38", features = ["full"] }
2828
tracing = "0.1"
2929
tracing-futures = { version = "0.2", features = ["futures-03"] }
3030

31-
#[patch."https://github.com/stackabletech/operator-rs.git"]
31+
[patch."https://github.com/stackabletech/operator-rs.git"]
3232
#stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
3333
#stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
34+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "revert/lazylock" }

crate-hashes.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/operator-binary/src/hdfs_controller.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ use stackable_operator::{
3838
logging::controller::ReconcilerError,
3939
product_config_utils::{transform_all_roles_to_config, validate_all_roles_and_groups_config},
4040
role_utils::{GenericRoleConfig, RoleGroupRef},
41-
status::condition::{
42-
compute_conditions, operations::ClusterOperationsConditionBuilder,
43-
statefulset::StatefulSetConditionBuilder,
41+
status::{
42+
condition::{
43+
compute_conditions, operations::ClusterOperationsConditionBuilder,
44+
statefulset::StatefulSetConditionBuilder,
45+
},
46+
rollout::check_statefulset_rollout_complete,
4447
},
4548
time::Duration,
4649
};
@@ -62,7 +65,6 @@ use crate::{
6265
},
6366
product_logging::{extend_role_group_config_map, resolve_vector_aggregator_address},
6467
security::{self, kerberos, opa::HdfsOpaConfig},
65-
utils::statefulset::check_all_replicas_updated,
6668
OPERATOR_NAME,
6769
};
6870

@@ -423,7 +425,7 @@ pub async fn reconcile_hdfs(hdfs: Arc<HdfsCluster>, ctx: Arc<Ctx>) -> HdfsOperat
423425
if hdfs.is_upgrading() {
424426
// When upgrading, ensure that each role is upgraded before moving on to the next as recommended by
425427
// https://hadoop.apache.org/docs/r3.4.0/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html#Upgrading_Non-Federated_Clusters
426-
if let Err(reason) = check_all_replicas_updated(&deployed_rg_statefulset) {
428+
if let Err(reason) = check_statefulset_rollout_complete(&deployed_rg_statefulset) {
427429
tracing::info!(
428430
object = %ObjectRef::from_obj(&deployed_rg_statefulset),
429431
reason = &reason as &dyn std::error::Error,

rust/operator-binary/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ mod hdfs_controller;
3434
mod operations;
3535
mod product_logging;
3636
mod security;
37-
mod utils;
3837

3938
mod built_info {
4039
include!(concat!(env!("OUT_DIR"), "/built.rs"));

rust/operator-binary/src/utils/mod.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

rust/operator-binary/src/utils/statefulset.rs

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)