Skip to content
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

mgr/dashboard: Host Maintenance Feature #39226

Merged
merged 1 commit into from Mar 9, 2021

Conversation

nizamial09
Copy link
Member

@nizamial09 nizamial09 commented Feb 2, 2021

In Cluster -> Hosts, I've added additional button to put the selected host on maintenance or exit out of the maintenance mode. Also for some hosts the ok-to-stop tests may trigger some warnings which requires a --force command to pass along with the maintenance enter command to enter a host into maintenance. In UI this is achieved using a confirmation Modal. In addition to this if the check error is It is NOT safe to stop the host then the host wont be able to put into maintenance mode.

ENTER MAINTENANCE MODE
Screencast 2021-03-08 at 19 48 - Ceph

EXIT MAINTENANCE MODE
Screencast 2021-02-08 at 15 50 - Ceph

FORCE ENTER MAINTENANCE MODE
Screencast 2021-03-08 at 19 35 - Ceph

NOT SAFE TO ENTER MAINTENANCE MODE
Screencast 2021-03-08 at 19 36 - Ceph

ONLY ONE HOST
Removed the other two hosts but it was showing in the list
Screencast 2021-03-08 at 19 51 - Ceph

Fixes: https://tracker.ceph.com/issues/49101
Signed-off-by: Nizamudeen A nia@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@nizamial09 nizamial09 requested a review from a team as a code owner February 2, 2021 12:39
@nizamial09 nizamial09 added this to In progress in Dashboard via automation Feb 2, 2021
@github-actions github-actions bot added the pybind label Feb 2, 2021
@nizamial09
Copy link
Member Author

Need to add the unit tests and integration tests for frontend as well as backend.

@epuertat
Copy link
Member

epuertat commented Feb 2, 2021

This is worthy a demo at tomorrow's daily, @nizamial09?

@nizamial09
Copy link
Member Author

This is worthy a demo at tomorrow's daily, @nizamial09?

Yup. Can do that.

@pcuzner
Copy link
Contributor

pcuzner commented Feb 3, 2021

@nizamial09 why is the maintenance button separate? In the context of host management I'd expect that we need to support maintenance, and in the future drain etc - each feature can't be a separate button can it?

@avanthakkar
Copy link
Contributor

jenkins test make check

@nizamial09 nizamial09 changed the title [WIP]mgr/dashboard: Host Maintenance Feature mgr/dashboard: Host Maintenance Feature Feb 9, 2021
@nizamial09
Copy link
Member Author

@pcuzner I've put the button inside the dropdown box.
@votdev For consistency between backend and frontend terminologies I am gonna go with Enter/Exit Maintenance instead of Enable/Disable Maintenance. Also the command used in CLI is ceph orch host maintenance enter hostname, so Enter/Exit makes more sense here.
Also I made the confirmation modal texts a unordered list, maybe it'll look much better now.

PTAL, thanks.

@nizamial09 nizamial09 removed the DNM label Feb 12, 2021
@epuertat epuertat moved this from In progress to Review in progress in Dashboard Feb 16, 2021
Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

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

Awesome work, @nizamial09 ! I'm really sorry for my late review here.

Regarding the action buttons, given enter and exit are complimentary actions I find a total waste of space and visual clarity to display (even grayed-out) an action that the user won't ever be able to perform...

image

I remember we discussed this with @votdev, in order to perform this in a later refactoring, but given we are now doing this and 'later refactors' some times never show up, why not starting right now to adopt this practice of only showing the actions that can be performed (unless there's a good reason to keep them grayed-out, like providing a tooltip)?

Is it possible to suppress the red warning pop-up?

image

Alternatively, this approach blue->{red,green} notification approach could work (we already had this behaviour for some operations, like Pool creation):

  • The enter-maintenance launches a background job/notification (in blue)
  • If successful, a green notification appears.

image

If the modal doesn't allow the user to do anything at all (just closing the modal):

image

... I'd rather go with the blue->red notification approach.

Regarding the error when the host cannot enter in maintenance mode, perhaps a 400 is too broad and mostly to indicate syntax errors in the request. What about a '409 Conflict' (Indicates that the request could not be processed because of conflict in the current state of the resource,)

image

src/pybind/mgr/dashboard/controllers/host.py Outdated Show resolved Hide resolved
src/pybind/mgr/dashboard/controllers/host.py Outdated Show resolved Hide resolved
Copy link
Contributor

@avanthakkar avanthakkar left a comment

Choose a reason for hiding this comment

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

Tested it manually & LGTM. Great work @nizamial09 !

@nizamial09
Copy link
Member Author

jenkins test dashboard

@nizamial09
Copy link
Member Author

jenkins test make check

Copy link
Contributor

@alfonsomthd alfonsomthd left a comment

Choose a reason for hiding this comment

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

I see that after entering a host in maintenance and exiting again from maintenance, both buttons are disabled so I cannot put it into maintenance again:
Screenshot from 2021-03-02 14-09-42

@nizamial09
Copy link
Member Author

jenkins test make check

@nizamial09
Copy link
Member Author

jenkins test dashboard

@jmolmo
Copy link
Member

jmolmo commented Mar 4, 2021

We have merged:
#38875

Which introduces the possibility to create hosts that arrives to the cluster in "maintenance mode". I do not know if this enhancement for adding hosts can be included or not in this pr. But in any case is good to outline that we have this feature available.(very useful)

The UI seems easy to use and understand. For me is ok.

@nizamial09
Copy link
Member Author

Thanks @jmolmo and yeah we are planning to include this new feature on a seperate PR as an improvement. Once this is merged I'll get started on that ASAP.

@nizamial09
Copy link
Member Author

jenkins test dashboard

@nizamial09
Copy link
Member Author

jenkins test dashboard

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

In Cluster -> Hosts, I've added additional button to put the selected host on maintenance or exit out of the maintenance mode. Also for some hosts the ok-to-stop tests may trigger some warnings which requires a --force command to pass along with the maintenance enter command to enter a host into maintenance. In UI this is achieved using a confirmation Modal. In addition to this if the check error is It is NOT safe to stop the host then the host wont be able to put into maintenance mode.

Fixes: https://tracker.ceph.com/issues/49101
Signed-off-by: Nizamudeen A <nia@redhat.com>
@nizamial09
Copy link
Member Author

jenkins test make check

Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

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

Awesome job @nizamial09 ! Let's try to get this backported asap to Pacific so that we can demo it in the next review 🎉

Dashboard automation moved this from Review in progress to Reviewer approved Mar 9, 2021
@epuertat epuertat moved this from Reviewer approved to Ready-to-merge in Dashboard Mar 9, 2021
@epuertat epuertat merged commit 68142da into ceph:master Mar 9, 2021
Dashboard automation moved this from Ready-to-merge to Done Mar 9, 2021
@epuertat epuertat deleted the host-maintenance-feature branch March 9, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Dashboard
  
Done
6 participants