From ae61bfee761178809536e3f837aaec550ff67716 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 11 Nov 2019 23:47:21 +0530 Subject: [PATCH 1/2] systemvm: for ip route show command don't use the throw command (#3612) While searching for existing route, don't use the throw keyword when using the cmd with `ip route show`. Signed-off-by: Rohit Yadav --- systemvm/debian/opt/cloud/bin/cs/CsRoute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsRoute.py b/systemvm/debian/opt/cloud/bin/cs/CsRoute.py index ce87bb0533c..a77a62572ad 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsRoute.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsRoute.py @@ -79,7 +79,7 @@ class CsRoute: found = False search = cmd if "throw" in search: - search = "type " + search + search = search.replace("throw", "") for i in CsHelper.execute("ip route show " + search): found = True if not found and method == "add": From 8ac25019d3727c0216b02347f0781447bba188bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Beims=20Br=C3=A4scher?= Date: Tue, 12 Nov 2019 06:34:24 -0300 Subject: [PATCH 2/2] ceph: fix issue #3590 'Revert Ceph/RBD Snapshot' (#3605) Fixes issue #3590 by using the last element on the array from the snapshot "path" String for retrieving the snapshot id. Additionally, it uses the volumePath as the volume id which should always be the correct value. The error raised on issue #3590 was related to the wrong use of variable "path" where in some cases had a different set of substrings. The proposed change has been tested and evaluated. The values used for openning the RBD connection and executing the rollback were stable on the tests. Runned rollback on multiple snapshots and could start the VM with the content matching the ROOT reverted snapshot. --- .../wrapper/LibvirtRevertSnapshotCommandWrapper.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRevertSnapshotCommandWrapper.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRevertSnapshotCommandWrapper.java index 5aea457a755..3807e5ca931 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRevertSnapshotCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRevertSnapshotCommandWrapper.java @@ -86,14 +86,16 @@ public final class LibvirtRevertSnapshotCommandWrapper extends CommandWrapper