Revision b705c7a6 daemons/ganeti-watcher
b/daemons/ganeti-watcher | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2010 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
215 | 215 |
"""Check node status versus cluster desired state. |
216 | 216 |
|
217 | 217 |
""" |
218 |
my_name = netutils.HostInfo().name
|
|
218 |
my_name = netutils.Hostname.GetSysName()
|
|
219 | 219 |
req = confd_client.ConfdClientRequest(type= |
220 | 220 |
constants.CONFD_REQ_NODE_ROLE_BYNAME, |
221 | 221 |
query=my_name) |
... | ... | |
466 | 466 |
def __init__(self, opts, notepad): |
467 | 467 |
self.notepad = notepad |
468 | 468 |
master = client.QueryConfigValues(["master_node"])[0] |
469 |
if master != netutils.HostInfo().name:
|
|
469 |
if master != netutils.Hostname.GetSysName():
|
|
470 | 470 |
raise NotMasterError("This is not the master node") |
471 | 471 |
# first archive old jobs |
472 | 472 |
self.ArchiveJobs(opts.job_age) |
Also available in: Unified diff