ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10486. Recon datanode UI to incorporate explicit removal of DEAD

Open smitajoshi12 opened this issue 1 year ago • 13 comments

What changes were proposed in this pull request?

Recon datanodes listing page should have a mechanism using a button or link which will be enabled once user selects the DEAD or Decommissioned or In Maintenance nodes for explicity removal from Recon memory and ask recon to stop tracking. Following backend API will be provided by Recon to facilitate this.

  1. When totalcount is greater than 0 then we are displaying Remove button.

Please describe your PR in detail: PUT api/v1/datanodes/remove JSON Body input takes UUID list of datanodes to be removed from cluster: Input: [ "50ca4c95-2ef3-4430-b944-97d2442c3daf" ] Output:

Examples of well-written pull requests:

What is the link to the Apache JIRA

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

Depending on Backend PR

Need to get merge after below backend PR gets merged https://github.com/apache/ozone/pull/6360

How was this patch tested?

Manually

Button Correction

image

image

image

Multiple Datanode Removal image

3 Data nodes removed image


Dead Node Removal Screenshot 2024-05-02 at 5 37 43 PM

Screenshot 2024-05-02 at 5 37 43 PM

smitajoshi12 avatar Mar 20 '24 16:03 smitajoshi12

When the ozone-datanode-2.ozone_default becomes DEAD, I am unable to select and remove it. Is there a waiting period for it, or am I missing something here?

image

ArafatKhan2198 avatar Mar 21 '24 16:03 ArafatKhan2198

When no nodes are selected, the Remove button remains deactivated, which is the correct behavior. However, upon clicking it, I still receive a popup message indicating the deletion of zero nodes. Please refrain from displaying the popup message and making the API call when no nodes are selected.

image

ArafatKhan2198 avatar Mar 21 '24 16:03 ArafatKhan2198

Additionally, please reduce the size of the popup message and align it properly to avoid covering any fields. I suggest reducing its size slightly and aligning it appropriately within the available space.

ArafatKhan2198 avatar Mar 21 '24 16:03 ArafatKhan2198

Also, please ensure that the "?" icon in the alert message is properly aligned, similar to the alert message below.

image

ArafatKhan2198 avatar Mar 21 '24 16:03 ArafatKhan2198

And do test it out not just with DB.json but also an actual cluster, for getting a DEAD node just shut down one of the Datanodes.

ArafatKhan2198 avatar Mar 21 '24 16:03 ArafatKhan2198

When the ozone-datanode-2.ozone_default becomes DEAD, I am unable to select and remove it. Is there a waiting period for it, or am I missing something here?

image

@devmadhuu Can we remove Dead Node status UI is designed for Decomiisioned and In Maintenance state removeal only?

smitajoshi12 avatar Mar 26 '24 05:03 smitajoshi12

When the ozone-datanode-2.ozone_default becomes DEAD, I am unable to select and remove it. Is there a waiting period for it, or am I missing something here? image

@devmadhuu Can we remove Dead Node status UI is designed for Decomiisioned and In Maintenance state removeal only?

Yes, we need to allow removal of "DEAD" state datanodes. Currently it is not allowing.

devmadhuu avatar Mar 26 '24 05:03 devmadhuu

When no nodes are selected, the Remove button remains deactivated, which is the correct behavior. However, upon clicking it, I still receive a popup message indicating the deletion of zero nodes. Please refrain from displaying the popup message and making the API call when no nodes are selected.

image

@ArafatKhan2198 Addressed issue in latest commit and latest screen shots.

smitajoshi12 avatar Mar 27 '24 10:03 smitajoshi12

Also, please ensure that the "?" icon in the alert message is properly aligned, similar to the alert message below.

image

@ArafatKhan2198 It is axios error will raise seprate JIRA for this task.

smitajoshi12 avatar Mar 27 '24 10:03 smitajoshi12

When the ozone-datanode-2.ozone_default becomes DEAD, I am unable to select and remove it. Is there a waiting period for it, or am I missing something here? image

@devmadhuu Can we remove Dead Node status UI is designed for Decomiisioned and In Maintenance state removeal only?

@ArafatKhan2198 Completed changes

smitajoshi12 avatar Mar 27 '24 11:03 smitajoshi12

@smitajoshi12 thanks for continuing working on this patch, Image icon for remove click seems not correct, as it is showing as "i" informative icon.

devmadhuu avatar Mar 28 '24 05:03 devmadhuu

@smitajoshi12 I marked this PR as draft, while we are waiting for the backend changes to be merged in #6360

dombizita avatar Apr 08 '24 10:04 dombizita

@smitajoshi12 thanks for continuing working on this patch, Image icon for remove click seems not correct, as it is showing as "i" informative icon.

@devmadhuu Updated with Current Cluster data screen shots.

smitajoshi12 avatar May 02 '24 12:05 smitajoshi12

Thanks for updating the patch @smitajoshi12 Can you please fix the message in the tool tip to "Remove and stop tracking the DECOMMISSIONED, IN_MAINTENANCE, and DEAD nodes."

image

ArafatKhan2198 avatar May 28 '24 05:05 ArafatKhan2198

Just one comment to address that I have posted, and we should be good to merge this PR.

ArafatKhan2198 avatar May 28 '24 06:05 ArafatKhan2198

Thanks for updating the patch @smitajoshi12 Can you please fix the message in the tool tip to "Remove and stop tracking the DECOMMISSIONED, IN_MAINTENANCE, and DEAD nodes."

image

@ArafatKhan2198 What should be exact message?

smitajoshi12 avatar May 29 '24 16:05 smitajoshi12

