Backups panel is visible even if enable_backup is False

Bug #1778771 reported by Dmitriy Rabotyagov
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Edward Hope-Morley
OpenStack Dashboard Charm
Invalid
Undecided
Unassigned
Ubuntu Cloud Archive
Fix Released
High
Unassigned
Queens
Fix Released
High
Unassigned
Rocky
Fix Released
High
Unassigned
horizon (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Unassigned
Cosmic
Fix Released
High
Unassigned

Bug Description

Hi,

Volumes - Backup panel is visible even if OPENSTACK_CINDER_FEATURES = {'enable_backup': False} in local_settings.py

Meanwhile setting enable_backup to false removes an option to create backup of a volume in the volume drop-down options. But panel with backups itself stays visible for both admins and users.

As a work-around I use the following customization script:
import horizon
from django.conf import settings
if not getattr(settings, 'OPENSTACK_CINDER_FEATURES', {}).get('enable_backup', False):
    project = horizon.get_dashboard("project")
    backup = project.get_panel("backups")
    project.unregister(backup.__class__)

And for permanent fix I see the following decision. In openstack_dashboard/dashboards/project/backups/panel.py make the following changes:
...
+L16: from django.conf import settings
...
+L21: if not getattr(settings, 'OPENSTACK_CINDER_FEATURES', {}).get('enable_backup', False):
+L22: return False
...

== SRU details for Ubuntu =

[Impact]
See above.

[Test Case]
Juju deploy openstack and manually test that backup panel is not visible if enable_backup is set to False.

[Regression Potential]
Low. The patch has landed upstream in master, stable/rocky, and stable/queens. This patch has already landed in Ubuntu rocky as well.

Revision history for this message
Trent Lloyd (lathiat) wrote :

I can confirm this behavior, it has changed between Ocata and Queens (but is still present in the latest release also)

The "Volume Backups" used to be a tab on the "Volumes" page in Ocata. In Queens it has it's own panel on the left "Backups".

The old tab respected the enable_backup flag, but the new panel does not.

The enable_backup flag still controls the "Create Backup" option appearing in the dropdown menu for each volume; so the flag is still partially in effect.

Trent Lloyd (lathiat)
Changed in horizon:
status: New → Confirmed
Revision history for this message
Trent Lloyd (lathiat) wrote :

Looking at openstack_dashboard/api/cinder.py#volume_backup_supported (which checks the OPENSTACK_CINDER_FEATURES flag)

It notes
    # TODO(lcheng) Cinder does not expose the information if cinder
    # backup is configured yet. This is a workaround until that
    # capability is available.
    # https://bugs.launchpad.net/cinder/+bug/1334856

There is a comment on that bug about being able to query the services endpoint and an abandoned changeset to implement an alternative check. I cannot say whether either of those solutions are sensible just noting with respect to a fix for this bug it may be worth looking further at that issue.

Otherwise for a fix on the current situation I would perhaps call to openstack_dashboard.api.cinder.volume_backup_supported instead of checking the django.conf directly

tags: added: low-hanging-fruit
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Yep, you are absolutely right, that it's better to rely on openstack_dashboard.api.cinder.volume_backup_supported, I've just missed this function during investigation. As it seems that even if mentioned bug would be fixed, we could still rely on the output of this function in terms of cinder backup support.

Seyeong Kim (seyeongkim)
tags: added: sts
Changed in charm-openstack-dashboard:
assignee: nobody → Seyeong Kim (xtrusia)
status: New → In Progress
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Changed in charm-openstack-dashboard:
milestone: none → 18.11
Changed in horizon:
assignee: nobody → Edward Hope-Morley (hopem)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/605442

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/605442
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6c2225bab8b007023e031d829bc72e8e50e6f1df
Submitter: Zuul
Branch: master

commit 6c2225bab8b007023e031d829bc72e8e50e6f1df
Author: Edward Hope-Morley <email address hidden>
Date: Wed Sep 26 15:36:03 2018 +0100

    Add enabled check in Backups panel

    If enable_backup is False in OPENSTACK_CINDER_FEATURES
    then we should not display the backups panel.

    Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
    Closes-Bug: #1778771

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/605715

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/605994

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/606052

Changed in horizon (Ubuntu Bionic):
status: New → Triaged
Changed in horizon (Ubuntu Cosmic):
status: New → Triaged
Changed in horizon (Ubuntu Bionic):
importance: Undecided → High
Changed in horizon (Ubuntu Cosmic):
importance: Undecided → High
Changed in horizon (Ubuntu Bionic):
importance: High → Critical
importance: Critical → High
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This is fixed in openstack-dashboard 3:14.0.0-0ubuntu4 in cosmic/rocky.

Changed in horizon (Ubuntu Cosmic):
status: Triaged → Fix Committed
Changed in cloud-archive:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:14.0.0-0ubuntu4

---------------
horizon (3:14.0.0-0ubuntu4) cosmic; urgency=medium

  * d/p/add-enabled-check-in-backups-panel.patch: Cherry-picked from
    https://review.openstack.org/#/c/605715 to ensure Volume Backups panel
    is disabled if enable_backup is False (LP: #1778771).

 -- Corey Bryant <email address hidden> Mon, 01 Oct 2018 15:04:31 -0400

Changed in horizon (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:14.0.0-0ubuntu4~cloud0
---------------

 horizon (3:14.0.0-0ubuntu4~cloud0) bionic-rocky; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (3:14.0.0-0ubuntu4) cosmic; urgency=medium
 .
   * d/p/add-enabled-check-in-backups-panel.patch: Cherry-picked from
     https://review.openstack.org/#/c/605715 to ensure Volume Backups panel
     is disabled if enable_backup is False (LP: #1778771).

Changed in cloud-archive:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/rocky)

Reviewed: https://review.openstack.org/605715
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=19865eec5bc4a5a0ee402a55295dda2e52c2422c
Submitter: Zuul
Branch: stable/rocky

commit 19865eec5bc4a5a0ee402a55295dda2e52c2422c
Author: Edward Hope-Morley <email address hidden>
Date: Wed Sep 26 15:36:03 2018 +0100

    Add enabled check in Backups panel

    If enable_backup is False in OPENSTACK_CINDER_FEATURES
    then we should not display the backups panel.

    Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
    Closes-Bug: #1778771
    (cherry picked from commit 6c2225bab8b007023e031d829bc72e8e50e6f1df)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-openstack-dashboard (master)

Change abandoned by Edward Hope-Morley (<email address hidden>) on branch: master
Review: https://review.openstack.org/594164
Reason: Hi Seyeong, I think we can abandon this patch now since it is fixed in horizon upstream. The patch has been released to Stein and stable/rocky and will hopefully hit queens and pike so we can focus on the SRU instead. If you think we still need a charm patch let me know and we can discuss and reopen if necessary.

Changed in charm-openstack-dashboard:
status: In Progress → Invalid
assignee: Seyeong Kim (xtrusia) → nobody
milestone: 18.11 → none
description: updated
description: updated
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This has been uploaded to the bionic review queue where it is awaiting review by the SRU team: https://launchpad.net/ubuntu/bionic/+queue?queue_state=1&queue_text=

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/queens)

Reviewed: https://review.openstack.org/605994
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5d1690da904ce4548887e3d11aa9b0687013b09d
Submitter: Zuul
Branch: stable/queens

commit 5d1690da904ce4548887e3d11aa9b0687013b09d
Author: Edward Hope-Morley <email address hidden>
Date: Wed Sep 26 15:36:03 2018 +0100

    Add enabled check in Backups panel

    If enable_backup is False in OPENSTACK_CINDER_FEATURES
    then we should not display the backups panel.

    Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
    Closes-Bug: #1778771
    (cherry picked from commit 6c2225bab8b007023e031d829bc72e8e50e6f1df)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/pike)

Reviewed: https://review.openstack.org/606052
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=02e405dcac62a08b1029af730881036554d971dd
Submitter: Zuul
Branch: stable/pike

commit 02e405dcac62a08b1029af730881036554d971dd
Author: Edward Hope-Morley <email address hidden>
Date: Wed Sep 26 15:36:03 2018 +0100

    Add enabled check in Backups panel

    If enable_backup is False in OPENSTACK_CINDER_FEATURES
    then we should not display the backups panel.

    Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
    Closes-Bug: #1778771
    (cherry picked from commit 6c2225bab8b007023e031d829bc72e8e50e6f1df)

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 14.0.1

This issue was fixed in the openstack/horizon 14.0.1 release.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dmitriy, or anyone else affected,

Accepted horizon into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/3:13.0.1-0ubuntu3 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 horizon (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 15.0.0.0b1

This issue was fixed in the openstack/horizon 15.0.0.0b1 development milestone.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

I have tested the bionic-proposed build using the provided testcase i.e. deploy openstack-dashbaord with enable_backup set to False and check that the backups panel is not there. I then set enable_backup to true and confirmed that the backups panel appears.

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

This bug was fixed in the package horizon - 3:13.0.1-0ubuntu3

---------------
horizon (3:13.0.1-0ubuntu3) bionic; urgency=medium

  * d/p/add-enabled-check-in-backups-panel.patch: Cherry-picked from
    https://review.openstack.org/#/c/605994/ to ensure Volume Backups panel
    is disabled if enable_backup is False (LP: #1778771).

 -- Corey Bryant <email address hidden> Mon, 15 Oct 2018 10:03:18 -0400

Changed in horizon (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been 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
Corey Bryant (corey.bryant) wrote : Please test proposed package

Hello Dmitriy, or anyone else affected,

Accepted horizon into queens-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:queens-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-queens-needed to verification-queens-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-queens-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-queens-needed
Revision history for this message
Edward Hope-Morley (hopem) wrote :

I have tested the xenial-proposed/queens build using the provided testcase i.e. deploy openstack-dashboard with enable_backup set to False and check that the backups panel is not there. I then set enable_backup to true and confirmed that the backups panel appears.

tags: added: sts-sru-done verification-queens-done
removed: verification-queens-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for horizon 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
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:13.0.1-0ubuntu3~cloud0
---------------

 horizon (3:13.0.1-0ubuntu3~cloud0) xenial-queens; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (3:13.0.1-0ubuntu3) bionic; urgency=medium
 .
   * d/p/add-enabled-check-in-backups-panel.patch: Cherry-picked from
     https://review.openstack.org/#/c/605994/ to ensure Volume Backups panel
     is disabled if enable_backup is False (LP: #1778771).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.2

This issue was fixed in the openstack/horizon 13.0.2 release.

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.