Skip to content

Commit 5a552d3

Browse files
committed
Docs
1 parent 98baaad commit 5a552d3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/modules/hdfs/pages/usage-guide/upgrading.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ HDFS currently requires a manual process to upgrade. This guide will take you th
99
HDFS must be configured to initiate the upgrade process. To do this, run the following commands in a HDFS superuser environment
1010
(either a client configured with a superuser account, or from inside NameNode pod):
1111

12+
// This could be automated by the operator, but dfsadmin does not have good machine-readable output.
13+
// It *can* be queried over JMX, but we're not so lucky for finalization.
14+
1215
[source,terminal]
1316
----
1417
$ hdfs dfsadmin -rollingUpgrade prepare
@@ -67,6 +70,10 @@ Rolling upgrade is finalized.
6770
Finalize Time: Fri Aug 02 15:58:39 GMT 2024 (=1722614319854)
6871
----
6972

73+
// We can't safely automate this, because finalize is asynchronous and doesn't tell us whether all NameNodes have even received the request to finalize.
74+
75+
WARNING: Please ensure that all NameNodes are running and available before proceeding. NameNodes that have not finalized yet will crash on launch when taken out of upgrade mode.
76+
7077
Finally, the operator and cluster should be taken out of upgrade mode, by marking the HdfsCluster as upgraded to the new version:
7178

7279
[source,terminal]

rust/operator-binary/src/hdfs_controller.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ pub async fn reconcile_hdfs(hdfs: Arc<HdfsCluster>, ctx: Arc<Ctx>) -> HdfsOperat
421421
})?;
422422
ss_cond_builder.add(deployed_rg_statefulset.clone());
423423
if hdfs.is_upgrading() {
424+
// When upgrading, ensure that each role is upgraded before moving on to the next as recommended by
425+
// https://hadoop.apache.org/docs/r3.4.0/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html#Upgrading_Non-Federated_Clusters
424426
if let Err(reason) = check_all_replicas_updated(&deployed_rg_statefulset) {
425427
tracing::info!(
426428
object = %ObjectRef::from_obj(&deployed_rg_statefulset),

0 commit comments

Comments
 (0)