[billy-olsen,r=] Include an acl file for corosync containing the hacluster

user and haclient group.

Closes-Bug: 1439649
This commit is contained in:
billy.olsen@canonical.com 2015-09-03 17:30:23 -07:00
parent a092a356ba
commit 0c6e668598
2 changed files with 10 additions and 1 deletions

View File

@ -64,10 +64,12 @@ TEMPLATES_DIR = 'templates'
COROSYNC_CONF = '/etc/corosync/corosync.conf' COROSYNC_CONF = '/etc/corosync/corosync.conf'
COROSYNC_DEFAULT = '/etc/default/corosync' COROSYNC_DEFAULT = '/etc/default/corosync'
COROSYNC_AUTHKEY = '/etc/corosync/authkey' COROSYNC_AUTHKEY = '/etc/corosync/authkey'
COROSYNC_HACLUSTER_ACL = '/etc/corosync/uidgid.d/hacluster'
COROSYNC_CONF_FILES = [ COROSYNC_CONF_FILES = [
COROSYNC_DEFAULT, COROSYNC_DEFAULT,
COROSYNC_AUTHKEY, COROSYNC_AUTHKEY,
COROSYNC_CONF COROSYNC_CONF,
COROSYNC_HACLUSTER_ACL,
] ]
SUPPORTED_TRANSPORTS = ['udp', 'udpu', 'multicast', 'unicast'] SUPPORTED_TRANSPORTS = ['udp', 'udpu', 'multicast', 'unicast']
@ -250,6 +252,9 @@ def emit_base_conf():
content=render_template('corosync', content=render_template('corosync',
corosync_default_context)) corosync_default_context))
write_file(path=COROSYNC_HACLUSTER_ACL,
content=render_template('hacluster.acl', {}))
corosync_key = config('corosync_key') corosync_key = config('corosync_key')
if corosync_key: if corosync_key:
write_file(path=COROSYNC_AUTHKEY, write_file(path=COROSYNC_AUTHKEY,

4
templates/hacluster.acl Normal file
View File

@ -0,0 +1,4 @@
uidgid {
uid: hacluster
gid: haclient
}