You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2016/01/16 19:43:35 UTC

[1/2] git commit: updated refs/heads/4.7 to b4ebfb6

Repository: cloudstack
Updated Branches:
  refs/heads/4.7 317c28a7e -> b4ebfb640


CLOUDSTACK-9204 Do not error when staticroute is already gone

When deleting fails because it isn't there any morei (KeyError), it should succeed instead.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/779f4b36
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/779f4b36
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/779f4b36

Branch: refs/heads/4.7
Commit: 779f4b36e03738a9eb1ffa4c474e9b4968cd7b72
Parents: 9be76b3
Author: Remi Bergsma <gi...@remi.nl>
Authored: Thu Dec 31 14:08:14 2015 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Thu Dec 31 14:11:06 2015 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/779f4b36/systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py
index 98244db..d5ffae1 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py
@@ -23,7 +23,10 @@ def merge(dbag, staticroutes):
         key = route['ip_address']
         revoke = route['revoke']
         if revoke:
-            del dbag[key]
+            try:
+                del dbag[key]
+            except KeyError:
+                pass
         else:
             dbag[key] = route
 


[2/2] git commit: updated refs/heads/4.7 to b4ebfb6

Posted by re...@apache.org.
Merge pull request #1298 from remibergsma/staticroute_delete_47

CLOUDSTACK-9204 Do not error when staticroute is already goneWhen deleting a static route fails because it isn't there any more (KeyError), it should succeed instead.

Error seen:
```
[INFO] Processing JSON file static_routes.json.1451560145
Traceback (most recent call last):
File "/opt/cloud/bin/update_config.py", line 140, in <module>
process_file()
File "/opt/cloud/bin/update_config.py", line 52, in process_file
qf.load(None)
File "/opt/cloud/bin/merge.py", line 258, in load
proc = updateDataBag(self)
File "/opt/cloud/bin/merge.py", line 91, in _init_
self.process()
File "/opt/cloud/bin/merge.py", line 131, in process
dbag = self.process_staticroutes(self.db.getDataBag())
File "/opt/cloud/bin/merge.py", line 179, in process_staticroutes
return cs_staticroutes.merge(dbag, self.qFile.data)
File "/opt/cloud/bin/cs_staticroutes.py", line 26, in merge
del dbag[key]
KeyError: u'192.168.0.3'
```

* pr/1298:
  CLOUDSTACK-9204 Do not error when staticroute is already gone

Signed-off-by: Remi Bergsma <gi...@remi.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b4ebfb64
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b4ebfb64
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b4ebfb64

Branch: refs/heads/4.7
Commit: b4ebfb640e4514e45190846965b4a6a77bb3ae8a
Parents: 317c28a 779f4b3
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Jan 16 19:43:24 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Jan 16 19:43:24 2016 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------