Thanks for updating the patch @smitajoshi12 Can you please fix the message in the tool tip to "Remove and stop tracking the DECOMMISSIONED, IN_MAINTENANCE, and DEAD nodes."

image

The message should be "Remove and stop tracking the DECOMMISSIONED, IN_MAINTENANCE, and DEAD nodes." without the extra exclamation marks at the end.

ArafatKhan2198 avatar May 30 '24 06:05 ArafatKhan2198

Thanks for updating the patch @smitajoshi12 Can you please fix the message in the tool tip to "Remove and stop tracking the DECOMMISSIONED, IN_MAINTENANCE, and DEAD nodes."

image

@ArafatKhan2198 Completed changes in latest commit.

smitajoshi12 avatar May 30 '24 12:05 smitajoshi12

@dombizita @devmadhuu

Can we go ahead to merge this PR?

smitajoshi12 avatar Jun 18 '24 06:06 smitajoshi12

@smitajoshi12 If DN operational state is DECOMMISSIONED or Node Status is DEAD, then only we allow, We are also NOT allowing IN_MAINTENANCE node to be removed. And if a node operational state is DECOMMISSIONED, it is not necessarily to be in DEAD status and node status may still be HEALTHY, so first priority is to check DN operational state should be equal to DECOMMISSIONED, then in OR second condition should be node status as DEAD.

cc: @krishnaasawa1

devmadhuu avatar Jun 18 '24 12:06 devmadhuu

@smitajoshi12 If DN operational state is DECOMMISSIONED or Node Status is DEAD, then only we allow, We are also NOT allowing IN_MAINTENANCE node to be removed. And if a node operational state is DECOMMISSIONED, it is not necessarily to be in DEAD status and node status may still be HEALTHY, so first priority is to check DN operational state should be equal to DECOMMISSIONED, then in OR second condition should be node status as DEAD.

cc: @krishnaasawa1

@devmadhuu Disabled removal for Operation State = IN_MAINTENANCE updated JIRA description and PR details also.

State= DEAD Operation State=[Any State] ==> Allow for explicit removal

Noticed one issue in datanode api State= [Any] Operation State=[Decommissioned] removal is happening but some interval of 1 min or 2 mins I can see DECOMMISSIONED Records again.

image

smitajoshi12 avatar Jun 18 '24 16:06 smitajoshi12

@smitajoshi12 If DN operational state is DECOMMISSIONED or Node Status is DEAD, then only we allow, We are also NOT allowing IN_MAINTENANCE node to be removed. And if a node operational state is DECOMMISSIONED, it is not necessarily to be in DEAD status and node status may still be HEALTHY, so first priority is to check DN operational state should be equal to DECOMMISSIONED, then in OR second condition should be node status as DEAD. cc: @krishnaasawa1

@devmadhuu Disabled removal for Operation State = IN_MAINTENANCE updated JIRA description and PR details also.

State= DEAD Operation State=[Any State] ==> Allow for explicit removal State= [Any] Operation State=[Decommissioned] ==> Allow for explicit removal

Noticed one issue in datanode api State= [Any] Operation State=[Decommissioned] removal is happening but some interval of 1 min or 2 mins I can see DECOMMISSIONED Records again.

image

Created HDDS-11032 to check this and fix it.

devmadhuu avatar Jun 19 '24 06:06 devmadhuu

@smitajoshi12 If DN operational state is DECOMMISSIONED or Node Status is DEAD, then only we allow, We are also NOT allowing IN_MAINTENANCE node to be removed. And if a node operational state is DECOMMISSIONED, it is not necessarily to be in DEAD status and node status may still be HEALTHY, so first priority is to check DN operational state should be equal to DECOMMISSIONED, then in OR second condition should be node status as DEAD. cc: @krishnaasawa1

@devmadhuu Disabled removal for Operation State = IN_MAINTENANCE updated JIRA description and PR details also. State= DEAD Operation State=[Any State] ==> Allow for explicit removal State= [Any] Operation State=[Decommissioned] ==> Allow for explicit removal Noticed one issue in datanode api State= [Any] Operation State=[Decommissioned] removal is happening but some interval of 1 min or 2 mins I can see DECOMMISSIONED Records again. image

Created HDDS-11032 to check this and fix it.

@devmadhuu Updated JIRA and PR Description and Tooltip and comments in code did all testing it is working as expected.

smitajoshi12 avatar Jun 19 '24 10:06 smitajoshi12

Thanks @smitajoshi12 for the patch and @dombizita @ArafatKhan2198 @devabhishekpal for review.

devmadhuu avatar Jun 20 '24 12:06 devmadhuu

@devmadhuu I didn't dismiss my previous review request yet, please next time wait for that before merging (I'm not even sure how to merge a PR until there is a pending review request). As I see there were many changes in the patch since then.

dombizita avatar Jun 20 '24 12:06 dombizita

@devmadhuu I didn't dismiss my previous review request yet, please next time wait for that before merging (I'm not even sure how to merge a PR until there is a pending review request). As I see there were many changes in the patch since then.

@dombizita I reviewed your comment where you asked to make sure that code and code comments matches, so after @smitajoshi12 updated her comments in code and we changed the condition to check only for DEAD nodes, it was resolved. And since your comments was mainly for code comments and was resolved, we go ahead after all reviews. If you still feel something not resolved as per your comment, kindly raise another JIRA to handle. cc: @krishnaasawa1

devmadhuu avatar Jun 20 '24 13:06 devmadhuu

@smitajoshi12 I think it's better if the person who gave the review comment resolves the review comment, as they can decide if the conversation is resolved or not. Please next time don't resolve my comments, even if you did the suggested changes, wait for me to check. Thanks!

dombizita avatar Jun 20 '24 13:06 dombizita