Repository navigation
mgr/dashboard: add logs and daemon version to upgrade UI - #52395
Conversation
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
e3bada4 to
932e225
Compare
932e225 to
1ef981e
Compare
|
Can we make out some space to move the cluster logs bit up and not make the page scrollable? Also in cluster logs do they have option to make it full screen? |
Some of the space is taken by the
Nope, Maybe I can redirect it to the Logs page, but there's no full screen option. And in this page it doesn't make sense for a full screen view maybe when the upgrade is in progress the contents will be less and the logs can have a better view! |
Yes I think we can give also a link to logs page, so if they want to see detailed logs. That would be good. Just unrelated to this PR, could be good additions.
|
|
Also we are letting user wait on the loading for a longer time. The wait is due the upgrade api taking time to respond. Can we load the page and put the loading/skeleton on the upgrade status only, instead of whole page? |
|
Tested the PR, mostly looks good. Screencast.from.2023-07-19.13-14-58.webm |
The upgrade doesn't get started from here.
The above answer answers this.
I conditionally disabled it for now. But technically it could work though.
Yup, we'll be providing a progress view. I basically copied this design from the OCP world with the patternfly. @cloudbehl was showing me a demo of their UI upgrades and it looked like this. So that was the inspiration point.
Maybe the
Agreed, I'll update it.
I'll have to follow this up. With cephadm, if you want a different registry/release version, you should pass it like
2 mgr's are needed to start the upgrade. Otherwise you get an error. I assume majority of the cluster will have 2 mgrs but its a useful information though. And it shows warning as well if the number of osds is less.
with 4000 daemons the table won't look good. maybe I can show a summary like you mentioned above. |
|
@epuertat Thanks, I agree with most of the things. Few things to comment and others I'll let @nizamial09 get back: Also the progress of update will be covered in notification and also in the page itself as well. You can partially look at the view from marvel design that Nizam created. |
Upgrade Now buttonI wouldn't say "Upgrade Now". That's gonna sound intimidating to users. Upgrades are a critical operation, and I'd feel cheated if after getting everything ready for the upgrade (requesting a maintenance window, calling support engineers for overtime work, getting on-call support, consultants, etc....), I find out that the "Upgrade Now" button does NOT upgrade anything now, but opens a new modal... Why not just "Check versions" if that's what the modal does? In any case, I'd rather show "Upgrade to x.y.z!" as a big button, and a smaller hyperlink below that button saying "Select another version...". Let's try to save extra-clicks, unless we're providing real value. For example: we can open a modal if we're showing the user the current status of their cluster, how it's gonna look like after the upgrade, the list of things improved/fixed in this release, ... But not just a dropdown to select meaningless version numbers. Layout/widgetsOk, if that comes from the Openshift world, I'd assume that there have been UX experts behind that. In that case, I'd just recommend that we properly implement that pattern. The above doesn't look really professional: padding/margins/whitespacing is key to proper look & feel. Same for horizontal and vertical text alignment: cards are usually made up of a card title section, which is pinned to the top of the squared element, and the card body, which might be vertically centered (or not). Properly styling raw HTML elements into decently looking widgets is not a trivial task. Both Red Hat, SUSE, IBM, etc., have dedicated UI/UX teams to craft new UI widgets. Can't we use any of the existing Bootstrap/Patternfly/Carbon card implementations? |
epuertat
left a comment
There was a problem hiding this comment.
Good progress! Thanks for addressing my previous comments.
There was a problem hiding this comment.
Regarding the ordering of the cards, I'd go for:
- New available version (instead of Status), first because it's an actionable item (the other ones are read-only), and if the logic in this first item is properly implemented, the other 3 buttons should almost be unnecessary (if the cluster health is not OK, or the number of mgrs is not 2 or more, then this first button item should be disabled)
- Current Version: probably we could put this together with the previous 1, but I guess that 3 cards basically broke the 2:2 layout.
- Cluster Health
- Mgr count
I'm dubious about these last 2 cards... Both could probably summarized in a single card, like "Upgrade Readiness" or something, and we could put there the Cluster Health and the Mgr Count together.
To keep the 4-card layout, we could convert the daemon table into a new card called "Upgraded Daemons" (I hate the term "daemon", it's too old fashioned and overly specific... why not "Services" or "Service Instances"), and there we show the percentage % or count of daemons migrated.
There was a problem hiding this comment.
I agree Current version and then Upgrade Status are the only one's required. If some conditions are not met we can skip the upgrade button and add the conditions that are not satisfied.
There was a problem hiding this comment.
I had some progress but it felt like it need more discussion especially for Service instances migration.
We can check if the daemons are migrated by comparing the daemon version with the current mgr version (which is what we consider as the cluster version). And as per cephadm implementation, you cannot upgrade any other daemons without first upgrading the mgr. So we are good there. I attached the screenshot below. There is also a tooltip which shows how many of the daemons are in new version.
I have removed those changes from the current PR. I'll open a tracker and track it for a different one after the discussions.
scrnli_7_31_2023_10-55-28.PM.mp4
There was a problem hiding this comment.
There was a problem hiding this comment.
Sorry for the mess: I mentioned the "service instances" thing because I feel like "daemon" is a very Linux-specific term, but as we talk about "daemons" all over the Dashboard, for consistency we should keep that until we choose "service instance" (perhaps too big :/) or something else that works better.
There was a problem hiding this comment.
No async for the 2nd observable?
| *ngIf="{upgradeInfo: upgradeInfo$ | async, error: upgradeInfoError$ } as upgrade"> | |
| *ngIf="{upgradeInfo: upgradeInfo$ | async, error: upgradeInfoError$ | async} as upgrade"> |
BTW, looks like this observable is subscribed multiple times in this page... Being that the case, I'd put it in a parent element, to avoid calling it twice.
There was a problem hiding this comment.
If I put it in a parent class it would prevent the other cards from loading since this is only needed in two area's. But this won't call twice since I am sharing the pipe returns in other areas so it'll only gets called once and the results gets shared across the wherever its called.
There was a problem hiding this comment.
I already mentioned this in Aashish' multi-site hierarchy PR, but this items floating in the void... feels weird.
Everything else is surrounded by lines (cards, tables). This creates an imbalance in the layout. In fact, one great to test that we are being consistent would be to use the gray background from the new landing page and see how it looks. "Card-like" layout ensures that the usually quickly identifies information buckets. By leaving sections of data detached from "visible containers", we make it feel like some CSS formatting went wrong or missing...
There was a problem hiding this comment.
Yeah, I followed the openshift designs which has it like this. There are room for improvements here though. For instance I'll need to provide the upgrade history some point later on when its implemented in cephadm. Once we add in those info probably this will be rectified. Meanwhile I put a video in the above comments by removing these details.
There was a problem hiding this comment.
Shouldn't this be disabled if the cluster health is ERR? In your screenrecording, it's in Cluster Health ERR, but allowing to upgrade. That's what I meant, that I'd remove the cluster health and mgr count if the Upgrade button is responsive to those conditions.
There was a problem hiding this comment.
Nope. Even if the cluster is unhealthy the upgrade will proceed. The health will flicker while the upgarde is in progress as well. When we designed this, we thought it would be nice to show the cluster health to the user upfront before proceeding with the upgrade.
There was a problem hiding this comment.
Argghhh... we are keeping state by storing stuff in the localStorage? This is a very nasty hack (with downsides, like causing issues with multi-tab browsing), probably inherited from the original Dashboard. Keep in mind that the localStorage is a highly unsafe tool that should be banished from browsers. Data stored there is shared across all tabs (ALL mean any, even your P**nHub tabs can read what other pages put there).
Angular (and most web frameworks) provide mechanisms for pages to set/get state, and the browser itself manages this state through the browser history:
- Exposing the state in the URL (e.g.: if we click on a tab, a
#tabNameis added to the URL). That way, whenever we browse back, we return to the exact same view.- This was a cumbersome task, as it's not trivial to instantiate an Angular component from the
Routerparams atonInitstage. But, since Angular 16, this has dramatically improved, and now there's an option that allows to pass URL query params as the inputs for components.
- This was a cumbersome task, as it's not trivial to instantiate an Angular component from the
- Using
routerLinkstate, to save custom data, which Angular automatically store in the browser history API.
There are other trickier approaches,
There was a problem hiding this comment.
yeah.. this would need a quite a bit of refactoring. I just modified little bit to make it work/fix for my usecase. I'll create tracker and see if we can change the behvaiour
There was a problem hiding this comment.
c815448 to
99dba7c
Compare
|
Does it makes sense to have a refresh button somewhere on upgrade page? Just to provide user to do hard refresh. |
it would but i have some issues adding it to the component. Maybe I need to find a better implementation but definitely on my to-do list! https://tracker.ceph.com/issues/62266? |
|
jenkins test make check |
epuertat
left a comment
There was a problem hiding this comment.
Another great piece of work @nizamial09! LGTM! Just a few observations (as usual) over there :P
There was a problem hiding this comment.
How's scalable is this endpoint? On a very-large cluster (Pawsey-like) this may be 8k items.
There was a problem hiding this comment.
We've not got issues on the daemon endpoint so far. We get the cached result from cephadm. And no processing as well! But I think this is the first time we are listing the entire daemons in a cluster (usually we filter them out either via hostname or service_name). So will need to test this with huge numbers to get some answers!
@pereman2 do you have any thoughts here?
There was a problem hiding this comment.
Same here: why is the body text so big? There should be some difference between header and body (size, text weight, ...).
Additionally, can we add some decoration/extra-value to the version? A link to the version release notes? Current URL is:
https://docs.ceph.com/en/latest/releases/quincy/#v17-2-6-quincy
Perhaps we can "discuss" with the docs team to add fixed anchors to those (removing the version code name from the reference, as it makes URL 100% deterministic/future-proof)?
There was a problem hiding this comment.
We should aim at making the UI layer (dumb) Ceph-unaware (ideally you could plug it to any other distributed system and deal with it), and put all the smartness in the back-end.
Why:
- It's more maintainable: the back-end is tightly coupled with the Ceph version. It even runs inside a Ceph daemon, so we can exploit all the available metadata, or even promote adding more metadata. If we encode "Ceph-knowledge" in the front-end, we need to keep that in sync across version (for any new added daemon that supports upgrades, we'll have to extend this list). But if we coordinate with the Cephadm team, perhaps we can share that common metadata between Cephadm and Dashboard codebases (this would apply to any other Ceph service).
- It's more scalable: why sending a list of all the daemons to the front-end and then skipping some of them. "Let's just send to the front-end what the front-end needs".
- It makes UI programming easier: the front-end should just know how deal with basic HTTP/CRUD endpoints (list resources, filter those, search, add/delete those). "Let's just send to the front-end what the front-end needs."
- It makes our REST API more valuable: whenever we code Ceph quirks in the front-end, our back-end becomes less rich and smart, and adds little value vs CLI commands.
There was a problem hiding this comment.
Thanks. I put the logic on backend. So now the frontend will only call with the list of daemons it want!
There was a problem hiding this comment.
Sorry for the mess: I mentioned the "service instances" thing because I feel like "daemon" is a very Linux-specific term, but as we talk about "daemons" all over the Dashboard, for consistency we should keep that until we choose "service instance" (perhaps too big :/) or something else that works better.
There was a problem hiding this comment.
There was a problem hiding this comment.
for Now I went with New Version because putting Available means that I'll have to put some extra conditions to handle the title when there's no update Available!
b797216 to
1fa63f8
Compare
This will make the logs component easier to reuse for now in upgrade component and later, wherever we want Fixes: https://tracker.ceph.com/issues/62016 Signed-off-by: Nizamudeen A <[email protected]>
1fa63f8 to
fa5f632
Compare
|
jenkins retest this please |
fa5f632 to
1b7ee9c
Compare
Shows Cluster Health Shows the count of mgr daemons Shows a table with all the daemon versions Display the cluster logs Fixes: https://tracker.ceph.com/issues/62016 Signed-off-by: Nizamudeen A <[email protected]>
1b7ee9c to
7dcb06d
Compare









Follows #52351
scrnli_8_3_2023_11-22-11.AM.mp4
Shows Cluster Health
Shows the count of mgr daemons
Shows a table with all the daemon versions
Display the cluster logs
Fixes: https://tracker.ceph.com/issues/62016
Signed-off-by: Nizamudeen A [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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 toxjenkins test windows