This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Checks provisioning state in Rule resource instead of Group#30
Merged
nacx merged 3 commits intoapache:masterfrom May 17, 2019
Merged
Checks provisioning state in Rule resource instead of Group#30nacx merged 3 commits intoapache:masterfrom
nacx merged 3 commits intoapache:masterfrom
Conversation
nacx
suggested changes
May 15, 2019
| checkState( | ||
| securityGroupAvailable.create(resourceGroupAndName.resourceGroup()).apply(networkSecurityGroup.name()), | ||
| "Security group was not updated in the configured timeout"); | ||
| URI uri = api.getNetworkSecurityRuleApi(resourceGroupAndName.resourceGroup(), networkSecurityGroup.name()).delete(resourceGroupAndName.name()); |
Member
There was a problem hiding this comment.
This looks wrong:
- The rule is already being deleted in line 297.
- You are passing the security group name to the delete method, not the rule name.
Remove this line, capture the URL in line 297 and check on that.
| "Security group was not updated in the configured timeout"); | ||
| URI uri = api.getNetworkSecurityRuleApi(resourceGroupAndName.resourceGroup(), networkSecurityGroup.name()).delete(resourceGroupAndName.name()); | ||
| if (uri != null) { | ||
| resourceDeleted.apply(uri); |
Member
There was a problem hiding this comment.
Let's capture the result and verify with checkState to keep the current behavior and feedback.
Member
Author
|
Thanks @nacx for noticing. Tests however passed but code was clearly wrong |
nacx
reviewed
May 16, 2019
...java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
Outdated
Show resolved
Hide resolved
asfgit
pushed a commit
that referenced
this pull request
May 17, 2019
* Checks provisioning state in Rule resource instead of Group * comments by @nacx to proper check and delete rules * Fixes log message deleting rule
Member
Author
|
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We were checking the provisioningState security group resource. When updating rules concurrently this check returns OK (the security group is ok) but the actual rules are still being updated (created/deleted) causing random problems.
PR implements provisioningState in
NetworkSecurityRulePropertiesto do this check properly (https://docs.microsoft.com/en-us/rest/api/virtualnetwork/securityrules/get#securityrule)