Merge lp:~corey.bryant/charms/trusty/swift-storage/git-1531612 into lp:~openstack-charmers-archive/charms/trusty/swift-storage/next

Proposed by Corey Bryant
Status: Merged
Merged at revision: 99
Proposed branch: lp:~corey.bryant/charms/trusty/swift-storage/git-1531612
Merge into: lp:~openstack-charmers-archive/charms/trusty/swift-storage/next
Diff against target: 128 lines (+21/-16)
4 files modified
charmhelpers/contrib/openstack/context.py (+12/-2)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+3/-2)
charmhelpers/contrib/openstack/utils.py (+6/-9)
charmhelpers/fetch/giturl.py (+0/-3)
To merge this branch: bzr merge lp:~corey.bryant/charms/trusty/swift-storage/git-1531612
Reviewer Review Type Date Requested Status
Liam Young Approve
Review via email: mp+281964@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #15692 swift-storage-next for corey.bryant mp281964
    UNIT OK: passed

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

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

charm_lint_check #16807 swift-storage-next for corey.bryant mp281964
    LINT OK: passed

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

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

charm_amulet_test #8582 swift-storage-next for corey.bryant mp281964
    AMULET OK: passed

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

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/openstack/context.py'
--- charmhelpers/contrib/openstack/context.py 2016-01-04 21:31:57 +0000
+++ charmhelpers/contrib/openstack/context.py 2016-01-08 03:14:27 +0000
@@ -57,6 +57,7 @@
57 get_nic_hwaddr,57 get_nic_hwaddr,
58 mkdir,58 mkdir,
59 write_file,59 write_file,
60 pwgen,
60)61)
61from charmhelpers.contrib.hahelpers.cluster import (62from charmhelpers.contrib.hahelpers.cluster import (
62 determine_apache_port,63 determine_apache_port,
@@ -87,6 +88,8 @@
87 is_bridge_member,88 is_bridge_member,
88)89)
89from charmhelpers.contrib.openstack.utils import get_host_ip90from charmhelpers.contrib.openstack.utils import get_host_ip
91from charmhelpers.core.unitdata import kv
92
90CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'93CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'
91ADDRESS_TYPES = ['admin', 'internal', 'public']94ADDRESS_TYPES = ['admin', 'internal', 'public']
9295
@@ -636,11 +639,18 @@
636 ctxt['ipv6'] = True639 ctxt['ipv6'] = True
637 ctxt['local_host'] = 'ip6-localhost'640 ctxt['local_host'] = 'ip6-localhost'
638 ctxt['haproxy_host'] = '::'641 ctxt['haproxy_host'] = '::'
639 ctxt['stat_port'] = ':::8888'
640 else:642 else:
641 ctxt['local_host'] = '127.0.0.1'643 ctxt['local_host'] = '127.0.0.1'
642 ctxt['haproxy_host'] = '0.0.0.0'644 ctxt['haproxy_host'] = '0.0.0.0'
643 ctxt['stat_port'] = ':8888'645
646 ctxt['stat_port'] = '8888'
647
648 db = kv()
649 ctxt['stat_password'] = db.get('stat-password')
650 if not ctxt['stat_password']:
651 ctxt['stat_password'] = db.set('stat-password',
652 pwgen(32))
653 db.flush()
644654
645 for frontend in cluster_hosts:655 for frontend in cluster_hosts:
646 if (len(cluster_hosts[frontend]['backends']) > 1 or656 if (len(cluster_hosts[frontend]['backends']) > 1 or
647657
=== modified file 'charmhelpers/contrib/openstack/templates/haproxy.cfg'
--- charmhelpers/contrib/openstack/templates/haproxy.cfg 2016-01-04 21:31:57 +0000
+++ charmhelpers/contrib/openstack/templates/haproxy.cfg 2016-01-08 03:14:27 +0000
@@ -33,13 +33,14 @@
33 timeout server 3000033 timeout server 30000
34{%- endif %}34{%- endif %}
3535
36listen stats {{ stat_port }}36listen stats
37 bind {{ local_host }}:{{ stat_port }}
37 mode http38 mode http
38 stats enable39 stats enable
39 stats hide-version40 stats hide-version
40 stats realm Haproxy\ Statistics41 stats realm Haproxy\ Statistics
41 stats uri /42 stats uri /
42 stats auth admin:password43 stats auth admin:{{ stat_password }}
4344
44{% if frontends -%}45{% if frontends -%}
45{% for service, ports in service_ports.items() -%}46{% for service, ports in service_ports.items() -%}
4647
=== modified file 'charmhelpers/contrib/openstack/utils.py'
--- charmhelpers/contrib/openstack/utils.py 2016-01-05 11:50:47 +0000
+++ charmhelpers/contrib/openstack/utils.py 2016-01-08 03:14:27 +0000
@@ -593,7 +593,7 @@
593 return yaml.load(projects_yaml)593 return yaml.load(projects_yaml)
594594
595595
596def git_clone_and_install(projects_yaml, core_project, depth=1):596def git_clone_and_install(projects_yaml, core_project):
597 """597 """
598 Clone/install all specified OpenStack repositories.598 Clone/install all specified OpenStack repositories.
599599
@@ -643,6 +643,9 @@
643 for p in projects['repositories']:643 for p in projects['repositories']:
644 repo = p['repository']644 repo = p['repository']
645 branch = p['branch']645 branch = p['branch']
646 depth = '1'
647 if 'depth' in p.keys():
648 depth = p['depth']
646 if p['name'] == 'requirements':649 if p['name'] == 'requirements':
647 repo_dir = _git_clone_and_install_single(repo, branch, depth,650 repo_dir = _git_clone_and_install_single(repo, branch, depth,
648 parent_dir, http_proxy,651 parent_dir, http_proxy,
@@ -687,19 +690,13 @@
687 """690 """
688 Clone and install a single git repository.691 Clone and install a single git repository.
689 """692 """
690 dest_dir = os.path.join(parent_dir, os.path.basename(repo))
691
692 if not os.path.exists(parent_dir):693 if not os.path.exists(parent_dir):
693 juju_log('Directory already exists at {}. '694 juju_log('Directory already exists at {}. '
694 'No need to create directory.'.format(parent_dir))695 'No need to create directory.'.format(parent_dir))
695 os.mkdir(parent_dir)696 os.mkdir(parent_dir)
696697
697 if not os.path.exists(dest_dir):698 juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch))
698 juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch))699 repo_dir = install_remote(repo, dest=parent_dir, branch=branch, depth=depth)
699 repo_dir = install_remote(repo, dest=parent_dir, branch=branch,
700 depth=depth)
701 else:
702 repo_dir = dest_dir
703700
704 venv = os.path.join(parent_dir, 'venv')701 venv = os.path.join(parent_dir, 'venv')
705702
706703
=== modified file 'charmhelpers/fetch/giturl.py'
--- charmhelpers/fetch/giturl.py 2016-01-04 21:31:57 +0000
+++ charmhelpers/fetch/giturl.py 2016-01-08 03:14:27 +0000
@@ -22,7 +22,6 @@
22 filter_installed_packages,22 filter_installed_packages,
23 apt_install,23 apt_install,
24)24)
25from charmhelpers.core.host import mkdir
2625
27if filter_installed_packages(['git']) != []:26if filter_installed_packages(['git']) != []:
28 apt_install(['git'])27 apt_install(['git'])
@@ -62,8 +61,6 @@
62 else:61 else:
63 dest_dir = os.path.join(os.environ.get('CHARM_DIR'), "fetched",62 dest_dir = os.path.join(os.environ.get('CHARM_DIR'), "fetched",
64 branch_name)63 branch_name)
65 if not os.path.exists(dest_dir):
66 mkdir(dest_dir, perms=0o755)
67 try:64 try:
68 self.clone(source, dest_dir, branch, depth)65 self.clone(source, dest_dir, branch, depth)
69 except OSError as e:66 except OSError as e:

Subscribers

People subscribed via source and target branches