~hopem/charms/trusty/percona-cluster/trusty-workaround-bug-1366997

« back to all changes in this revision

Viewing changes to hooks/percona_hooks.py

  • Committer: james.page at ubuntu
  • Date: 2014-06-23 09:46:08 UTC
  • mfrom: (30.1.3 percona-cluster)
  • Revision ID: james.page@ubuntu.com-20140623094608-mnvcv9cm19sk77zk
[alexlist,r=james-page] Add execd support

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    is_leader
54
54
)
55
55
from mysql import configure_db
 
56
from charmhelpers.payload.execd import execd_preinstall
56
57
 
57
58
hooks = Hooks()
58
59
 
59
60
 
60
61
@hooks.hook('install')
61
62
def install():
 
63
    execd_preinstall()
62
64
    if config('source') is None and \
63
65
            lsb_release()['DISTRIB_CODENAME'] < 'trusty':
64
66
        setup_percona_repo()
182
184
        #  nova_database=xxx nova_username=xxx nova_hostname=xxx
183
185
        #  quantum_database=xxx quantum_username=xxx quantum_hostname=xxx
184
186
        # create
185
 
        #{
 
187
        # {
186
188
        #   "nova": {
187
189
        #        "username": xxx,
188
190
        #        "database": xxx,
193
195
        #        "database": xxx,
194
196
        #        "hostname": xxx
195
197
        #    }
196
 
        #}
 
198
        # }
197
199
        #
198
200
        databases = {}
199
201
        for k, v in settings.iteritems():