-
-
Notifications
You must be signed in to change notification settings - Fork 7
Rolling HDFS upgrade #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rolling HDFS upgrade #571
Changes from 9 commits
a5e9547
fc6cc0d
2eb38a8
38809e2
a36de0f
acffa82
98baaad
5a552d3
c1e13a2
e1476a2
8af1db6
44b5e59
947931e
5970585
13129b5
eb19010
d5a092a
f0df2b7
49cf9d9
c582a3a
b24c25f
1e68f1d
10e5220
808f926
a9809ba
0604aa6
c142421
6ae8e0b
46eedee
2a25ff4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
= Upgrading HDFS | ||
|
||
IMPORTANT: HDFS upgrades are experimental, and details may change at any time | ||
|
||
HDFS currently requires a manual process to upgrade. This guide will take you through an example case, upgrading an example cluster (from our xref:getting_started/index.adoc[Getting Started] guide) from HDFS 3.3.6 to 3.4.0. | ||
|
||
== Preparing HDFS | ||
|
||
HDFS must be configured to initiate the upgrade process. To do this, run the following commands in a HDFS superuser environment | ||
(either a client configured with a superuser account, or from inside NameNode pod): | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// This could be automated by the operator, but dfsadmin does not have good machine-readable output. | ||
// It *can* be queried over JMX, but we're not so lucky for finalization. | ||
NickLarsenNZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,shell] | ||
---- | ||
$ hdfs dfsadmin -rollingUpgrade prepare | ||
Check notice on line 17 in docs/modules/hdfs/pages/usage-guide/upgrading.adoc
|
||
PREPARE rolling upgrade ... | ||
Preparing for upgrade. Data is being saved for rollback. | ||
Run "dfsadmin -rollingUpgrade query" to check the status | ||
for proceeding with rolling upgrade | ||
Block Pool ID: BP-841432641-10.244.0.29-1722612757853 | ||
Start Time: Fri Aug 02 15:49:12 GMT 2024 (=1722613752341) | ||
Finalize Time: <NOT FINALIZED> | ||
|
||
$ # Then run query until the HDFS is ready to proceed | ||
$ hdfs dfsadmin -rollingUpgrade query | ||
Check notice on line 27 in docs/modules/hdfs/pages/usage-guide/upgrading.adoc
|
||
QUERY rolling upgrade ... | ||
Preparing for upgrade. Data is being saved for rollback. | ||
Run "dfsadmin -rollingUpgrade query" to check the status | ||
for proceeding with rolling upgrade | ||
Block Pool ID: BP-841432641-10.244.0.29-1722612757853 | ||
Start Time: Fri Aug 02 15:49:12 GMT 2024 (=1722613752341) | ||
Finalize Time: <NOT FINALIZED> | ||
|
||
$ # It should look like this once ready | ||
$ hdfs dfsadmin -rollingUpgrade query | ||
Check notice on line 37 in docs/modules/hdfs/pages/usage-guide/upgrading.adoc
|
||
QUERY rolling upgrade ... | ||
Proceed with rolling upgrade: | ||
Block Pool ID: BP-841432641-10.244.0.29-1722612757853 | ||
Start Time: Fri Aug 02 15:49:12 GMT 2024 (=1722613752341) | ||
Finalize Time: <NOT FINALIZED> | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
|
||
== Starting the upgrade | ||
|
||
Once ready, the HdfsCluster can be updated with the new product version: | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,shell] | ||
---- | ||
$ kubectl patch hdfs/simple-hdfs --patch '{"spec": {"image": {"productVersion": "3.4.0"}}}' --type=merge | ||
hdfscluster.hdfs.stackable.tech/simple-hdfs patched | ||
---- | ||
|
||
Then wait until all pods are ready and running the new HDFS version. | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
NOTE: Services will be upgraded in order: JournalNodes, then NameNodes, then DataNodes. | ||
|
||
== Finalizing the upgrade | ||
|
||
Once all HDFS pods are running the new version, the HDFS upgrade can be finalized (from the HDFS superuser environment): | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,shell] | ||
---- | ||
$ hdfs dfsadmin -rollingUpgrade finalize | ||
Check notice on line 65 in docs/modules/hdfs/pages/usage-guide/upgrading.adoc
|
||
FINALIZE rolling upgrade ... | ||
Rolling upgrade is finalized. | ||
Block Pool ID: BP-841432641-10.244.0.29-1722612757853 | ||
Start Time: Fri Aug 02 15:49:12 GMT 2024 (=1722613752341) | ||
Finalize Time: Fri Aug 02 15:58:39 GMT 2024 (=1722614319854) | ||
---- | ||
|
||
// 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. | ||
NickLarsenNZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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. | ||
|
||
Finally, the operator and cluster should be taken out of upgrade mode, by marking the HdfsCluster as upgraded to the new version: | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,shell] | ||
---- | ||
$ kubectl patch hdfs/simple-hdfs --subresource=status --patch '{"status": {"deployedProductVersion": "3.4.0"}}' --type=merge | ||
hdfscluster.hdfs.stackable.tech/simple-hdfs patched | ||
---- | ||
|
||
NOTE: The NameNodes will be restarted a final time, taking them out of upgrade mode. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod statefulset; |
Uh oh!
There was an error while loading. Please reload this page.