Merge lp:~pjdc/charms/trusty/rabbitmq-server/avoid-unresolvable-nodename-next-rebase into lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next

Proposed by Paul Collins
Status: Rejected
Rejected by: Paul Collins
Proposed branch: lp:~pjdc/charms/trusty/rabbitmq-server/avoid-unresolvable-nodename-next-rebase
Merge into: lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next
Diff against target: 13 lines (+3/-0)
1 file modified
hooks/rabbitmq_server_relations.py (+3/-0)
To merge this branch: bzr merge lp:~pjdc/charms/trusty/rabbitmq-server/avoid-unresolvable-nodename-next-rebase
Reviewer Review Type Date Requested Status
Billy Olsen Needs Information
Review via email: mp+268283@code.launchpad.net

This proposal supersedes a proposal from 2015-08-12.

Description of the change

In one of the Openstack clouds I work with, reverse DNS lookup of a unit's private IP yields a result of the form os-A-B-C-D.instance.openstack.internal. The rabbitmq-server charm snips off the first component and assumes, without checking, that this is a usable nodename. For a number of reasons, that is not the case in this deployment. This MP adds an assertion to check that the result of the reverse lookup resolves in the forward direction. If this fails, we fall back in the same manner as when no PTR record is present, which allows rabbitmq-server to deploy successfully in the cloud I am using.

[Resubmit with r106: "get_local_nodename: spell get_host_ip(nodename) correctly"]

[Resubmit to get the amulet test re-run; the previous failure looks transient.]

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #7920 rabbitmq-server-next for pjdc mp267733
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/7920/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #7338 rabbitmq-server-next for pjdc mp267733
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7338/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #5761 rabbitmq-server-next for pjdc mp267733
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/5761/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #7921 rabbitmq-server-next for pjdc mp267739
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/7921/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #7339 rabbitmq-server-next for pjdc mp267739
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7339/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #5762 rabbitmq-server-next for pjdc mp267739
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12059688/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5762/

Revision history for this message
Tom Haddon (mthaddon) wrote : Posted in a previous version of this proposal

This looks like a transient test failure but I can't be sure. Can someone confirm?

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #8246 rabbitmq-server-next for pjdc mp268283
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/8246/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #7645 rabbitmq-server-next for pjdc mp268283
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7645/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5845 rabbitmq-server-next for pjdc mp268283
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12115685/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5845/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI - The existing amulet tests are known problematic, and are undergoing a rewrite at this time. I have a merge proposal work-in-progress to land fixed tests, hopefully soon.

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #7820 rabbitmq-server-next for pjdc mp268283
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7820/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #8426 rabbitmq-server-next for pjdc mp268283
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/8426/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5933 rabbitmq-server-next for pjdc mp268283
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
Timeout occurred, printing juju status...environment: osci-sv05
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12138264/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5933/

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Thanks for the submission Paul! However, I think this branch is superceded by (now merged) branch https://code.launchpad.net/~niedbalski/charms/trusty/rabbitmq-server/fix-lp-1489053/+merge/269261.

Can you try with the /next branch and see if it is working for you?

review: Needs Information
Revision history for this message
Paul Collins (pjdc) wrote :

I was just about to, but now I see that it and a subsequent merge were reverted in r109.

Unmerged revisions

106. By Paul Collins

get_local_nodename: spell get_host_ip(nodename) correctly

105. By Paul Collins

get_local_nodename: ensure the resulting nodename itself resolves

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/rabbitmq_server_relations.py'
2--- hooks/rabbitmq_server_relations.py 2015-07-16 20:41:49 +0000
3+++ hooks/rabbitmq_server_relations.py 2015-08-18 02:37:07 +0000
4@@ -112,6 +112,9 @@
5 log('getting local nodename for ip address: %s' % ip_addr, level=INFO)
6 try:
7 nodename = get_hostname(ip_addr, fqdn=False)
8+ # Ensure that the resulting nodename resolves;
9+ # if we can't resolve it, neither can rabbitmq.
10+ get_host_ip(nodename)
11 except:
12 log('Cannot resolve hostname for %s using DNS servers' % ip_addr,
13 level='WARNING')

Subscribers

People subscribed via source and target branches