* devel-2.2:
gnt-job info: Sort input fields
KVM: Add function to check the hypervisor version
Bump version to 2.2.0, update NEWS
Fix instance rename regression from
3fe11ba3
Fix instance rename regression from
3fe11ba3
Update RAPI documentation for /2/nodes/[node_name]/migrate
Sort OS names and variants in LUDiagnoseOS
Add some trivial QA tests for the new OS states
Change behaviour of OpDiagnoseOS w.r.t. 'valid'
Allow gnt-os modify to change the new OS params
Add two more _T-type tests
Add blacklisted/hidden OS support in LUDiagnoseOS
Restrict blacklisted OSes in instance installation
Add two new cluster settings
Abstract OS name/variant functions
Add OS new states to the design doc
Remove the RPC changes from the 2.2 design
Remove 'Detailed Design' from design-2.2.rst
Conflicts:
lib/cli.py
lib/cmdlib.py
lib/objects.py
scripts/gnt-os
All conflicts were trivial.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
action="store_false", default=True,
help="Disable support for DRBD")
+PRIMARY_IP_VERSION_OPT = \
+ cli_option("--primary-ip-version", default=constants.IP4_VERSION,
+ action="store", dest="primary_ip_version",
+ metavar="%d|%d" % (constants.IP4_VERSION,
+ constants.IP6_VERSION),
+ help="Cluster-wide IP version for primary IP")
+
+PRIORITY_OPT = cli_option("--priority", default=None, dest="priority",
+ metavar="|".join(name for name, _ in _PRIORITY_NAMES),
+ choices=_PRIONAME_TO_VALUE.keys(),
+ help="Priority for opcode processing")
+
+ HID_OS_OPT = cli_option("--hidden", dest="hidden",
+ type="bool", default=None, metavar=_YORNO,
+ help="Sets the hidden flag on the OS")
+
+ BLK_OS_OPT = cli_option("--blacklisted", dest="blacklisted",
+ type="bool", default=None, metavar=_YORNO,
+ help="Sets the blacklisted flag on the OS")
+
+
#: Options provided by all commands
COMMON_OPTS = [DEBUG_OPT]
new_name = self.op.new_name
if self.op.name_check:
- hostinfo = netutils.HostInfo(netutils.HostInfo.NormalizeName(new_name))
- new_name = self.op.new_name = hostinfo.name
+ hostname = netutils.GetHostname(name=new_name)
- new_name = hostname.name
++ new_name = self.op.new_name = hostname.name
if (self.op.ip_check and
- netutils.TcpPing(hostinfo.ip, constants.DEFAULT_NODED_PORT)):
+ netutils.TcpPing(hostname.ip, constants.DEFAULT_NODED_PORT)):
raise errors.OpPrereqError("IP %s of instance %s already in use" %
- (hostinfo.ip, new_name),
+ (hostname.ip, new_name),
errors.ECODE_NOTUNIQUE)
instance_list = self.cfg.GetInstanceList()
"maintain_node_health",
"uid_pool",
"default_iallocator",
+ "primary_ip_family",
+ "hidden_oss",
+ "blacklisted_oss",
] + _TIMESTAMPS + _UUID
def UpgradeConfig(self):
if self.reserved_lvs is None:
self.reserved_lvs = []
+ # hidden and blacklisted operating systems added before 2.2.1
+ if self.hidden_oss is None:
+ self.hidden_oss = []
+
+ if self.blacklisted_oss is None:
+ self.blacklisted_oss = []
+
+ # primary_ip_family added before 2.3
+ if self.primary_ip_family is None:
+ self.primary_ip_family = AF_INET
+
def ToDict(self):
"""Custom function for cluster.
commands = {
'list': (
- ListOS, ARGS_NONE, [NOHDR_OPT], "", "Lists all valid operating systems"
- " on the cluster"),
+ ListOS, ARGS_NONE, [NOHDR_OPT, PRIORITY_OPT],
+ "", "Lists all valid operating systems on the cluster"),
'diagnose': (
- DiagnoseOS, ARGS_NONE, [], "", "Diagnose all operating systems"),
+ DiagnoseOS, ARGS_NONE, [PRIORITY_OPT],
+ "", "Diagnose all operating systems"),
'info': (
- ShowOSInfo, [ArgOs()], [], "", "Show detailed information about "
+ ShowOSInfo, [ArgOs()], [PRIORITY_OPT],
+ "", "Show detailed information about "
"operating systems"),
'modify': (
- ModifyOS, ARGS_ONE_OS, [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT,
- HID_OS_OPT, BLK_OS_OPT], "",
- "Modify the OS parameters"),
+ ModifyOS, ARGS_ONE_OS,
- [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT],
++ [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT,
++ HID_OS_OPT, BLK_OS_OPT],
+ "", "Modify the OS parameters"),
}
if __name__ == '__main__':