CLOUDSTACK-9204 Do not error when staticroute is already gone#1298
Merged
Conversation
When deleting fails because it isn't there any morei (KeyError), it should succeed instead.
Contributor
|
Trivial fix indeed. We can ignore this since our goal has been reached. LGTM |
Contributor
Author
|
LGTM based on these tests: Result: And: Result: We successfully run this on a production cloud. |
Contributor
|
Ping @remibergsma LGTM, please proceed with merge. Cheers, |
asfgit
pushed a commit
that referenced
this pull request
Jan 16, 2016
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 <github@remi.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When deleting a static route fails because it isn't there any more (KeyError), it should succeed instead.
Error seen: