Skip to content

HDDS-16378. Do not write upgrade.complete during upgrade-container-schema --dry-run - #11198

Open
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16378
Open

HDDS-16378. Do not write upgrade.complete during upgrade-container-schema --dry-run#11198
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16378

Conversation

@shuan1026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

--dry-run of ozone repair datanode upgrade-container-schema still wrote the permanent upgrade.complete marker. The real run then skipped every marked volume. Details are on the Jira.

This patch:

  • Creates upgrade.complete only when e == null && r.isSuccess() && !isDryRun(). Dry-run still deletes upgrade.lock.
  • Passes lockFile (not file) to the lock-delete error log in the same whenComplete.
  • Asserts in TestUpgradeContainerSchema.testUpgrade that the marker is absent after dry-run and present after a real run.

This does not delete markers already left by an older dry-run. Operators who already ran --dry-run should remove each volume's hddsRootDir/upgrade.complete before the real upgrade.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16378

How was this patch tested?

@shuan1026
shuan1026 marked this pull request as ready for review September 3, 2026 07:44

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shuan1026 +1 LGTM

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

Successfully merging this pull request may close these issues.

2 participants