[SRU] ceph-mgr-dashboard package missing dependencies

Bug #1858304 reported by Nick Niehoff
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Medium
Unassigned
Train
Fix Released
Medium
Unassigned
Ussuri
Fix Released
Medium
Unassigned
ceph (Ubuntu)
Fix Released
Medium
Unassigned
Eoan
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Unassigned

Bug Description

[Impact]
Users are unable to enable the Ceph Dashboard WebUI without installing extra Python dependencies.

[Test Case]
Install and configure a ceph cluster
sudo ceph mgr module enable dashboard
sudo ceph config set mgr mgr/dashboard/ssl false

errors thrown as detailed in original bug report.

[Regression Potential]
Minimal - packaging only change to add missing dependencies.

[Original Bug Report]
After deploying Ceph Nautilus on Eoan I installed the ceph-mgr-dashboard package and tried to enable the dashboard with:

sudo ceph mgr module enable dashboard

The following error is returned:
Error ENOENT: module 'dashboard' reports that it cannot run on the active manager daemon: No module named 'distutils.util' (pass --force to force enablement)

Investigating the ceph-mgr logs I found:

2020-01-05 00:23:13.698 7f74b423cd00 -1 mgr[py] Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/__init__.py", line 38, in <module>
    from .module import Module, StandbyModule
  File "/usr/share/ceph/mgr/dashboard/module.py", line 26, in <module>
    from .services.sso import load_sso_db
  File "/usr/share/ceph/mgr/dashboard/services/sso.py", line 21, in <module>
    from ..tools import prepare_url_prefix
  File "/usr/share/ceph/mgr/dashboard/tools.py", line 11, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'

I then installed python3-distutils which let me get further but the dashboard still wasn't starting compaining about no cert configured so I ran:

ceph config set mgr mgr/dashboard/ssl false

Now ceph status reports the error:
Module 'dashboard' has failed: No module named 'routes'

Investigating the logs I found:

2020-01-05 00:30:19.990 7f663bd26700 -1 log_channel(cluster) log [ERR] : Unhandled exception from module 'dashboard' while running on mgr.ceph-mon2: No module named 'routes'
2020-01-05 00:30:19.990 7f663bd26700 -1 dashboard.serve:
2020-01-05 00:30:19.990 7f663bd26700 -1 Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/module.py", line 362, in serve
    mapper, parent_urls = generate_routes(self.url_prefix)
  File "/usr/share/ceph/mgr/dashboard/controllers/__init__.py", line 336, in generate_routes
    mapper = cherrypy.dispatch.RoutesDispatcher()
  File "/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 515, in __init__
    import routes
ModuleNotFoundError: No module named 'routes'

This was addressed by installing the python3-routes package.

Based on this I believe both python3-distutils and python3-routes should be added to the dependencies of the ceph-mgr-dashboard package.

CVE References

Nick Niehoff (nniehoff)
tags: added: packaging
Revision history for this message
James Page (james-page) wrote :

The routes dependency looks to be missing in cherrypy rather than directly in Ceph.

Revision history for this message
James Page (james-page) wrote :

I see its a recommends - so it probably should be a dependency for the ceph-mgr-dashboard package.

Revision history for this message
James Page (james-page) wrote :

Committed to Focal branch and cherry picked to Eoan branch for next round of SRU updates.

Changed in ceph (Ubuntu Focal):
status: New → Fix Committed
Changed in ceph (Ubuntu Eoan):
importance: Undecided → Medium
Changed in ceph (Ubuntu Focal):
importance: Undecided → Medium
Changed in ceph (Ubuntu Eoan):
status: New → Triaged
James Page (james-page)
description: updated
summary: - ceph-mgr-dashboard package missing dependencies
+ [SRU] ceph-mgr-dashboard package missing dependencies
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 15.1.0-0ubuntu2

---------------
ceph (15.1.0-0ubuntu2) focal; urgency=medium

  * d/rules,control: Disable Kafka endpoint support for RGW.

 -- James Page <email address hidden> Mon, 10 Feb 2020 11:53:47 +0000

