Revision a744b676 daemons/ganeti-watcher
b/daemons/ganeti-watcher | ||
---|---|---|
49 | 49 |
from ganeti import hypervisor |
50 | 50 |
from ganeti import rapi |
51 | 51 |
from ganeti.confd import client as confd_client |
52 |
from ganeti import netutils |
|
52 | 53 |
|
53 | 54 |
import ganeti.rapi.client # pylint: disable-msg=W0611 |
54 | 55 |
|
... | ... | |
209 | 210 |
"""Check node status versus cluster desired state. |
210 | 211 |
|
211 | 212 |
""" |
212 |
my_name = utils.HostInfo().name |
|
213 |
my_name = netutils.HostInfo().name
|
|
213 | 214 |
req = confd_client.ConfdClientRequest(type= |
214 | 215 |
constants.CONFD_REQ_NODE_ROLE_BYNAME, |
215 | 216 |
query=my_name) |
... | ... | |
438 | 439 |
def __init__(self, opts, notepad): |
439 | 440 |
self.notepad = notepad |
440 | 441 |
master = client.QueryConfigValues(["master_node"])[0] |
441 |
if master != utils.HostInfo().name: |
|
442 |
if master != netutils.HostInfo().name:
|
|
442 | 443 |
raise NotMasterError("This is not the master node") |
443 | 444 |
# first archive old jobs |
444 | 445 |
self.ArchiveJobs(opts.job_age) |
Also available in: Unified diff