Stack delete does not delete Swift ring container

Bug #1671783 reported by Christian Schwede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Christian Schwede

Bug Description

The container to store Swift rings is not deleted when the stack is deleted. This results in re-deploying old rings when deploying a new stack, which is misleading especially when testing.

The rings itself will get fixed over time by puppet, but nevertheless old rings should be deleted when the stack itself gets deleted.

Changed in tripleo:
assignee: nobody → Christian Schwede (cschwede)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Changed in tripleo:
importance: Undecided → Medium
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/444219
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=f82064e95a60b63c0c6a1df92a70f33158bc1a18
Submitter: Jenkins
Branch: master

commit f82064e95a60b63c0c6a1df92a70f33158bc1a18
Author: Christian Schwede <email address hidden>
Date: Fri Mar 10 12:08:14 2017 +0100

    Fix using old Swift rings when creating a new stack

    The container to store Swift rings is not deleted when the stack is
    deleted. This results in re-deploying old rings when deploying a new
    stack.

    This patch creates a copy of the old rings with a timestamp suffix and
    removes the original object. Doing this will create new rings when
    creating a new stack.

    Closes-Bug: 1671783
    Change-Id: Ie6363987ada9b516064c1ed3b215f809c3924393

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/451937

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/ocata)

Reviewed: https://review.openstack.org/451937
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=b39b1b1f9794331c14031efa16475e36c5f8e21e
Submitter: Jenkins
Branch: stable/ocata

commit b39b1b1f9794331c14031efa16475e36c5f8e21e
Author: Christian Schwede <email address hidden>
Date: Fri Mar 10 12:08:14 2017 +0100

    Fix using old Swift rings when creating a new stack

    The container to store Swift rings is not deleted when the stack is
    deleted. This results in re-deploying old rings when deploying a new
    stack.

    This patch creates a copy of the old rings with a timestamp suffix and
    removes the original object. Doing this will create new rings when
    creating a new stack.

    Closes-Bug: 1671783
    Change-Id: Ie6363987ada9b516064c1ed3b215f809c3924393
    (cherry picked from commit f82064e95a60b63c0c6a1df92a70f33158bc1a18)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 7.0.0.0b1

This issue was fixed in the openstack/tripleo-common 7.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 6.1.0

This issue was fixed in the openstack/tripleo-common 6.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/504886

Revision history for this message
bastafidli (ubuntu-bastafidli) wrote :
Download full text (7.6 KiB)

This bug is particularly nasty as it leads to several delayed effects/failures which are hard to troubleshoot.

If user just deletes the stack and then redeploys and if the user doesn't use deterministic IP mapping this leads to tripleo generating new IP addresses for controller / swift nodes and then updating / appending the existing ring with the new IP addresses.

E.g. if the initial correctly built single controller deployment had ring configuration

[root@overcloud-controller-0 swift]# swift-ring-builder account.builder
account.builder, build version 2
1024 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1 (0:00:00 remaining)
The overload factor is 0.00% (0.000000)
Ring file account.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta
            0 1 1 172.24.1.15:6002 172.24.1.15:6002 d1 100.00 1024 0.00

after several redeployment the same single controller will have the following ring configuratoin

[root@overcloud-controller-0 swift]# swift-ring-builder account.builder
account.builder, build version 12
1024 partitions, 1.000000 replicas, 1 regions, 1 zones, 6 devices, 0.39 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1 (0:00:00 remaining)
The overload factor is 0.00% (0.000000)
Ring file account.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta
            0 1 1 172.24.1.16:6002 172.24.1.16:6002 d1 100.00 171 0.20
            1 1 1 172.24.1.20:6002 172.24.1.20:6002 d1 100.00 170 -0.39
            2 1 1 172.24.1.11:6002 172.24.1.11:6002 d1 100.00 171 0.20
            3 1 1 172.24.1.17:6002 172.24.1.17:6002 d1 100.00 170 -0.39
            4 1 1 172.24.1.15:6002 172.24.1.15:6002 d1 100.00 171 0.20
            5 1 1 172.24.1.14:6002 172.24.1.14:6002 d1 100.00 171 0.20

5 out of the 6 IPs are no longer valid as they are not running Swift service which will then cause several different types of failure, e.g.

1. in glance when uploading image

2017-10-07 23:08:47.660 142469 INFO swiftclient [req-8e9b3ee5-c6cd-451a-9ffe-9ae8ca1def90 eb53ce62d2c844cbb1cca3322d1ba8d0 f05f5cfe55a24c73a7d76900b283d82d - default default] REQ: curl -i http://172.23.1.17:8080/v1/AUTH_95c22f6d51fc41a29880ca920db012ba/glance/e90061ac-58a0-4224-b62a-354fc18c5d89 -X PUT -H "Content-Length: 0" -H "ETag: d41d8cd98f00b204e9800998ecf8427e" -H "Content-Type: " -H "X-Object-Manifest: glance/e90061ac-58a0-4224-b62a-354fc18c5d89-" -H "X-Auth-Token: 182892dfcec24166..."
2017-10-07 23:08:47.661 142469 INFO swiftclient [req-8e9b3ee5-c6cd-451a-9ffe-9ae8ca1def90 eb53ce62d2c844cbb1cca3322d1ba8d0 f05f5cfe55a24c73a7d76900b283d82d - default default] RESP STATUS: 503 Service Unavailable

2. in openstack-swift-proxy.service

Oct 07 23:17:00 overcloud-controller-0 proxy-server[86865]: ERROR with Account server 172.24...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/newton)

Reviewed: https://review.openstack.org/504886
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=02118fddf3f66c280c15b2549f07330f3a957d31
Submitter: Zuul
Branch: stable/newton

commit 02118fddf3f66c280c15b2549f07330f3a957d31
Author: Christian Schwede <email address hidden>
Date: Fri Mar 10 12:08:14 2017 +0100

    Fix using old Swift rings when creating a new stack

    The container to store Swift rings is not deleted when the stack is
    deleted. This results in re-deploying old rings when deploying a new
    stack.

    This patch creates a copy of the old rings with a timestamp suffix and
    removes the original object. Doing this will create new rings when
    creating a new stack.

    Closes-Bug: 1671783
    Change-Id: Ie6363987ada9b516064c1ed3b215f809c3924393
    (cherry picked from commit f82064e95a60b63c0c6a1df92a70f33158bc1a18)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 5.4.6

This issue was fixed in the openstack/tripleo-common 5.4.6 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.