Merge lp:~hopem/charms/trusty/ceph-osd/lp1523871 into lp:~openstack-charmers-archive/charms/trusty/ceph-osd/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 67
Proposed branch: lp:~hopem/charms/trusty/ceph-osd/lp1523871
Merge into: lp:~openstack-charmers-archive/charms/trusty/ceph-osd/next
Diff against target: 117 lines (+33/-12)
3 files modified
config.yaml (+6/-0)
hooks/ceph_hooks.py (+14/-7)
hooks/utils.py (+13/-5)
To merge this branch: bzr merge lp:~hopem/charms/trusty/ceph-osd/lp1523871
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+284937@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #128 ceph-osd-next for hopem mp284937
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/128/

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

charm_unit_test #130 ceph-osd-next for hopem mp284937
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/130/

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

charm_amulet_test #15 ceph-osd-next for hopem mp284937
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/15/

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

charm_lint_check #149 ceph-osd-next for hopem mp284937
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/149/

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

charm_unit_test #142 ceph-osd-next for hopem mp284937
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/142/

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

charm_amulet_test #89 ceph-osd-next for hopem mp284937
    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/15016055/
Build: http://10.245.162.36:8080/job/charm_amulet_test/89/

62. By Edward Hope-Morley

post-review fixes

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

charm_unit_test #731 ceph-osd-next for hopem mp284937
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/731/

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

charm_lint_check #828 ceph-osd-next for hopem mp284937
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/828/

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

charm_amulet_test #328 ceph-osd-next for hopem mp284937
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/328/

63. By Edward Hope-Morley

remove unused function

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

charm_unit_test #751 ceph-osd-next for hopem mp284937
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/751/

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

charm_lint_check #848 ceph-osd-next for hopem mp284937
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/848/

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

charm_amulet_test #346 ceph-osd-next for hopem mp284937
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/346/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2016-01-13 12:48:57 +0000
3+++ config.yaml 2016-02-18 17:11:23 +0000
4@@ -107,12 +107,18 @@
5 description: |
6 The IP address and netmask of the public (front-side) network (e.g.,
7 192.168.0.0/24)
8+ .
9+ If multiple networks are to be used, a space-delimited list of a.b.c.d/x
10+ can be provided.
11 ceph-cluster-network:
12 type: string
13 default:
14 description: |
15 The IP address and netmask of the cluster (back-side) network (e.g.,
16 192.168.0.0/24)
17+ .
18+ If multiple networks are to be used, a space-delimited list of a.b.c.d/x
19+ can be provided.
20 prefer-ipv6:
21 type: boolean
22 default: False
23
24=== modified file 'hooks/ceph_hooks.py'
25--- hooks/ceph_hooks.py 2016-02-02 14:54:17 +0000
26+++ hooks/ceph_hooks.py 2016-02-18 17:11:23 +0000
27@@ -41,15 +41,16 @@
28 from charmhelpers.core.sysctl import create as create_sysctl
29
30 from utils import (
31+ get_host_ip,
32+ get_networks,
33+ assert_charm_supports_ipv6,
34 render_template,
35- get_host_ip,
36- assert_charm_supports_ipv6
37 )
38
39 from charmhelpers.contrib.openstack.alternatives import install_alternative
40 from charmhelpers.contrib.network.ip import (
41 get_ipv6_addr,
42- format_ipv6_addr
43+ format_ipv6_addr,
44 )
45
46 from charmhelpers.contrib.charmsupport import nrpe
47@@ -76,6 +77,12 @@
48 mon_hosts = get_mon_hosts()
49 log('Monitor hosts are ' + repr(mon_hosts))
50
51+ networks = get_networks('ceph-public-network')
52+ public_network = ', '.join(networks)
53+
54+ networks = get_networks('ceph-cluster-network')
55+ cluster_network = ', '.join(networks)
56+
57 cephcontext = {
58 'auth_supported': get_auth(),
59 'mon_hosts': ' '.join(mon_hosts),
60@@ -83,16 +90,16 @@
61 'old_auth': cmp_pkgrevno('ceph', "0.51") < 0,
62 'osd_journal_size': config('osd-journal-size'),
63 'use_syslog': str(config('use-syslog')).lower(),
64- 'ceph_public_network': config('ceph-public-network'),
65- 'ceph_cluster_network': config('ceph-cluster-network'),
66+ 'ceph_public_network': public_network,
67+ 'ceph_cluster_network': cluster_network,
68 'loglevel': config('loglevel'),
69 }
70
71 if config('prefer-ipv6'):
72 dynamic_ipv6_address = get_ipv6_addr()[0]
73- if not config('ceph-public-network'):
74+ if not public_network:
75 cephcontext['public_addr'] = dynamic_ipv6_address
76- if not config('ceph-cluster-network'):
77+ if not cluster_network:
78 cephcontext['cluster_addr'] = dynamic_ipv6_address
79
80 # Install ceph.conf as an alternative to support
81
82=== modified file 'hooks/utils.py'
83--- hooks/utils.py 2014-10-01 20:11:28 +0000
84+++ hooks/utils.py 2016-02-18 17:11:23 +0000
85@@ -23,8 +23,8 @@
86 lsb_release
87 )
88
89-from charmhelpers.contrib.network import ip
90 from charmhelpers.contrib.network.ip import (
91+ get_address_in_network,
92 get_ipv6_addr
93 )
94
95@@ -87,10 +87,18 @@
96 return answers[0].address
97
98
99-@cached
100-def get_public_addr():
101- return ip.get_address_in_network(config('ceph-public-network'),
102- fallback=get_host_ip())
103+def get_networks(config_opt='ceph-public-network'):
104+ """Get all configured networks from provided config option.
105+
106+ If public network(s) are provided, go through them and return those for
107+ which we have an address configured.
108+ """
109+ networks = config(config_opt)
110+ if networks:
111+ networks = networks.split()
112+ return [n for n in networks if get_address_in_network(n)]
113+
114+ return []
115
116
117 def assert_charm_supports_ipv6():

Subscribers

People subscribed via source and target branches