[
https://issues.apache.org/jira/browse/HDDS-17944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arafat Khan reassigned HDDS-17944:
----------------------------------
Assignee: Arafat Khan
> Recon unhealthy-containers API returns HTTP 500 when an unhealthy row's
> container is missing from Recon
> --------------------------------------------------------------------------------------------------------
>
> Key: HDDS-17944
> URL: https://issues.apache.org/jira/browse/HDDS-17944
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Reporter: Arafat Khan
> Assignee: Arafat Khan
> Priority: Major
>
> {{GET /api/v1/containers/unhealthy}} reads rows from UNHEALTHY_CONTAINERS and
> maps each one in {{{}ContainerEndpoint.toUnhealthyMetadata{}}}, which calls
> {{{}containerManager.getContainer{}}}. If the container is not in Recon, that
> throws {{{}ContainerNotFoundException{}}}. The method wraps it in
> {{{}UncheckedIOException{}}}, and {{getUnhealthyContainers}} turns it into
> HTTP 500 for the whole page. One bad row hides every other unhealthy
> container on that page.
> How a row can point to a container Recon no longer has:
> # A container is MISSING, so Recon stores a MISSING row.
> # An admin removes it from SCM with {{{}ozone admin container delete{}}}.
> # Recon replaces its SCM DB with an SCM snapshot, at startup when the
> container counts drift past the threshold, or when a snapshot sync is
> triggered. The container is gone from Recon, but UNHEALTHY_CONTAINERS is not
> cleared.
> # Later health checks only clean rows for containers Recon still has, so the
> row stays. Every page that includes it returns 500.
> HDDS-17061 removed a different way to reach this: a failed move back from
> DELETED used to drop the container from Recon.
> Suggested fix: skip rows whose container is missing and log them. Also take
> {{{}firstKey{}}}/{{{}lastKey{}}} from the rows scanned rather than the rows
> returned, so a skipped row does not end paging early. Also consider removing
> these orphan rows.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]