Invisible conflict during creation of some resources

Bug #1532776 reported by Eva Balycheva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python client library for Zaqar
Fix Released
Undecided
Md Nadeem

Bug Description

Look how flavor creation is made in python-zaqarclient:
https://github.com/openstack/python-zaqarclient/blob/master/zaqarclient/queues/v1/pool.py#L46

Now imagine a situation:
The user asks python-zaqarclient to create a flavor like this:
tasty_flavor = self.client.flavor('tasty', pool='burger')
But Zaqar server already has a flavor named 'tasty' with 'broccoli' pool group.

The situation result:
The user might think he created a flavor with name 'tasty' and pool group 'burger', when in reality he didn't created anything.
Even worse, 'tasty' flavor has pool group 'broccoli'.
The user would never expect such betrayal from python-zaqarclient.

Same problem exists for creation of pools and maybe other resources.

The possible solution must be discussed.

Eva Balycheva (ubershy)
description: updated
Changed in python-zaqarclient:
assignee: nobody → MD NADEEM (mail2nadeem92)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-zaqarclient (master)

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

Changed in python-zaqarclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/266822
Committed: https://git.openstack.org/cgit/openstack/python-zaqarclient/commit/?id=98aa3db7af835058598d18db17d116334c267e26
Submitter: Jenkins
Branch: master

commit 98aa3db7af835058598d18db17d116334c267e26
Author: MD NADEEM <email address hidden>
Date: Wed Jan 13 15:35:25 2016 +0530

    Update flavor on flavor create if it exists

    As of now on PUT, zaqar server updates flavor
    if it is already exists else it will create a new one.
    However zaqar client return previous pool info if it is
    already exists. This result to a confusion for operator.

    The zaqar client should maitain symmetry with zaqar server.

    Closes-Bug: #1532776

    Change-Id: Ica8532375ed81828d09c3bdbab0fa911c155bf1a

Changed in python-zaqarclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/266808
Committed: https://git.openstack.org/cgit/openstack/python-zaqarclient/commit/?id=f985063ff1957f18988997bd215fa29e13dc1ba3
Submitter: Jenkins
Branch: master

commit f985063ff1957f18988997bd215fa29e13dc1ba3
Author: MD NADEEM <email address hidden>
Date: Wed Jan 13 14:48:16 2016 +0530

    Update pool on pool create if it exists

    As of now on PUT, zaqar server updates pool if
    it is already exists else it will create a new one.
    However zaqar client return previous pool info if
    it is already exists. This result to a confusion for
    operator.

    The zaqar client should maitain symmetry with zaqar server.

    Change-Id: I0e7311321630c3f931cf27b0828394589eaf7320
    Partial-Bug: #1532776

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-zaqarclient 1.0.0

This issue was fixed in the openstack/python-zaqarclient 1.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/python-zaqarclient 1.0.0 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.