volume backup service might not be available

Bug #1595159 reported by Pavlo Shchelokovskyy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Undecided
Pavlo Shchelokovskyy

Bug Description

This is somewhat related to

- https://bugs.launchpad.net/heat/+bug/1434495 (volume resources are overoptimistic in some API calls)
- https://bugs.launchpad.net/cinder/+bug/1334856 (no way to discover if cinder-backup service is available)

The point is, cinder-backup service is optional, and there is currently no way to discover if it is available via Cinder API using only normal user-scoped token.

There is a spec https://review.openstack.org/#/c/306930/ aiming to fix this, but until it is implemented and such API used in Heat, absence of cinder-backup will fail any attempt to:

- snapshot a stack that has a volume resource
- delete a stack that has a volume resource with deletion_policy set to Snapshot

What more, in a latter case, when cinder-backup service is absent it is perfectly possible to create such stack, but an attempt to delete it will result in undeletable stack even if the volume deleted manually.

Until discovery of cinder-backup service is implemented, I propose to add a config option to configure if it is is available and use it in validation of volume resources.

Alternatively, we could issue an admin-scoped cinderclient request during validation to check if cinder-backup service is available. Downside is yet another API call on validation.

Yet another alternative is to silently ignore the failure to backup the volume on deletion, but that would be really frustrating to users expecting the backup to be created (the funny thing is, even when cinder-backup is not running, backups.list() still returns possibly empty list of backups).

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

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

Changed in heat:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/357324

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

Reviewed: https://review.openstack.org/332851
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=744527f6abc18b659200ec1773db0d49347310bf
Submitter: Jenkins
Branch: master

commit 744527f6abc18b659200ec1773db0d49347310bf
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Wed Jun 22 17:02:58 2016 +0300

    Deal with cinder-backup service absent

    cinder-backup service is optional, and currently not discoverable with
    non-admin scoped tokens.

    This patch introduces a new config option `volumes.backups_enabled`
    (defaults to True for backward compat).
    When set to False, it will fail validation of stacks containing volume
    resources with deletion_policy set to Snapshot,
    as such stacks will be undeletable in the absence of cinder-backup
    service.

    Change-Id: I10c4787870e7b240d775aa5d66eb1d0a6d837d8d
    Partial-Bug: #1595159

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/357324
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=60e90c09ef3a2772d017a0780ce7115699efaaf0
Submitter: Jenkins
Branch: master

commit 60e90c09ef3a2772d017a0780ce7115699efaaf0
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Thu Aug 18 19:03:12 2016 +0300

    Add reno note on volumes.backups_enabled option

    Change-Id: I911db6d7dab7d0a3b6e420bd7e12672ec39e6af9
    Related-Bug: #1595159

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.