HDDS-15875. OM should validate software versions of peers before accepting finalize command#10777
HDDS-15875. OM should validate software versions of peers before accepting finalize command#10777errose28 wants to merge 10 commits into
Conversation
(cherry picked from commit c7d4e14) Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OMAdminProtocolServerSideImpl.java hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/upgrade/TestOMStartFinalizeUpgradeRequest.java
|
I added a hidden force flag to the CLI and RPC. Since the version checks also require all OMs (and later SCMs) to be up during finalize, the force flag allows finalizing even if some of these nodes are down indefinitely. In most cases the cluster should be restored to a healthy state before finishing the upgrade by finalizing it, but this provides a back door if any issues arise later. This flag will be forwarded from OM to SCM as well in #10783, which makes that PR dependent on this one. |
|
This change needs HDDS-14687 / #10832 to test using the force flag when one OM is down. Moving back to draft until that is complete. |
…ation * HDDS-14496-zdu: (57 commits) HDDS-14687. Add test that OM can finalize from a snapshot (apache#10832) HDDS-14580. Remove OM Prepare for Upgrade Code for ZDU (apache#9723) HDDS-15848. Add new upgrade action annotations for component versions (apache#10744) HDDS-15876. Remove ozone-csi (apache#10780) HDDS-14825. Add Grafana Dashboard and Metrics for ZDU (apache#10602) HDDS-15508. Add 2.2.0 to compatibility/upgrade test (apache#10782) HDDS-15867. [JDK25] Bump byte-buddy to 1.18.11 (apache#10776) HDDS-15809. Validate x-amz-copy-source-range on UploadPartCopy (apache#10711). HDDS-15678. OFS isDirectory/isFile should not trigger pipeline refresh or return block locations (apache#10741) HDDS-15171. Add available space check on follower during bootstrap. (apache#10185) HDDS-14043. Fix ls -e UnsupportedOperationException on ofs/o3fs (apache#10209) HDDS-15709. Replace random name suffix with uniqueObjectName (apache#10773) HDDS-15849. Force channel shutdown in XceiverClientGrpc.close (apache#10747) HDDS-15765. Fail fast when --node-id is omitted for OM compact/defrag on an HA cluster (apache#10699) HDDS-14989. Delay follower SCM DN server start until Ratis log catch-up. (apache#10617). HDDS-15456. Add SCM DB lookup and identify orphan(wrt SCM) and deleted-but-present containers (apache#10547) HDDS-15812. Rename test utils for naming convention (apache#10766) HDDS-15600. Fix ListObjects response for encoding-type and empty delimiter (apache#10586). HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback (apache#10708) HDDS-15667. `containerbalancer status`: show stop reason and iteration details after stop (apache#10681) ... Conflicts: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMUpgradeFinalization.java hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
What changes were proposed in this pull request?
When the OM first receives a finalization command from the user (
StartFinalizeupgradeRequest), it will contact each OM peer and validate that all their software versions match before proceeding with finalization. Otherwise it will reject the request back to the user.To do this, a new RPC was added to
OMAdminProtocolto retrieve the software version from an individual OM. The client facingQueryUpgradeStatuswas not reused for this since the transport layer only supports sending that to the leader. Having a separate RPC also lets the two protocols evolve independently.These checks are a best effort to catch obvious user error. Therefore some more complicated checks were intentionally skipped:
applyTransaction, this was not implemented due to extra complexity and incongruence with the leader execution project.What is the link to the Apache JIRA
HDDS-15875
How was this patch tested?
TestOMUpgradeFinalization#testFinalizationFromSnapshotwas updated to use the new force finalize method since it is testing the case where one OM is down.Green CI on my fork