ERROR: Bad source address when private-address returns name instead of ip

Bug #1747516 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Swift Storage Charm
Fix Released
Medium
Felipe Reyes

Bug Description

swift-storage charm reads the ingress_address()[0] which will read from the relation what it's in ingress-address or private-address, the problem with juju 1.25 and maas 1.9 is that private-address in some cases may return a host name instead of an IP (see bug 1557769)

[0] https://github.com/juju/charm-helpers/blob/master/charmhelpers/core/hookenv.py#L1205

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-swift-storage (master)

Reviewed: https://review.openstack.org/541021
Committed: https://git.openstack.org/cgit/openstack/charm-swift-storage/commit/?id=4896ac5b5b98f66cfe79c3945680ac0ac5dbb2bf
Submitter: Zuul
Branch: master

commit 4896ac5b5b98f66cfe79c3945680ac0ac5dbb2bf
Author: Felipe Reyes <email address hidden>
Date: Mon Feb 5 18:32:52 2018 -0300

    Resolve hostnames if needed to allow access in ufw

    In some cases juju 1.25 (with maas 1.9) may return a hostname in the
    private-address field breaking the assumption that private-address will
    always be an IP address. This patch uses socket.getaddrinfo() to assure
    an IP address is given to ufw.

    Change-Id: I99b0110beed6075164eb549ec2433071af699c04
    Closes-Bug: 1747516

Changed in charm-swift-storage:
status: New → Fix Committed
Frode Nordahl (fnordahl)
Changed in charm-swift-storage:
importance: Undecided → Medium
assignee: nobody → Felipe Reyes (freyes)
milestone: none → 18.02
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-swift-storage (stable/17.11)

Fix proposed to branch: stable/17.11
Review: https://review.openstack.org/542381

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-swift-storage (stable/17.11)

Change abandoned by Felipe Reyes (<email address hidden>) on branch: stable/17.11
Review: https://review.openstack.org/542381

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

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

Ryan Beisner (1chb1n)
Changed in charm-swift-storage:
status: Fix Committed → Fix Released
Frode Nordahl (fnordahl)
tags: added: stable-backport
Changed in charm-swift-storage:
status: Fix Released → In Progress
Ryan Beisner (1chb1n)
Changed in charm-swift-storage:
milestone: 18.02 → 18.05
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-swift-storage (master)

Reviewed: https://review.openstack.org/549843
Committed: https://git.openstack.org/cgit/openstack/charm-swift-storage/commit/?id=1d28ceb64835f2206f216de3ef98febda01e8d58
Submitter: Zuul
Branch: master

commit 1d28ceb64835f2206f216de3ef98febda01e8d58
Author: Felipe Reyes <email address hidden>
Date: Mon Mar 5 15:37:52 2018 -0300

    Resolve hostnames if needed to allow access in ufw

    In some cases juju 1.25 (with maas 1.9) may return a hostname in the
    private-address field breaking the assumption that private-address will
    always be an IP address. This patch uses get_host_ip() to assure an IP
    address is given to ufw.

    Change-Id: Ib99852c645517cf316adcd02d04428b248fc9724
    Closes-Bug: 1747516

Changed in charm-swift-storage:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-swift-storage (stable/18.02)

Fix proposed to branch: stable/18.02
Review: https://review.openstack.org/554193

Frode Nordahl (fnordahl)
Changed in charm-swift-storage:
milestone: 18.05 → 18.02
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-swift-storage (stable/18.02)

Reviewed: https://review.openstack.org/554193
Committed: https://git.openstack.org/cgit/openstack/charm-swift-storage/commit/?id=edb18168a100112b3cfe05c30a258f24d69474b1
Submitter: Zuul
Branch: stable/18.02

commit edb18168a100112b3cfe05c30a258f24d69474b1
Author: Felipe Reyes <email address hidden>
Date: Mon Mar 5 15:37:52 2018 -0300

    Resolve hostnames if needed to allow access in ufw

    In some cases juju 1.25 (with maas 1.9) may return a hostname in the
    private-address field breaking the assumption that private-address will
    always be an IP address. This patch uses get_host_ip() to assure an IP
    address is given to ufw.

    Change-Id: Ib99852c645517cf316adcd02d04428b248fc9724
    Closes-Bug: 1747516
    (cherry picked from commit 1d28ceb64835f2206f216de3ef98febda01e8d58)

Frode Nordahl (fnordahl)
Changed in charm-swift-storage:
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.