from ganeti import constants
from ganeti import errors
from ganeti import netutils
+from ganeti import pathutils
from cStringIO import StringIO
from ganeti import confd
assert nodes, "Empty node list"
- cmd = [constants.SETUP_SSH]
+ cmd = [pathutils.SETUP_SSH]
# Pass --debug|--verbose to the external script if set on our invocation
# --debug overrides --verbose
status.failure = True
node = args[0]
- hmac = utils.ReadFile(constants.CONFD_HMAC_KEY)
+ hmac = utils.ReadFile(pathutils.CONFD_HMAC_KEY)
filter_callback = confd_client.ConfdFilterCallback(ListDrbdConfdCallback)
counting_callback = confd_client.ConfdCountingCallback(filter_callback)
cf_client = confd_client.ConfdClient(hmac, [constants.IP4_ADDRESS_LOCALHOST],
return constants.EXIT_FAILURE
fields = ["node", "minor", "instance", "disk", "role", "peer"]
- headers = {"node": "Node", "minor": "Minor", "instance": "Instance",
- "disk": "Disk", "role": "Role", "peer": "PeerNode"}
+ if opts.no_headers:
+ headers = None
+ else:
+ headers = {"node": "Node", "minor": "Minor", "instance": "Instance",
+ "disk": "Disk", "role": "Role", "peer": "PeerNode"}
data = GenerateTable(separator=opts.separator, headers=headers,
fields=fields, data=sorted(status.answer),
MigrateNode, ARGS_ONE_NODE,
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT,
IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT,
- NORUNTIME_CHGS_OPT, SUBMIT_OPT, PRIORITY_OPT],
+ NORUNTIME_CHGS_OPT, SUBMIT_OPT],
"[-f] <node>",
"Migrate all the primary instance on a node away from it"
" (only for instances of type drbd)"),