Merge lp:~ddellav/charms/trusty/keystone/ssl-spec-fix into lp:~openstack-charmers-archive/charms/trusty/keystone/next

Proposed by David Della Vecchia
Status: Merged
Merged at revision: 190
Proposed branch: lp:~ddellav/charms/trusty/keystone/ssl-spec-fix
Merge into: lp:~openstack-charmers-archive/charms/trusty/keystone/next
Diff against target: 52 lines (+9/-2)
2 files modified
hooks/keystone_hooks.py (+3/-0)
unit_tests/test_keystone_hooks.py (+6/-2)
To merge this branch: bzr merge lp:~ddellav/charms/trusty/keystone/ssl-spec-fix
Reviewer Review Type Date Requested Status
David Ames (community) Approve
Corey Bryant Pending
Review via email: mp+274952@code.launchpad.net

Description of the change

Fixing SSL deploy issue with missing system user.

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

charm_lint_check #12170 keystone-next for ddellav mp274952
    LINT OK: passed

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

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

charm_unit_test #11296 keystone-next for ddellav mp274952
    UNIT OK: passed

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

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

charm_amulet_test #7438 keystone-next for ddellav mp274952
    AMULET OK: passed

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

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

Take note, the amulet test doesn't exercise SSL features.

Revision history for this message
David Ames (thedac) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/keystone_hooks.py'
2--- hooks/keystone_hooks.py 2015-10-08 22:29:33 +0000
3+++ hooks/keystone_hooks.py 2015-10-19 21:31:21 +0000
4@@ -128,6 +128,9 @@
5 status_set('maintenance', 'Git install')
6 git_install(config('openstack-origin-git'))
7
8+ unison.ensure_user(user=SSH_USER, group='juju_keystone')
9+ unison.ensure_user(user=SSH_USER, group='keystone')
10+
11
12 @hooks.hook('config-changed')
13 @restart_on_change(restart_map())
14
15=== modified file 'unit_tests/test_keystone_hooks.py'
16--- unit_tests/test_keystone_hooks.py 2015-10-07 16:20:36 +0000
17+++ unit_tests/test_keystone_hooks.py 2015-10-19 21:31:21 +0000
18@@ -83,13 +83,15 @@
19 self.ssh_user = 'juju_keystone'
20
21 @patch.object(utils, 'git_install_requested')
22- def test_install_hook(self, git_requested):
23+ @patch.object(unison, 'ensure_user')
24+ def test_install_hook(self, ensure_user, git_requested):
25 git_requested.return_value = False
26 repo = 'cloud:precise-grizzly'
27 self.test_config.set('openstack-origin', repo)
28 hooks.install()
29 self.assertTrue(self.execd_preinstall.called)
30 self.configure_installation_source.assert_called_with(repo)
31+ ensure_user.assert_called_with(user=self.ssh_user, group='keystone')
32 self.assertTrue(self.apt_update.called)
33 self.apt_install.assert_called_with(
34 ['apache2', 'haproxy', 'keystone', 'openssl', 'pwgen',
35@@ -98,7 +100,8 @@
36 self.git_install.assert_called_with(None)
37
38 @patch.object(utils, 'git_install_requested')
39- def test_install_hook_git(self, git_requested):
40+ @patch.object(unison, 'ensure_user')
41+ def test_install_hook_git(self, ensure_user, git_requested):
42 git_requested.return_value = True
43 repo = 'cloud:trusty-juno'
44 openstack_origin_git = {
45@@ -118,6 +121,7 @@
46 hooks.install()
47 self.assertTrue(self.execd_preinstall.called)
48 self.configure_installation_source.assert_called_with(repo)
49+ ensure_user.assert_called_with(user=self.ssh_user, group='keystone')
50 self.assertTrue(self.apt_update.called)
51 self.apt_install.assert_called_with(
52 ['apache2', 'haproxy', 'libffi-dev', 'libmysqlclient-dev',

Subscribers

People subscribed via source and target branches