Project

General

Profile

Feature #51408

mgr/dashboard: Add configurable MOTD or wall notification

Added by Volker Theile over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
UI
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
octopus, pacific
Reviewed:
Affected Versions:
Pull request ID:

Description

Sometimes there is the need to inform the Ceph Dashboard users about latest news and information. The plan is to allow the administrator to configure a MOTD (message of the day) via CLI which is shown when the user is logging into the UI.

The name was choosen by intention because it is not planned to support multiple messages displayed at the same time in the UI, this will overload the user experience and annoy the user. Instead, HTML can be used to structure the message.

The notification will be displayed at the top of the page, same like it is done by the already existing popup for the telemetry module.

A command line to configure the MOTD may look like:

$ ceph dashboard motd set <severity> <expire> <repetitive> <message>
$ ceph dashboard motd clear

where <severity> is something like 'info' | 'low' | 'high' which is represented by different colors in the UI. <expire> is the time when the notification expires. Until this time the noification is shown in the UI. This can be e.g. '7d' and will be a unix timestamp internally like 'now + expire'. If <repetitive> is set TRUE, the notification will be displayed on every log in until it expires. If set to FALSE, it will only be displayed once. The <message> will contain the text to be displayed. HTML code will be supported, thus links to external sources are possible.


Related issues

Copied to Dashboard - Backport #51730: octopus: mgr/dashboard: Add configurable MOTD or wall notification Resolved
Copied to Dashboard - Backport #51731: pacific: mgr/dashboard: Add configurable MOTD or wall notification Resolved

History

#1 Updated by Volker Theile over 2 years ago

  • Description updated (diff)

#2 Updated by Volker Theile over 2 years ago

  • Description updated (diff)

#3 Updated by Ernesto Puerta over 2 years ago

Looks like a nice addition!

Do you have a concrete example/s of the situation and the kind of messages to display?

Without knowing exactly the use cases, rather than severity I'd go for categories:

  • info (e.g.: "Scheduled maintenance by X date")
  • warning (e.g.: "UserName is investigating the current performance issue, please don't increase the workloads!")
  • danger (e.g.: "Replacing broken disks, please refrain from deploying new OSDs or modifying CRUSH rules")

If you were thinking on these kind of announcements, I'm wondering if this should be limited to the Dashboard only. Wouldn't it make sense to make it visible to all users via Ceph health checks/warnings? Any user running "ceph -s" would see the warning too. What do you think?

Regarding HTML support, I'd be cautious on that as it might allow to perform code injection and XSS attacks. If we just want to share links, perhaps we can simply parse URLs as <a> tags. Otherwise we should remember to sanitize that input.

#4 Updated by Volker Theile over 2 years ago

  • Description updated (diff)

#5 Updated by Volker Theile over 2 years ago

Do you have a concrete example/s of the situation and the kind of messages to display?

We want to inform the user about updates or other important information. The plan is that the MOTD is configured through our orchestrator in special cirumstances.

If you were thinking on these kind of announcements, I'm wondering if this should be limited to the Dashboard only. Wouldn't it make sense to make it visible to all users via Ceph health checks/warnings? Any user running "ceph -s" would see the warning too. What do you think?

Using the health state is not a good idea, at least for us, because we disallow updates when the cluster is in HEALTH_ERR by default. The intention for this feature is to display it in a prominent place in the Dashboard ONLY without affecting Ceph in any way.

Regarding HTML support, I'd be cautious on that as it might allow to perform code injection and XSS attacks. If we just want to share links, perhaps we can simply parse URLs as <a> tags. Otherwise we should remember to sanitize that input.

Right, HTML support needs special treatment.

#6 Updated by Ernesto Puerta over 2 years ago

Ok.

#7 Updated by Volker Theile over 2 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 42188

#8 Updated by Volker Theile over 2 years ago

  • Backport set to octopus, pacific

#9 Updated by Ernesto Puerta over 2 years ago

  • Status changed from Fix Under Review to Pending Backport

#10 Updated by Backport Bot over 2 years ago

  • Copied to Backport #51730: octopus: mgr/dashboard: Add configurable MOTD or wall notification added

#11 Updated by Backport Bot over 2 years ago

  • Copied to Backport #51731: pacific: mgr/dashboard: Add configurable MOTD or wall notification added

#12 Updated by Loïc Dachary over 2 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF