~openstack-charmers/charms/trusty/hacluster/trunk

« back to all changes in this revision

Viewing changes to hooks/utils.py

  • Committer: Liam Young
  • Date: 2016-04-12 14:53:45 UTC
  • mfrom: (64.1.2 stable/16.07.remote)
  • Revision ID: liam.young@canonical.com-20160412145345-78w1gllxjni2zqjk
[gnuoy, r=james-page] Precreate corosync acl dir if needed as xenial package (2.3.5) does not create it unlike earlier releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
COROSYNC_CONF = '/etc/corosync/corosync.conf'
72
72
COROSYNC_DEFAULT = '/etc/default/corosync'
73
73
COROSYNC_AUTHKEY = '/etc/corosync/authkey'
74
 
COROSYNC_HACLUSTER_ACL = '/etc/corosync/uidgid.d/hacluster'
 
74
COROSYNC_HACLUSTER_ACL_DIR = '/etc/corosync/uidgid.d'
 
75
COROSYNC_HACLUSTER_ACL = COROSYNC_HACLUSTER_ACL_DIR + '/hacluster'
75
76
COROSYNC_CONF_FILES = [
76
77
    COROSYNC_DEFAULT,
77
78
    COROSYNC_AUTHKEY,
258
259
 
259
260
 
260
261
def emit_base_conf():
 
262
    if not os.path.isdir(COROSYNC_HACLUSTER_ACL_DIR):
 
263
        os.mkdir(COROSYNC_HACLUSTER_ACL_DIR)
261
264
    corosync_default_context = {'corosync_enabled': 'yes'}
262
265
    write_file(path=COROSYNC_DEFAULT,
263
266
               content=render_template('corosync',