Revision 880478f8 lib/mcpu.py
b/lib/mcpu.py | ||
---|---|---|
115 | 115 |
lu.CheckPrereq() |
116 | 116 |
do_hooks = lu_class.HPATH is not None |
117 | 117 |
if do_hooks: |
118 |
hm = HooksMaster(rpc.call_hooks_runner, self.cfg, lu) |
|
118 |
hm = HooksMaster(rpc.call_hooks_runner, self.cfg, self.sstore, lu)
|
|
119 | 119 |
hm.RunPhase(constants.HOOKS_PHASE_PRE) |
120 | 120 |
result = lu.Exec(feedback_fn) |
121 | 121 |
if do_hooks: |
... | ... | |
148 | 148 |
lu = lu_class(self, op, self.cfg, self.sstore) |
149 | 149 |
lu.CheckPrereq() |
150 | 150 |
#if do_hooks: |
151 |
# hm = HooksMaster(rpc.call_hooks_runner, self.cfg, lu) |
|
151 |
# hm = HooksMaster(rpc.call_hooks_runner, self.cfg, self.sstore, lu)
|
|
152 | 152 |
# hm.RunPhase(constants.HOOKS_PHASE_PRE) |
153 | 153 |
result = lu.Exec(feedback_fn) |
154 | 154 |
#if do_hooks: |
... | ... | |
168 | 168 |
which behaves the same works. |
169 | 169 |
|
170 | 170 |
""" |
171 |
def __init__(self, callfn, cfg, lu): |
|
171 |
def __init__(self, callfn, cfg, sstore, lu):
|
|
172 | 172 |
self.callfn = callfn |
173 | 173 |
self.cfg = cfg |
174 |
self.sstore = sstore |
|
174 | 175 |
self.lu = lu |
175 | 176 |
self.op = lu.op |
176 | 177 |
self.hpath = self.lu.HPATH |
... | ... | |
200 | 201 |
|
201 | 202 |
if self.cfg is not None: |
202 | 203 |
env["GANETI_CLUSTER"] = self.cfg.GetClusterName() |
203 |
env["GANETI_MASTER"] = self.cfg.GetMaster() |
|
204 |
if self.sstore is not None: |
|
205 |
env["GANETI_MASTER"] = self.sstore.GetMasterNode() |
|
204 | 206 |
|
205 | 207 |
for key in env: |
206 | 208 |
if not isinstance(env[key], str): |
Also available in: Unified diff