slfan1989 opened a new pull request, #7266:
URL: https://github.com/apache/ozone/pull/7266
## What changes were proposed in this pull request?
Currently, we lack tools on the SCM side to track failed disks on DataNodes.
DataNodes have already reported this information, and we need to display it.
In this PR, we will display the failed disks on the DataNode. The
information can be displayed in JSON format or using the default format.
> Default format
```
Datanode Volume Failures (5 Volumes)
Node : localhost-62.238.104.185
(de97aaf3-99ad-449d-ad92-2c4f5a744b49)
Failed Volume: /data0/ozonedata/hdds
Capacity Lost: 7430477791683 B (6.76 TB)
Failure Date : Thu Oct 03 09:25:16 +0800 2024
Node : localhost-163.120.165.68
(cf40e987-8952-4f7a-88b7-096e6b285243)
Failed Volume: /data1/ozonedata/hdds
Capacity Lost: 7430477791683 B (6.76 TB)
Failure Date : Thu Oct 03 09:25:16 +0800 2024
Node : localhost-253.243.206.120
(0cc77921-489d-4cf0-a036-475faa16d443)
Failed Volume: /data2/ozonedata/hdds
Capacity Lost: 7430477791683 B (6.76 TB)
Failure Date : Thu Oct 03 09:25:16 +0800 2024
Node : localhost-136.194.243.81
(5cb6430d-0ce5-4204-b265-179ee38fb30e)
Failed Volume: /data3/ozonedata/hdds
Capacity Lost: 7430477791683 B (6.76 TB)
Failure Date : Thu Oct 03 09:25:16 +0800 2024
Node : localhost-48.253.209.226
(f99a8374-edb0-419d-9cba-cfab9d9e8a2e)
Failed Volume: /data4/ozonedata/hdds
Capacity Lost: 7430477791683 B (6.76 TB)
Failure Date : Thu Oct 03 09:25:16 +0800 2024
```
> Json format
```
[ {
"node" : "localhost-161.170.151.131
(155bb574-7ed8-41cd-a868-815f4c2b0d60)",
"volumeName" : "/data0/ozonedata/hdds",
"failureDate" : 1727918794694,
"capacityLost" : 7430477791683
}, {
"node" : "localhost-67.218.46.23 (520d29eb-8387-4cda-bcb1-8727fdddd451)",
"volumeName" : "/data1/ozonedata/hdds",
"failureDate" : 1727918794695,
"capacityLost" : 7430477791683
}, {
"node" : "localhost-30.151.88.21 (d66cab50-bbf8-4199-9d7f-82da84a30137)",
"volumeName" : "/data2/ozonedata/hdds",
"failureDate" : 1727918794695,
"capacityLost" : 7430477791683
}, {
"node" : "localhost-78.50.38.217 (a673f50a-6f74-4e62-8c0c-f7337d5f3ce5)",
"volumeName" : "/data3/ozonedata/hdds",
"failureDate" : 1727918794695,
"capacityLost" : 7430477791683
}, {
"node" : "localhost-138.205.52.25 (84b7e49a-9bd4-4115-96fa-69f2d259343c)",
"volumeName" : "/data4/ozonedata/hdds",
"failureDate" : 1727918794695,
"capacityLost" : 7430477791683
} ]
```
> Table format
```
+-------------------------------------------------------------------------------------------------------------------------------------------+
| Datanode Volume
Failures |
+------------------------------------------------------------------+-----------------------+---------------+--------------------------------+
| Node |
Volume Name | Capacity Lost | Failure Date |
+------------------------------------------------------------------+-----------------------+---------------+--------------------------------+
| localhost-83.212.219.28 (8b6addb1-759a-49e9-99fb-0d1a6cfb2d7f) |
/data0/ozonedata/hdds | 6.76 TB | Sat Oct 05 17:47:47 +0800 2024 |
| localhost-103.199.236.47 (0dbe503a-3382-4753-b95a-447bab5766c4) |
/data1/ozonedata/hdds | 6.76 TB | Sat Oct 05 17:47:47 +0800 2024 |
| localhost-178.123.46.32 (2017076a-e763-4f47-abce-78535b5770a3) |
/data2/ozonedata/hdds | 6.76 TB | Sat Oct 05 17:47:47 +0800 2024 |
| localhost-123.112.235.228 (aaebb6a7-6b62-4160-9934-b16b8fdde65e) |
/data3/ozonedata/hdds | 6.76 TB | Sat Oct 05 17:47:47 +0800 2024 |
| localhost-249.235.216.19 (cbc7c0b5-5ae0-4e40-91b8-1d9c419a007c) |
/data4/ozonedata/hdds | 6.76 TB | Sat Oct 05 17:47:47 +0800 2024 |
+------------------------------------------------------------------+-----------------------+---------------+--------------------------------+
```
## What is the link to the Apache JIRA
JIRA: HDDS-11463. Track and display failed DataNode storage locations in SCM.
## How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests,
workflow run on the fork git repo.)
(If this patch involves UI changes, please attach a screenshot; otherwise,
remove this.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]