From f3643788cf473001e0b18f4bb888b50f8fb9a70b Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 17 Apr 2015 12:10:54 +0000 Subject: [PATCH] Change default mkdir permissions to 755 for deploy from source --- hooks/keystone_utils.py | 2 +- unit_tests/test_keystone_hooks.py | 7 ++++--- unit_tests/test_keystone_utils.py | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hooks/keystone_utils.py b/hooks/keystone_utils.py index cd1edcd6..c6bd3835 100644 --- a/hooks/keystone_utils.py +++ b/hooks/keystone_utils.py @@ -1688,7 +1688,7 @@ def git_pre_install(): add_user_to_group('keystone', 'keystone') for d in dirs: - mkdir(d, owner='keystone', group='keystone', perms=0700, force=False) + mkdir(d, owner='keystone', group='keystone', perms=0755, force=False) for l in logs: write_file(l, '', owner='keystone', group='keystone', perms=0600) diff --git a/unit_tests/test_keystone_hooks.py b/unit_tests/test_keystone_hooks.py index fbe9781d..50f0adcd 100644 --- a/unit_tests/test_keystone_hooks.py +++ b/unit_tests/test_keystone_hooks.py @@ -118,9 +118,10 @@ class KeystoneRelationTests(CharmTestCase): self.assertTrue(self.apt_update.called) self.apt_install.assert_called_with( ['haproxy', 'unison', 'python-setuptools', 'python-six', 'uuid', - 'python-mysqldb', 'python-pip', 'openssl', 'apache2', 'pwgen', - 'libxslt1-dev', 'python-psycopg2', 'zlib1g-dev', 'python-dev', - 'libxml2-dev'], fatal=True) + 'python-mysqldb', 'python-pip', 'libssl-dev', 'openssl', + 'libffi-dev', 'apache2', 'pwgen', 'libxslt1-dev', + 'python-psycopg2', 'zlib1g-dev', 'python-dev', 'libxml2-dev'], + fatal=True) self.git_install.assert_called_with(projects_yaml) mod_ch_openstack_utils = 'charmhelpers.contrib.openstack.utils' diff --git a/unit_tests/test_keystone_utils.py b/unit_tests/test_keystone_utils.py index b2a5b470..d32e2ab4 100644 --- a/unit_tests/test_keystone_utils.py +++ b/unit_tests/test_keystone_utils.py @@ -642,11 +642,11 @@ class TestKeystoneUtils(CharmTestCase): add_user_to_group.assert_called_with('keystone', 'keystone') expected = [ call('/var/lib/keystone', owner='keystone', - group='keystone', perms=0700, force=False), + group='keystone', perms=0755, force=False), call('/var/lib/keystone/cache', owner='keystone', - group='keystone', perms=0700, force=False), + group='keystone', perms=0755, force=False), call('/var/log/keystone', owner='keystone', - group='keystone', perms=0700, force=False), + group='keystone', perms=0755, force=False), ] self.assertEquals(mkdir.call_args_list, expected) write_file.assert_called_with('/var/log/keystone/keystone.log',