Commit 801b6a33 authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'stable-2.1'



* stable-2.1:
  Bump up version for 2.1.5 release
  RapiClient: fix multi-authentication in Python 2.6
  Remove rapi-user and rapi-pass from qa-sample.json
  qa: fix gnt-instance modify -t drbd
  qa: shutdown instance before trying disk convert
  Fix check in gnt-instance modify -t
  Document optional ctypes dependency
  Update NEWS for the 2.1.5 release
  Pass force variant option at instance creation
  BatchCreate: get force_variant from specs not opts
  BatchCreate: set a default for force_variant

Conflicts:
	INSTALL
	  - merge
	NEWS
	  - merge
	configure.ac
	  - keep 2.2 version
	lib/rapi/client.py
	  - keep curl version
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parents ac492887 1d4c743d
......@@ -30,6 +30,9 @@ Before installing, please verify that you have the following programs:
- `pyparsing Python module <http://pyparsing.wikispaces.com/>`_
- `pyinotify Python module <http://trac.dbzteam.org/pyinotify/>`_
- `PycURL Python module <http://pycurl.sourceforge.net/>`_
- `ctypes Python module
<http://starship.python.net/crew/theller/ctypes/>`_, if running on
python 2.4 (optional, used for node daemon memory locking)
- `socat <http://www.dest-unreach.org/socat/>`_
These programs are supplied as part of most Linux distributions, so
......
......@@ -30,6 +30,24 @@ Version 2.2.0 beta 0
``EXP_SIZE_FD``
Version 2.1.5
-------------
*(Released Thu, 01 Jul 2010)*
A small bugfix release:
- Fix disk adoption: broken by strict --disk option checking in 2.1.4
- Fix batch-create: broken in the whole 2.1 series due to a lookup on
a non-existing option
- Fix instance create: the --force-variant option was ignored
- Improve pylint 0.21 compatibility and warnings with Python 2.6
- Fix modify node storage with non-FQDN arguments
- Fix RAPI client to authenticate under Python 2.6 when used
for more than 5 requests needing authentication
- Fix gnt-instance modify -t (storage) giving a wrong error message
when converting a non-shutdown drbd instance to plain
Version 2.1.4
-------------
......
......@@ -1810,6 +1810,7 @@ def GenericInstanceCreate(mode, opts, args):
if mode == constants.INSTANCE_CREATE:
start = opts.start
os_type = opts.os
force_variant = opts.force_variant
src_node = None
src_path = None
no_install = opts.no_install
......@@ -1817,6 +1818,7 @@ def GenericInstanceCreate(mode, opts, args):
elif mode == constants.INSTANCE_IMPORT:
start = False
os_type = None
force_variant = False
src_node = opts.src_node
src_path = opts.src_dir
no_install = None
......@@ -1842,6 +1844,7 @@ def GenericInstanceCreate(mode, opts, args):
mode=mode,
start=start,
os_type=os_type,
force_variant=force_variant,
src_node=src_node,
src_path=src_path,
no_install=no_install,
......
......@@ -8649,13 +8649,13 @@ class LUSetInstanceParams(LogicalUnit):
" %s to %s" % (instance.disk_template,
self.op.disk_template),
errors.ECODE_INVAL)
_CheckInstanceDown(self, instance, "cannot change disk template")
if self.op.disk_template in constants.DTS_NET_MIRROR:
_CheckNodeOnline(self, self.op.remote_node)
_CheckNodeNotDrained(self, self.op.remote_node)
disks = [{"size": d.size} for d in instance.disks]
required = _ComputeDiskSize(self.op.disk_template, disks)
_CheckNodesFreeDisk(self, [self.op.remote_node], required)
_CheckInstanceDown(self, instance, "cannot change disk template")
# hvparams processing
if self.op.hvparams:
......
......@@ -355,7 +355,9 @@ def main():
instance = RunTest(func, pnode, snode)
RunCommonInstanceTests(instance)
if qa_config.TestEnabled('instance-convert-disk'):
RunTest(qa_instance.TestInstanceShutdown, instance)
RunTest(qa_instance.TestInstanceConvertDisk, instance, snode)
RunTest(qa_instance.TestInstanceStartup, instance)
RunExportImportTests(instance, pnode)
RunHardwareFailureTests(instance, pnode, snode)
RunTest(qa_instance.TestInstanceRemove, instance)
......
......@@ -6,9 +6,6 @@
"os": "debian-etch",
"mem": "512M",
"rapi-user": "foobar",
"rapi-pass": "barfoo",
"# Lists of disk sizes": null,
"disk": ["1G", "512M"],
"disk-growth": ["2G", "768M"],
......
......@@ -215,7 +215,8 @@ def TestInstanceConvertDisk(instance, snode):
cmd = ['gnt-instance', 'modify', '-t', 'plain', instance['name']]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
cmd = ['gnt-instance', 'modify', '-t', 'drbd', '-n', snode, instance['name']]
cmd = ['gnt-instance', 'modify', '-t', 'drbd', '-n', snode['primary'],
instance['name']]
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0)
......
......@@ -387,6 +387,7 @@ def BatchCreate(opts, args):
"hypervisor": None,
"hvparams": {},
"file_storage_dir": None,
"force_variant": False,
"file_driver": 'loop'}
def _PopulateWithDefaults(spec):
......@@ -478,7 +479,7 @@ def BatchCreate(opts, args):
disk_template=specs['template'],
mode=constants.INSTANCE_CREATE,
os_type=specs['os'],
force_variant=opts.force_variant,
force_variant=specs["force_variant"],
pnode=specs['primary_node'],
snode=specs['secondary_node'],
nics=tmp_nics,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment