Skip to content

HDDS-14103. Create an option to suppress/unsuppress containers from report#9719

Open
sarvekshayr wants to merge 11 commits intoapache:masterfrom
sarvekshayr:HDDS-14103
Open

HDDS-14103. Create an option to suppress/unsuppress containers from report#9719
sarvekshayr wants to merge 11 commits intoapache:masterfrom
sarvekshayr:HDDS-14103

Conversation

@sarvekshayr
Copy link
Copy Markdown
Contributor

@sarvekshayr sarvekshayr commented Feb 6, 2026

What changes were proposed in this pull request?

Implemented --suppress and --unsuppress flags in ozone admin container report (mutually exclusive), supporting multiple container IDs from command line, stdin, or files.
Once the command is executed, the container report will be updated after the next Replication Manager cycle.

Added --suppressed filtering option to ozone admin container list to show suppressed/unppressed containers.

What is the link to the Apache JIRA

HDDS-14103

How was this patch tested?

Initial container report

bash-5.1$ ozone admin container report
Container Summary Report generated at 2026-03-26T06:24:57Z
==========================================================

Container State Summary
=======================
OPEN: 0
CLOSING: 0
QUASI_CLOSED: 0
CLOSED: 3
...

Container Health Summary
========================
HEALTHY: 0
UNDER_REPLICATED: 0
MIS_REPLICATED: 0
OVER_REPLICATED: 0
MISSING: 0
UNHEALTHY: 0
EMPTY: 3
OPEN_UNHEALTHY: 0
...

First 100 EMPTY containers:
#1, #2, #3

Suppress 2 containers from report

bash-5.1$ ozone admin container report --suppress 1 2
Suppressed container: 1
Suppressed container: 2

Suppressed 2 container(s) successfully.
Container report will be updated after the next Replication Manager cycle.
bash-5.1$ ozone admin container report
Container Summary Report generated at 2026-03-26T06:25:42Z
==========================================================

Container State Summary
=======================
OPEN: 0
CLOSING: 0
QUASI_CLOSED: 0
CLOSED: 3
...

Container Health Summary
========================
HEALTHY: 0
UNDER_REPLICATED: 0
MIS_REPLICATED: 0
OVER_REPLICATED: 0
MISSING: 0
UNHEALTHY: 0
EMPTY: 1
OPEN_UNHEALTHY: 0
...

First 100 EMPTY containers:
#3

List suppressed containers

bash-5.1$ ozone admin container list --suppressed
[ {
  "state" : "CLOSED",
  "stateEnterTime" : "2026-03-26T06:22:56.056Z",
  "replicationConfig" : {
    "replicationFactor" : "ONE",
    "requiredNodes" : 1,
    "minimumNodes" : 1,
    "replicationType" : "STANDALONE"
  },
  "usedBytes" : 0,
  "numberOfKeys" : 0,
  "lastUsed" : "2026-03-26T06:25:55.507461841Z",
  "owner" : "OZONE",
  "containerID" : 1,
  "deleteTransactionId" : 0,
  "sequenceId" : 0,
  "healthState" : "HEALTHY",
  "suppressed" : true,
  "open" : false,
  "deleted" : false
}, {
  "state" : "CLOSED",
  "stateEnterTime" : "2026-03-26T06:23:01.044Z",
  "replicationConfig" : {
    "replicationFactor" : "ONE",
    "requiredNodes" : 1,
    "minimumNodes" : 1,
    "replicationType" : "STANDALONE"
  },
  "usedBytes" : 0,
  "numberOfKeys" : 0,
  "lastUsed" : "2026-03-26T06:25:55.507814466Z",
  "owner" : "OZONE",
  "containerID" : 2,
  "deleteTransactionId" : 0,
  "sequenceId" : 0,
  "healthState" : "HEALTHY",
  "suppressed" : true,
  "open" : false,
  "deleted" : false
}]

List unsuppressed containers

bash-5.1$ ozone admin container list --suppressed=false
[ {
  "state" : "CLOSED",
  "stateEnterTime" : "2026-03-26T06:23:02.067Z",
  "replicationConfig" : {
    "replicationFactor" : "ONE",
    "requiredNodes" : 1,
    "minimumNodes" : 1,
    "replicationType" : "STANDALONE"
  },
  "usedBytes" : 0,
  "numberOfKeys" : 0,
  "lastUsed" : "2026-03-26T06:26:02.912151511Z",
  "owner" : "OZONE",
  "containerID" : 3,
  "deleteTransactionId" : 0,
  "sequenceId" : 0,
  "healthState" : "HEALTHY",
  "open" : false,
  "deleted" : false
} ]

Unsuppress 2 containers from report

bash-5.1$ ozone admin container report --unsuppress 1 2
Unsuppressed container: 1
Unsuppressed container: 2

Unsuppressed 2 container(s) successfully.
Container report will be updated after the next Replication Manager cycle.
bash-5.1$ ozone admin container report
Container Summary Report generated at 2026-03-26T06:26:42Z
==========================================================

Container State Summary
=======================
OPEN: 0
CLOSING: 0
QUASI_CLOSED: 0
CLOSED: 3
...

Container Health Summary
========================
HEALTHY: 0
UNDER_REPLICATED: 0
MIS_REPLICATED: 0
OVER_REPLICATED: 0
MISSING: 0
UNHEALTHY: 0
EMPTY: 3
...

First 100 EMPTY containers:
#1, #2, #3

@sodonnel
Copy link
Copy Markdown
Contributor

sodonnel commented Feb 6, 2026

I am not sure about this idea. Surely, if the container is missing and all efforts have been made to ensure there are no copies that can be recovered, the correct thing to do is to remove the container from the system?

@errose28
Copy link
Copy Markdown
Contributor

errose28 commented Feb 6, 2026

@sodonnel I agree that safely removing would be the best long term solution. However implementing that robustly is more complicated. Even if all the keys are deleted from OM, SCM won't have any DNs to send the block delete requests to, and those DNs cannot tell SCM that their replicas are empty and safe to be deleted. We therefore need a check for orphan containers in between SCM and OM that handles the cleanup. I don't think we want to allow admins to manually remove containers from the system based on their own investigation.

Copy link
Copy Markdown
Contributor

@priyeshkaratha priyeshkaratha left a comment

Choose a reason for hiding this comment

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

Thanks @sarvekshayr for the patch. I left few comments related to admin check and other good to go changes. Please have a look into those.

Copy link
Copy Markdown
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

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

@sarvekshayr given some comments

Copy link
Copy Markdown
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @sarvekshayr. I think we should try to avoid coupling the ack/suppression concept to missing containers within the code itself, even though that is the current use case. There may be other cases now or in the future where we may want to suppress containers, like having all unhealthy replicas or quasi-closed stuck, for example. Suppressed containers would just be filtered out of container report generation, regardless of their replica states.

@github-actions
Copy link
Copy Markdown

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Mar 14, 2026
@github-actions
Copy link
Copy Markdown

Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.

@github-actions github-actions bot closed this Mar 22, 2026
@sarvekshayr sarvekshayr reopened this Mar 22, 2026
@github-actions github-actions bot removed the stale label Mar 23, 2026
@sarvekshayr sarvekshayr changed the title HDDS-14103. Create an option in SCM to ack/ignore missing containers HDDS-14103. Create an option to suppress/unsuppress containers from report Mar 26, 2026
Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi left a comment

Choose a reason for hiding this comment

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

Thanks @sarvekshayr for working on this.

Copy link
Copy Markdown
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

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

@sarvekshayr given few comments

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.

7 participants