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: perform daemon actions #44609
Conversation
e2f8e87
to
2c1c3c3
Compare
2c1c3c3
to
c56d5e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pereman2: Didn't yet tested this manually but found some minor improvements in the UI section. Also I think its good to use pre-commit hook before commiting so that it could take care of most of the linting issues in code. You can find out how to setup pre-commit hook in ceph-dev..
...rontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html
Outdated
Show resolved
Hide resolved
...rontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html
Show resolved
Hide resolved
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
src/pybind/mgr/dashboard/frontend/src/app/shared/api/daemon.service.ts
Outdated
Show resolved
Hide resolved
|
Forgot one thing: when the daemon is already in a |
|
@nizamial09 thanks! I should've opened this as draft since it was mostly to show alfonso the frontend test :p |
...tend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts
Outdated
Show resolved
Hide resolved
|
jenkins test make check |
|
@pereman2 I just saw we already have a tracker dedicated for this. Instead of using the new one you created, shall we use that? https://tracker.ceph.com/issues/50322 |
Let's use that one, I'll close the current one. |
a8b69bc
to
748deae
Compare
|
jenkins test make check |
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Show resolved
Hide resolved
748deae
to
987cd6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! But I think we should start covering all day-2 ops with e2e, so here it comes the challenge:
Given that you already have experience with BDD/Behave/Cucumber
When you implement this new day-2 operation
Then it'd be awesome if a new BDD e2e test is added 😻 If you want to take the challenge, Cypress has a Cucumber-like library.
| { | ||
| permission: 'update', | ||
| icon: Icons.deploy, | ||
| click: () => this.daemonAction('redeploy'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the docs I see reconfig and/or redeploy?
Not sure if tableActions support tool-tips, but wouldn't be worthy to explain what redeploy and reconfig do (start and stop are self-explanatory though)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was self-explanatory both restart and redeploy. Restart is stop and start I'd say, and redeploy recreates the systemd unit files, stops and restarts the service again. Reconfig I haven't checked since I thought it would increase the complexity of this pr rn
| class Daemon(RESTController): | ||
| @raise_if_no_orchestrator([OrchFeature.DAEMON_ACTION]) | ||
| @handle_orchestrator_error('daemon') | ||
| @RESTController.MethodMap(version=APIVersion.EXPERIMENTAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is experimental the new black? :P Now serious: I see the point of always starting with experimental version, but then we'll have to force ourselves to periodically review and freeze endpoints as stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost good to me apart from some minor hiccups.
I have an rgw service deployed in such a way that 2 daemons are in a same host and 1 in other. When I try to select a daemon in the first host, both of the daemons in that host gets selected.
https://user-images.githubusercontent.com/71764184/150755853-40673a7d-58dc-4111-8aa7-d1a64b8ceeae.mp4
Also, whenever I try to stop an rgw daemon it goes into an error state (same happening while using cephadm commands) so maybe we need to raise a bug or talk with cephadm folks...
.../frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Awesome work @pereman2
One last request from me and I think that'll be it.
src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/06-daemons.e2e-spec.ts
Outdated
Show resolved
Hide resolved
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
|
Moved to RTB @pereman2 , but please squash commits (it'd facilitate backporting) and add the Fixes: to the commit message too. |
83fd2e4
to
42f43ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, but some comments from my end:
- When I stop a service it enters "error" state. Shouldn't it be "stopped" instead? "Error" is something unexpected, and no action that we allow users to do should directly result in an error state (IMHO we should prevent that). @adk3798 any clue on this?
-
I also see the mon/mgr actions are grayed out? Aren't they supported?
-
Another interesting behaviour I observed is that when performing multiple actions (start/stop/redeploy), no more than 6 events are displayed, but they're not the latest 6, but the first six (2 events from 1 hour ago are there, while I just did many restarts and they aren't displayed: the issue is probably in the back-end code). Additionally, I'd expect to see the events in reverse chronological order (newer at the top). Does that make sense?:
- When I check the service events, I get:
Any clue about if that's expected?
- Just a nit UI question: could we add some padding between icons and buttons (I know it's not specific of this PR, but let's incrementally improve the UI?)
This is a sample from the Patternfly website:
42f43ca
to
a302ac1
Compare
Do we want to support this? If you kill a mon or mgr you risk making the dashboard unusable.
Events come from cephadm we don't modify them.
Those are service events not daemon events which come from a different datasource.
|
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com> Fixes: https://tracker.ceph.com/issues/50322
a302ac1
to
239f884
Compare
|
jenkins test api |
|
jenkins test make check |
|
jenkins test dashboard cephadm |
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
jenkins test api |









Ceph.2.mp4
Fixes: https://tracker.ceph.com/issues/50322
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox