Azure / Azure/azure-cli

az redis force-reboot fails with InternalServerError

Open
#20,458 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Redis Cache Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
Running:

``` shell
az redis force-reboot --reboot-type PrimaryNode -n $redis_name -g $redis_resource_group
```

Fails with `InternalServerError` like the following:

``` shell
(InternalServerError) Something went wrong.
RequestID=dececf94-7f11-4ffa-9a4b-35694dd3f091
Code: InternalServerError
Message: Something went wrong.
RequestID=dececf94-7f11-4ffa-9a4b-35694dd3f091
```

**To Reproduce**
Deploy a Redis Cache with 2 availability zones
Run: `az redis force-reboot --reboot-type PrimaryNode -n $redis_name -g $redis_resource_group`

Sample Terraform script:

``` terraform
terraform {
required_version = "> 0.14"
required_providers {
azurerm = {
version = "= 2.57.0"
}
random = {
version = "= 3.1.0"
}
}
}

provider "azurerm" {
features {}
}

# Location of the services
variable "location" {
default = "west europe"
}

# Resource Group Name
variable "resource_group" {
default = "redis-failover"
}

# Name of the Redis cluster
variable "redis_name" {
default = "redis-failover"
}

resource "random_id" "random" {
byte_length = 8
}

resource "azurerm_resource_group" "rg" {
name = var.resource_group
location = var.location
}

resource "azurerm_redis_cache" "redis" {
name = "${var.redis_name}-${lower(random_id.random.hex)}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
capacity = 2
family = "P"
sku_name = "Premium"
enable_non_ssl_port = true
minimum_tls_version = "1.2"

redis_configuration {
}

zones = ["1", "2"]
}

resource "azurerm_log_analytics_workspace" "logs" {
name = "redis-logs"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku = "PerGB2018"
retention_in_days = 30
}

resource "azurerm_monitor_diagnostic_setting" "monitor" {
name = lower("extaudit-${var.redis_name}-diag")
target_resource_id = azurerm_redis_cache.redis.id
log_analytics_workspace_id = azurerm_log_analytics_workspace.logs.id

metric {
category = "AllMetrics"

retention_policy {
enabled = false
}
}

log {
category = "ConnectedClientList"
enabled = false

retention_policy {
days = 0
enabled = false
}
}

lifecycle {
ignore_changes = [metric]
}
}

output "redis_name" {
value = azurerm_redis_cache.redis.name
}

output "redis_host_name" {
value = azurerm_redis_cache.redis.hostname
}

output "redis_primary_access_key" {
value = azurerm_redis_cache.redis.primary_access_key
sensitive = true
}
```

**Expected behavior**
Command should work

**Environment summary**
Tested from:
- Windows 11
- WSL2 (Ubuntu)
- Azure Cloud Shell

**Additional context**
{
"azure-cli": "2.30.0",
"azure-cli-core": "2.30.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"rdbms-connect": "0.1.3"
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.