Commit 5676ffd5 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Merge branch 'stable-2.11' into stable-2.12



* stable-2.11
  Avoid assertIn
  Be more explicit about the scope of gnt-cluster upgrade
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parents d2c7fbcc 2e925e4b
......@@ -28,6 +28,16 @@ This will carry out the steps described below in the section on upgrades from
2.1 and above. Downgrades to the previous minor version can be done in the same
way, specifiying the smaller version on the ``--to`` argument.
Note that ``gnt-cluster upgrade`` only manages the actual switch between
versions as described below on upgrades from 2.1 and above. It does not install
or remove any binaries. Having the new binaries installed is a prerequisite of
calling ``gnt-cluster upgrade`` (and the command will abort if the prerequisite
is not met). The old binaries can be used to downgrade back to the previous
version; once the system administrator decides that going back to the old
version is not needed any more, they can be removed. Addition and removal of
the Ganeti binaries should happen in the same way as for all other binaries on
your system.
2.11
----
......
......@@ -65,7 +65,8 @@ class TestGlusterVolume(testutils.GanetiTestCase):
def testHostnameResolution(self):
vol_1 = TestGlusterVolume._MakeVolume(addr="localhost")
self.assertIn(vol_1.server_ip, ("127.0.0.1", "::1"))
self.assertTrue(vol_1.server_ip in ["127.0.0.1", "::1"],
msg="%s not an IP of localhost" % (vol_1.server_ip,))
self.assertRaises(errors.ResolverError, lambda: \
TestGlusterVolume._MakeVolume(addr="E_NOENT"))
......@@ -95,10 +96,12 @@ class TestGlusterVolume(testutils.GanetiTestCase):
vol_3 = TestGlusterVolume._MakeVolume(addr="localhost",
port=9001,
vol_name="testvol")
self.assertIn(
vol_3.GetKVMMountString("dir/a.img"),
("gluster://127.0.0.1:9001/testvol/dir/a.img",
"gluster://[::1]:9001/testvol/dir/a.img")
kvmMountString = vol_3.GetKVMMountString("dir/a.img")
self.assertTrue(
kvmMountString in
["gluster://127.0.0.1:9001/testvol/dir/a.img",
"gluster://[::1]:9001/testvol/dir/a.img"],
msg="%s is not volume testvol/dir/a.img on localhost" % (kvmMountString,)
)
def testFUSEMountStrings(self):
......@@ -122,10 +125,10 @@ class TestGlusterVolume(testutils.GanetiTestCase):
vol_3 = TestGlusterVolume._MakeVolume(addr="localhost",
port=9001,
vol_name="testvol")
self.assertIn(
vol_3._GetFUSEMountString(),
("127.0.0.1:9001:testvol", "::1:9001:testvol")
)
fuseMountString = vol_3._GetFUSEMountString()
self.assertTrue(fuseMountString in
["127.0.0.1:9001:testvol", "::1:9001:testvol"],
msg="%s not testvol on localhost:9001" % (fuseMountString,))
if __name__ == "__main__":
......
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