ring_*_device: Broken idempotency with canonical IPv6 address

Bug #1997313 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-swift
Fix Released
High
Takashi Kajinami

Bug Description

The ring_*_device resource consistently fails at 2nd run if the name contains a canonical IPv6 address instead of a shortened one.

Example:
https://zuul.opendev.org/t/openstack/build/828692dd98e7452ea073492cb5a04a16

```
Error: Execution of '/bin/swift-ring-builder /etc/swift/object.builder add r1z2-[0000:0000:0000:0000:0000:0000:0000:0001]:6020/2_ 1.00' returned 2: Device 0 already uses ::1:6020/2.
The on-disk ring builder is unchanged.
```

It seems the swift-ring-builder command internally converts the canonical IPv6 address to the shortened one and that is causing unexpected change detected.

```
/etc/swift/object.builder, build version 3, id 65aadb1c8c0a4b2eb3adc6f445878af2
262144 partitions, 1.000000 replicas, 1 regions, 1 zones, 2 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1 (0:50:11 remaining)
The overload factor is 0.00% (0.000000)
Ring file /etc/swift/object.ring.gz is obsolete
Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta
            1 1 2 127.0.0.1:6020 127.0.0.1:6020 2 1.00 0 -100.00
            0 1 2 [::1]:6020 [::1]:6020 2 1.00 262144 100.00

```

Changed in puppet-swift:
importance: Undecided → High
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in puppet-swift:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (master)

Reviewed: https://review.opendev.org/c/openstack/puppet-swift/+/865094
Committed: https://opendev.org/openstack/puppet-swift/commit/249f466f94441ae554478467949378d81b034f89
Submitter: "Zuul (22348)"
Branch: master

commit 249f466f94441ae554478467949378d81b034f89
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 21 13:55:47 2022 +0900

    Ensure consistent IPv6 address format

    This change ensures the shortened address representations are always
    used for ring devices to avoid broken idempotency caused by different
    representations (shortened[1] vs canonical[2]).

    [1] ::1
    [2] 0000:0000:0000:0000:0000:0000:0000:0001

    Closes-Bug: #1997313
    Change-Id: I762f0780ba25536aa616482a49d59c7db69924d6

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/puppet-swift/+/865569

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/puppet-swift/+/865569
Committed: https://opendev.org/openstack/puppet-swift/commit/4b37f4c4df42c3069b502ee9f539fdb5d0d4c897
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 4b37f4c4df42c3069b502ee9f539fdb5d0d4c897
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 21 13:55:47 2022 +0900

    Ensure consistent IPv6 address format

    This change ensures the shortened address representations are always
    used for ring devices to avoid broken idempotency caused by different
    representations (shortened[1] vs canonical[2]).

    [1] ::1
    [2] 0000:0000:0000:0000:0000:0000:0000:0001

    Closes-Bug: #1997313
    Change-Id: I762f0780ba25536aa616482a49d59c7db69924d6
    (cherry picked from commit 249f466f94441ae554478467949378d81b034f89)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/puppet-swift/+/866000

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/puppet-swift/+/866001

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/puppet-swift/+/866002

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/puppet-swift/+/866000
Committed: https://opendev.org/openstack/puppet-swift/commit/e4a28d280671ef2452b6a0857a505f0c8891fbc3
Submitter: "Zuul (22348)"
Branch: stable/xena

commit e4a28d280671ef2452b6a0857a505f0c8891fbc3
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 21 13:55:47 2022 +0900

    Ensure consistent IPv6 address format

    This change ensures the shortened address representations are always
    used for ring devices to avoid broken idempotency caused by different
    representations (shortened[1] vs canonical[2]).

    [1] ::1
    [2] 0000:0000:0000:0000:0000:0000:0000:0001

    Closes-Bug: #1997313
    Change-Id: I762f0780ba25536aa616482a49d59c7db69924d6
    (cherry picked from commit 249f466f94441ae554478467949378d81b034f89)
    (cherry picked from commit 4b37f4c4df42c3069b502ee9f539fdb5d0d4c897)
    (cherry picked from commit 81f930723b694260558f396b077a6fec4f9223f1)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/puppet-swift/+/866001
Committed: https://opendev.org/openstack/puppet-swift/commit/81f930723b694260558f396b077a6fec4f9223f1
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 81f930723b694260558f396b077a6fec4f9223f1
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 21 13:55:47 2022 +0900

    Ensure consistent IPv6 address format

    This change ensures the shortened address representations are always
    used for ring devices to avoid broken idempotency caused by different
    representations (shortened[1] vs canonical[2]).

    [1] ::1
    [2] 0000:0000:0000:0000:0000:0000:0000:0001

    Closes-Bug: #1997313
    Change-Id: I762f0780ba25536aa616482a49d59c7db69924d6
    (cherry picked from commit 249f466f94441ae554478467949378d81b034f89)
    (cherry picked from commit 4b37f4c4df42c3069b502ee9f539fdb5d0d4c897)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/puppet-swift/+/866002
Committed: https://opendev.org/openstack/puppet-swift/commit/ee05a902463d3ee9b0dd9c7547da4bae7a11061e
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit ee05a902463d3ee9b0dd9c7547da4bae7a11061e
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 21 13:55:47 2022 +0900

    Ensure consistent IPv6 address format

    This change ensures the shortened address representations are always
    used for ring devices to avoid broken idempotency caused by different
    representations (shortened[1] vs canonical[2]).

    [1] ::1
    [2] 0000:0000:0000:0000:0000:0000:0000:0001

    Closes-Bug: #1997313
    Change-Id: I762f0780ba25536aa616482a49d59c7db69924d6
    (cherry picked from commit 249f466f94441ae554478467949378d81b034f89)
    (cherry picked from commit 4b37f4c4df42c3069b502ee9f539fdb5d0d4c897)
    (cherry picked from commit 81f930723b694260558f396b077a6fec4f9223f1)
    (cherry picked from commit e4a28d280671ef2452b6a0857a505f0c8891fbc3)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 22.0.0

This issue was fixed in the openstack/puppet-swift 22.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 19.5.0

This issue was fixed in the openstack/puppet-swift 19.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 20.4.1

This issue was fixed in the openstack/puppet-swift 20.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift wallaby-eom

This issue was fixed in the openstack/puppet-swift wallaby-eom 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.