[matsubara] Fixup selinux permissions.
This commit is contained in:
commit
82d6f33d89
|
@ -56,10 +56,15 @@ def fix_path_ownership(path, user='nova'):
|
|||
sudo('chown {} {}'.format(user, path))
|
||||
|
||||
|
||||
def fix_selinux_permission(path):
|
||||
sudo('chcon -vv --user=system_u --role=object_r --type=etc_t --range=s0 '
|
||||
'{}'.format(path))
|
||||
|
||||
|
||||
def fix_ml2_plugin_config():
|
||||
sudo('sed -i "s!openvswitch/ovs_neutron_plugin.ini'
|
||||
'!ml2/ml2_conf.ini!g" /etc/init.d/neutron-openvswitch-agent')
|
||||
|
||||
|
||||
def fix_local_ip(f):
|
||||
sudo('sed -i "s!LOCAL_IP!%s!g" %s' % (env.host, f))
|
||||
sudo('sed -i "s!LOCAL_IP!%s!g" %s' % (env.host, f))
|
||||
|
|
|
@ -22,6 +22,7 @@ from fabfile import (
|
|||
enable_shell,
|
||||
disable_shell,
|
||||
fix_path_ownership,
|
||||
fix_selinux_permission,
|
||||
fix_ml2_plugin_config,
|
||||
fix_local_ip
|
||||
)
|
||||
|
@ -129,10 +130,14 @@ class POWERProxy():
|
|||
def fix_path_ownership(self, user, path):
|
||||
execute(fix_path_ownership, user, path)
|
||||
|
||||
def fix_selinux_permission(self, path):
|
||||
execute(fix_selinux_permission, path)
|
||||
|
||||
def commit(self):
|
||||
for f in CONFIG_FILES:
|
||||
if os.path.exists("%s%s" % (CHARM_SCRATCH_DIR, f)):
|
||||
self.copy_file(f)
|
||||
self.fix_selinux_permission(f)
|
||||
self._fixup_local_ips()
|
||||
|
||||
def _fixup_local_ips(self):
|
||||
|
|
|
@ -13,7 +13,7 @@ dhcpbridge = /usr/bin/nova-dhcpbridge
|
|||
|
||||
# General system paths
|
||||
state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
lock_path=/var/lib/nova/tmp
|
||||
|
||||
# Logging options
|
||||
logdir = /var/log/nova
|
||||
|
|
Loading…
Reference in New Issue