apache/hadoop · error · RollingUpgradeException

Failed to since a rolling upgrade is already in progress…

Error message

Failed to {} since a rolling upgrade is already in progress. Existing rolling upgrade info:
{}

What it means

Thrown by startRollingUpgrade (and related ops) when the persistent rolling-upgrade state shows an upgrade already in progress; a new prepare cannot start until the existing one is finalized or the operation matches the existing state.

Solutions

  1. Wait for the current rolling upgrade to finish, then retry the operation.
  2. Finalize the in-progress rolling upgrade with 'hdfs dfsadmin -rollingUpgrade finalize' and retry.
  3. If the rolling upgrade must be abandoned, roll it back with 'hdfs dfsadmin -rollingUpgrade downgrade' before retrying.
  4. Check the current rolling upgrade state with 'hdfs dfsadmin -rollingUpgrade query' to see the existing rolling upgrade info reported in the error.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:7841 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/4ea980fea233eeb8. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:7841

   *
   * @param f feature to check
   * @throws HadoopIllegalArgumentException if the current layout version in
   *     effect is insufficient to support the feature
   */
  private void requireEffectiveLayoutVersionForFeature(Feature f)
      throws HadoopIllegalArgumentException {
    int lv = getEffectiveLayoutVersion();
    if (!NameNodeLayoutVersion.supports(f, lv)) {
      throw new HadoopIllegalArgumentException(String.format(
          "Feature %s unsupported at NameNode layout version %d.  If a " +
          "rolling upgrade is in progress, then it must be finalized before " +
          "using this feature.", f, lv));
    }
  }

  void checkRollingUpgrade(String action) throws RollingUpgradeException {
    if (isRollingUpgrade()) {
      throw new RollingUpgradeException("Failed to " + action
          + " since a rolling upgrade is already in progress."
          + " Existing rolling upgrade info:\n" + rollingUpgradeInfo);
    }
  }

  RollingUpgradeInfo finalizeRollingUpgrade() throws IOException {
    final String operationName = "finalizeRollingUpgrade";
    checkSuperuserPrivilege(operationName);
    checkOperation(OperationCategory.WRITE);
    writeLock(RwLockMode.FS);
    try {
      checkOperation(OperationCategory.WRITE);
      if (!isRollingUpgrade()) {
        return null;
      }
      checkNameNodeSafeMode("Failed to finalize rolling upgrade");

      finalizeRollingUpgradeInternal(now());

View on GitHub (pinned to 2add963021)