Changed in ceph (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Nick, or anyone else affected,

Accepted ceph into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ceph/14.2.8-0ubuntu0.19.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ceph (Ubuntu Eoan):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-eoan
Revision history for this message
James Page (james-page) wrote :

Hello Nick, or anyone else affected,

Accepted ceph into train-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:train-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-train-needed to verification-train-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-train-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-train-needed
Revision history for this message
James Page (james-page) wrote :

Change validated for eoan/proposed and bionic-train/proposed.

Installation of the ceph-mgr-dashboard package ensures that the correct dependencies are also installed and it can be enabled.

tags: added: verification-done verification-done-eoan verification-train-done
removed: verification-needed verification-needed-eoan verification-train-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 14.2.8-0ubuntu0.19.10.1

---------------
ceph (14.2.8-0ubuntu0.19.10.1) eoan; urgency=medium

  * New upstream point release (LP: #1861789):
    - d/p/issue{37490,40114,40781}.patch: Drop, included in point release.
    - d/control: Add libcap-ng-dev to BD's.
    - d/control: Add libnl-genl-3-dev to BD's.
    - d/p/bluefs-use-uint64_t-for-len.patch: Fix type mismatch issue on
      32bit architectures.
    - d/p/CVE-2020-1700.patch: Drop, included in release.
    - d/p/32bit-fixes.patch: Misc 32 bit architecture fixes for
      mismatched types.
  * d/control: Add missing Depends on python3-{distutils,routes} to
    ceph-mgr-dashboard package (LP: #1858304).

 -- James Page <email address hidden> Wed, 25 Mar 2020 15:59:57 +0000

Changed in ceph (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ceph has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for ceph has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package ceph - 14.2.8-0ubuntu0.19.10.1~cloud0
---------------

 ceph (14.2.8-0ubuntu0.19.10.1~cloud0) bionic-train; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 ceph (14.2.8-0ubuntu0.19.10.1) eoan; urgency=medium
 .
   * New upstream point release (LP: #1861789):
     - d/p/issue{37490,40114,40781}.patch: Drop, included in point release.
     - d/control: Add libcap-ng-dev to BD's.
     - d/control: Add libnl-genl-3-dev to BD's.
     - d/p/bluefs-use-uint64_t-for-len.patch: Fix type mismatch issue on
       32bit architectures.
     - d/p/CVE-2020-1700.patch: Drop, included in release.
     - d/p/32bit-fixes.patch: Misc 32 bit architecture fixes for
       mismatched types.
   * d/control: Add missing Depends on python3-{distutils,routes} to
     ceph-mgr-dashboard package (LP: #1858304).
 .
 ceph (14.2.4-0ubuntu0.19.10.2) eoan-security; urgency=medium
 .
   * SECURITY UPDATE: DoS via RGW Beast front-end unexpected disconnects
     - debian/patches/CVE-2020-1700.patch: avoid leaking connections in
       src/rgw/rgw_asio_frontend.cc.
     - CVE-2020-1700

Revision history for this message
macchese (max-liccardo) wrote :

this bug is still alive on:

root@juju-ee3f63-0-lxd-0:/var/log# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

root@juju-ee3f63-0-lxd-0:/var/log# dpkg -l |grep ceph
ii ceph 15.2.7-0ubuntu0.20.04.1 amd64 distributed storage and file system
ii ceph-base 15.2.7-0ubuntu0.20.04.1 amd64 common ceph daemon libraries and management tools
ii ceph-common 15.2.7-0ubuntu0.20.04.1 amd64 common utilities to mount and interact with a ceph storage cluster
ii ceph-mds 15.2.7-0ubuntu0.20.04.1 amd64 metadata server for the ceph distributed file system
ii ceph-mgr 15.2.7-0ubuntu0.20.04.1 amd64 manager for the ceph distributed file system
ii ceph-mgr-dashboard 15.2.7-0ubuntu0.20.04.1 all dashboard module for ceph-mgr
ii ceph-mgr-modules-core 15.2.7-0ubuntu0.20.04.1 all ceph manager modules which are always enabled
ii ceph-mon 15.2.7-0ubuntu0.20.04.1 amd64 monitor server for the ceph storage system
ii ceph-osd 15.2.7-0ubuntu0.20.04.1 amd64 OSD server for the ceph storage system
ii libcephfs2 15.2.7-0ubuntu0.20.04.1 amd64 Ceph distributed file system client library
ii python3-ceph-argparse 15.2.7-0ubuntu0.20.04.1 amd64 Python 3 utility libraries for Ceph CLI
ii python3-ceph-common 15.2.7-0ubuntu0.20.04.1 all Python 3 utility libraries for Ceph
ii python3-cephfs 15.2.7-0ubuntu0.20.04.1 amd64 Python 3 libraries for the Ceph libcephfs library

ruuning:

root@juju-ee3f63-0-lxd-0:~# ceph mgr module enable dashboard
Error ENOENT: all mgr daemons do not support module 'dashboard', pass --force to force enablement

root@juju-ee3f63-0-lxd-0:~# ceph mgr module enable dashboard --force
module 'dashboard' is already enabled

root@juju-ee3f63-0-lxd-0:~# ceph mgr services
{}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.