[devops] slave-add error after slave-remove: Key (name, environment_id)=(slave-xx, 233) already exists

Bug #1641945 reported by Ekaterina Khomyakova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Dmitry Belyaninov

Bug Description

devops 2.9.23

Steps to reproduce:
  1. Prepare master and several slaves (e.g. you have admin, slave-01, slave-02, slave-03)
  2. `dos.py slave-remove $env_name --node-name slave-02` (now you have admin, slave-01, slave-03)
  3. `dos.py slave-add $env_name`

Actual result:
  django.db.utils.IntegrityError: duplicate key value violates unique constraint "devops_node_name_24b90ab1b19bfb4f_uniq"
  DETAIL: Key (name, environment_id)=(slave-02, 233) already exists.

Expected results:
  Created node 'slave-02'
 or
  Created node 'slave-04'

Tags: area-qa
Andrey Nikitin (heos)
tags: added: area-qa
removed: area-devops
Changed in fuel:
assignee: nobody → Fuel QA Team (fuel-qa)
Changed in fuel:
importance: Undecided → Medium
Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Dmitry Belyaninov (dbelyaninov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-devops (release/2.9)

Fix proposed to branch: release/2.9
Review: https://review.openstack.org/424083

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-devops (release/2.9)

Reviewed: https://review.openstack.org/424083
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=ac02b5719c93b76c4b03aa9dbce9fb8857e0ff31
Submitter: Jenkins
Branch: release/2.9

commit ac02b5719c93b76c4b03aa9dbce9fb8857e0ff31
Author: Dmitry Belyaninov <email address hidden>
Date: Mon Jan 23 12:15:36 2017 +0000

    Modification of slave adding procedure

    We should not define new slave index by incrementing
    of current slaves list lenght. We should check all list
    and find missing(deleted) slave indexes or increment maximum.
    Also notification message printing added in case of removing
    non-existent slave node.

    Change-Id: Ie7dcb9a96c2369eafc611b1c2131edc4666e5603
    Closes-Bug: 1641945

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

Reviewed: https://review.openstack.org/425233
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=e71e8924d11c76ef6fb3efc74f95b9fc9d239b44
Submitter: Jenkins
Branch: master

commit e71e8924d11c76ef6fb3efc74f95b9fc9d239b44
Author: Dmitry Belyaninov <email address hidden>
Date: Wed Jan 25 15:18:01 2017 +0000

    Modification of slave adding procedure

    We should not define new slave index by incrementing
    of current slaves list lenght. We should check all list
    and find missing(deleted) slave indexes or increment maximum.

    Change-Id: I878879da99e05a78f0203b244c4ea30374cb3ef2
    Closes-Bug: 1641945

tags: added: on-verification
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Verified on 9.2 snapshot #829

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
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.