Skip to content
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

How to support (rolling) upgrade #82

Open
hsiaojuite opened this issue Apr 1, 2020 · 0 comments
Open

How to support (rolling) upgrade #82

hsiaojuite opened this issue Apr 1, 2020 · 0 comments

Comments

@hsiaojuite
Copy link

Is there a recommended way to upgrade k8s-HDFS? Would it require down time or can a rolling upgrade be performed. Not sure if the followings (from Apache Hadoop) can be used or can we follow k8s updating StatefulSets (e.g. .spec.updateStrategy.type = RollingUpdate)? A pointer would be great.


Upgrading Non-Federated Clusters
Suppose there are two namenodes NN1 and NN2, where NN1 and NN2 are respectively in active and standby states. The following are the steps for upgrading an HA cluster:

Prepare Rolling Upgrade
Run “hdfs dfsadmin -rollingUpgrade prepare” to create a fsimage for rollback.
Run “hdfs dfsadmin -rollingUpgrade query” to check the status of the rollback image. Wait and re-run the command until the “Proceed with rolling upgrade” message is shown.
Upgrade Active and Standby NNs
Shutdown and upgrade NN2.
Start NN2 as standby with the “-rollingUpgrade started” option.
Failover from NN1 to NN2 so that NN2 becomes active and NN1 becomes standby.
Shutdown and upgrade NN1.
Start NN1 as standby with the “-rollingUpgrade started” option.
Upgrade DNs
Choose a small subset of datanodes (e.g. all datanodes under a particular rack).
Run “hdfs dfsadmin -shutdownDatanode <DATANODE_HOST:IPC_PORT> upgrade” to shutdown one of the chosen datanodes.
Run “hdfs dfsadmin -getDatanodeInfo <DATANODE_HOST:IPC_PORT>” to check and wait for the datanode to shutdown.
Upgrade and restart the datanode.
Perform the above steps for all the chosen datanodes in the subset in parallel.
Repeat the above steps until all datanodes in the cluster are upgraded.
Finalize Rolling Upgrade
Run “hdfs dfsadmin -rollingUpgrade finalize” to finalize the rolling upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant