Skip to content

HDDS-10272. Container Report admin command displays incorrect value immediately after SCM restart #6148

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

Merged
merged 3 commits into from
Feb 4, 2024

Conversation

sodonnel
Copy link
Contributor

@sodonnel sodonnel commented Feb 1, 2024

What changes were proposed in this pull request?

After SCM is started or after a failover, all the numbers in the replication manager report will be zero, which can lead to confusion.

While it may be an idea to throw an error if the report isn't ready yet, that could be an incompatible change, as some monitoring tools to QA scripts could depend on the output to some extent.

Therefore it makes sense to print a warning to stderr indicating the report has zero values until replication manager runs for the first time. Same output after this PR:

bash-4.2$ ozone admin container report
The Container Report is not available until Replication Manager completes its first run after startup or fail over. All values will be zero until that time.

Container Summary Report generated at 1970-01-01T00:00:00Z
==========================================================

Container State Summary
=======================
OPEN: 0
CLOSING: 0
QUASI_CLOSED: 0
CLOSED: 0
DELETING: 0
DELETED: 0
RECOVERING: 0

Container Health Summary
========================
UNDER_REPLICATED: 0
MIS_REPLICATED: 0
OVER_REPLICATED: 0
MISSING: 0
UNHEALTHY: 0
EMPTY: 0
OPEN_UNHEALTHY: 0
QUASI_CLOSED_STUCK: 0
OPEN_WITHOUT_PIPELINE: 0

What is the link to the Apache JIRA

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

How was this patch tested?

Unit tests adjusted and checked the output in docker compose.

@nandakumar131
Copy link
Contributor

Thanks @sodonnel for the PR.
Can we also fix/correct the report generation time on the client side (in the output) in this case? It would be nice if we could print the current time on the client side if the report time from SCM is 0.

@sodonnel
Copy link
Contributor Author

sodonnel commented Feb 2, 2024

I changed it to display the current time if the report time is zero.

@nandakumar131 nandakumar131 merged commit cb313f6 into apache:master Feb 4, 2024
@nandakumar131
Copy link
Contributor

Thanks @sodonnel for the fix.

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