Creating 2 backends with the same name creates a mess

Bug #1886164 reported by Gorka Eguileor
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Gorka Eguileor

Bug Description

There's nothing preventing us from accidentally creating multiple Backends with the same name on the same code run. For example 2 lvm backends using the 'lvm' name with different VGs.

This will create a mess in the DB.

Cinderlib should at least prevent that from happening on the same run, even if it cannot prevent it between runs.

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

Fix proposed to branch: master

Changed in cinderlib:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinderlib (master)

Submitter: Zuul
Branch: master

commit db573863aaf5a836ac63acbd55c42ba7677c0294
Author: Gorka Eguileor <email address hidden>
Date: Fri Jul 3 11:15:27 2020 +0200

    Prevent duplicated backend names

    With this patch we prevent us from having duplicated backend names for
    different driver configurations during the same run.

    If we pass the same name and configuration to Backend a second time we
    get the Backend instance that was created on the first call.

    If we pass the same name with a different configuration then we raise an
    exception on the second call.

    Change-Id: I87c14d236d7f2685315e4088db527090680c9523
    Closes-Bug: #1886164

Changed in cinderlib:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers