Azure / Azure/azure-rest-api-specs

Azure Cache for Redis - list firewall rules response is incorrect immediately after deleting one firewall rule and creating one firewall rule

Open
#15,746 3 comments 0 reactions 0 assignees View on GitHub
Mgmt Redis Cache Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

We found when calling list firewall rules immediately after deleting one firewall rule and creating on firewall rule, the list response can be incorrect. We are calling 'Azure Cache for Redis' using code. Below is our code logs for requests and response payload.
Our process is:
1. Create two firewall rules - rule1 and rule2 (Log part 1)
2. Send a call to delete rule1 (Log part 2)
3. Send another call to create one firewall rule - rule3. (Log part 3)
4. After delete and create firewall rule finished, we send a call to list firewall rules. The response returns rule1, rule2 and rule3, but the expected response is that only rule2 and rule3 are returned. (Log part 4)

**Logs:**
```
--------------------------------------------------------------
Log Part 1
---------------------------------------------------------------
[reactor-http-nio-3] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.createOrUpdate - <-- 201 https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule1?api-version=2020-12-01 (390 ms, 309-byte body)
Cache-Control:no-cache
Pragma:no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
Location:https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule1?api-version=2020-12-01
x-ms-request-id:bb610ca4-5d3d-45fe-8f59-ec75369f6ce4
client-request-id:18d5cd21-ef97-4a37-8741-53319e795b63
x-rp-server-mvid:4b18d3df-50c9-4f2d-9924-880cb843c396
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Server:Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes:1196
x-ms-correlation-request-id:459f8e95-53e6-4bd4-98b2-56f18dc8e0df
x-ms-routing-request-id:SOUTHEASTASIA:20210823T033550Z:459f8e95-53e6-4bd4-98b2-56f18dc8e0df
Date:Mon, 23 Aug 2021 03:35:50 GMT
content-length:309
Response body:
{
"properties" : {
"startIP" : "192.168.0.1",
"endIP" : "192.168.0.4"
},
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule1",
"name" : "javacsmrc42510Third/rule1",
"type" : "Microsoft.Cache/redis/firewallRules"
}
<-- END HTTP

[reactor-http-nio-6] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.createOrUpdate - <-- 201 https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule2?api-version=2020-12-01 (1059 ms, 311-byte body)
Cache-Control:no-cache
Pragma:no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
Location:https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule2?api-version=2020-12-01
x-ms-request-id:f671a5b2-3202-4828-8a86-f54cdfd3487a
client-request-id:759e1ea1-3e1b-423e-b0ac-ecfd49dfb2b8
x-rp-server-mvid:4b18d3df-50c9-4f2d-9924-880cb843c396
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Server:Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes:1197
x-ms-correlation-request-id:8bc7f6ba-254d-47f7-95a7-2bbdf2fe63fc
x-ms-routing-request-id:SOUTHEASTASIA:20210823T033551Z:8bc7f6ba-254d-47f7-95a7-2bbdf2fe63fc
Date:Mon, 23 Aug 2021 03:35:50 GMT
content-length:311
Response body:
{
"properties" : {
"startIP" : "192.168.0.10",
"endIP" : "192.168.0.40"
},
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule2",
"name" : "javacsmrc42510Third/rule2",
"type" : "Microsoft.Cache/redis/firewallRules"
}
<-- END HTTP

------------------------------------------------------
Log Part 2
-------------------------------------------------------
[reactor-http-nio-6] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.delete - --> DELETE https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule1?api-version=2020-12-01
Try count: 1
Date:Mon, 23 Aug 2021 03:37:50 GMT
Authorization:REDACTED
Content-Length:0
x-ms-return-client-request-id:true
Cookie:
Content-Type:application/json
x-ms-client-request-id:7ffa702b-2742-47d5-8de4-a7d5a0884aad
Accept:application/json
User-Agent:azsdk-java-com.azure.resourcemanager.redis/2.8.0-beta.1 (11.0.11; Windows 10; 10.0)
(empty body)
--> END DELETE

---------------------------------------------------
Log Part 3
---------------------------------------------------
[reactor-http-nio-3] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.createOrUpdate - --> PUT https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule3?api-version=2020-12-01
Try count: 1
Date:Mon, 23 Aug 2021 03:37:50 GMT
Authorization:REDACTED
Content-Length:65
x-ms-return-client-request-id:true
Cookie:
Content-Type:application/json
x-ms-client-request-id:aefceeab-877e-488a-a697-d8abf8fe4cfa
Accept:application/json
User-Agent:azsdk-java-com.azure.resourcemanager.redis/2.8.0-beta.1 (11.0.11; Windows 10; 10.0)
65-byte body:
{
"properties" : {
"startIP" : "192.168.0.10",
"endIP" : "192.168.0.104"
}
}
--> END PUT
[reactor-http-nio-3] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.createOrUpdate - <-- 201 https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule3?api-version=2020-12-01 (1003 ms, 312-byte body)
Cache-Control:no-cache
Pragma:no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
Location:https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule3?api-version=2020-12-01
x-ms-request-id:81116ed2-4816-4dea-9cfb-3c3befe9194b
client-request-id:aefceeab-877e-488a-a697-d8abf8fe4cfa
x-rp-server-mvid:4b18d3df-50c9-4f2d-9924-880cb843c396
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Server:Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes:1195
x-ms-correlation-request-id:894e0256-c0ea-440b-9d8e-7847d48d3a57
x-ms-routing-request-id:SOUTHEASTASIA:20210823T033751Z:894e0256-c0ea-440b-9d8e-7847d48d3a57
Date:Mon, 23 Aug 2021 03:37:50 GMT
content-length:312
Response body:
{
"properties" : {
"startIP" : "192.168.0.10",
"endIP" : "192.168.0.104"
},
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule3",
"name" : "javacsmrc42510Third/rule3",
"type" : "Microsoft.Cache/redis/firewallRules"
}
<-- END HTTP

[reactor-http-nio-5] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.delete - <-- 200 https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules/rule1?api-version=2020-12-01 (1025 ms, 0-byte body)
Cache-Control:no-cache
Pragma:no-cache
Expires:-1
x-ms-request-id:e4fa337d-f2bd-4013-8126-ffe238bf9e6e
client-request-id:7ffa702b-2742-47d5-8de4-a7d5a0884aad
x-rp-server-mvid:4b18d3df-50c9-4f2d-9924-880cb843c396
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Server:Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-deletes:14999
x-ms-correlation-request-id:1d168b19-80fb-41c3-b07a-a146cd88d2ec
x-ms-routing-request-id:SOUTHEASTASIA:20210823T033751Z:1d168b19-80fb-41c3-b07a-a146cd88d2ec
Date:Mon, 23 Aug 2021 03:37:51 GMT
content-length:0
(body content not logged)

-------------------------------------------------------------------
Log Part 4
--------------------------------------------------------------------
[reactor-http-nio-4] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.list - --> GET https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules?api-version=2020-12-01
Try count: 1
Date:Mon, 23 Aug 2021 03:37:52 GMT
Authorization:REDACTED
Content-Length:0
x-ms-return-client-request-id:true
Cookie:
Content-Type:application/json
x-ms-client-request-id:744b4642-1eec-4770-9a81-a3659f531ad3
Accept:application/json
User-Agent:azsdk-java-com.azure.resourcemanager.redis/2.8.0-beta.1 (11.0.11; Windows 10; 10.0)
(empty body)
--> END GET

[reactor-http-nio-6] INFO com.azure.resourcemanager.redis.implementation.FirewallRulesClientImpl$FirewallRulesService.list - <-- 200 https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/redis/javacsmrc42510Third/firewallRules?api-version=2020-12-01 (293 ms, 946-byte body)
Cache-Control:no-cache
Pragma:no-cache
Content-Type:application/json; charset=utf-8
Expires:-1
x-ms-request-id:cc540240-57a0-4d04-bb34-5112bb7e867c
client-request-id:744b4642-1eec-4770-9a81-a3659f531ad3
x-rp-server-mvid:4b18d3df-50c9-4f2d-9924-880cb843c396
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Server:Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads:11969
x-ms-correlation-request-id:9e84cbcf-caa8-4b2b-b3f6-585dd89f7029
x-ms-routing-request-id:SOUTHEASTASIA:20210823T033753Z:9e84cbcf-caa8-4b2b-b3f6-585dd89f7029
Date:Mon, 23 Aug 2021 03:37:52 GMT
content-length:946
Response body:
{
"value" : [ {
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/Redis/javacsmrc42510Third/firewallRules/rule1",
"name" : "javacsmrc42510Third/rule1",
"type" : "Microsoft.Cache/Redis/firewallRules",
"properties" : {
"startIP" : "192.168.0.1",
"endIP" : "192.168.0.4"
}
}, {
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/Redis/javacsmrc42510Third/firewallRules/rule2",
"name" : "javacsmrc42510Third/rule2",
"type" : "Microsoft.Cache/Redis/firewallRules",
"properties" : {
"startIP" : "192.168.0.10",
"endIP" : "192.168.0.40"
}
}, {
"id" : "/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/javacsmrg53117Second/providers/Microsoft.Cache/Redis/javacsmrc42510Third/firewallRules/rule3",
"name" : "javacsmrc42510Third/rule3",
"type" : "Microsoft.Cache/Redis/firewallRules",
"properties" : {
"startIP" : "192.168.0.10",
"endIP" : "192.168.0.104"
}
} ]
}
<-- END HTTP
-------------------------------------------------------------------
```

Contributor guide

Open the contributing guide

Research direction

The issue names Azure Cache for Redis firewallRules delete, create, and list operations but no repository file or test. Start by locating the Redis firewallRules API specification and checking whether the reported behavior is represented there or belongs to the service implementation. Done means the issue has an identified repository change or is documented as an upstream service problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java, redis
Domain
api, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.