Skip to content

Create authorization rule fails after creating an eventhub with log compaction #26865

@adejongh93

Description

@adejongh93

Describe the bug

We successfully create an eventhub with cleanup policy set as Compact and then we try to create an authorization rule for that eventhub, but the creation of the rule fails.

Related command

First we run:
az eventhubs eventhub create --subscription <subscription-value> --resource-group <resource-group-value> --namespace-name <namespace-value> --name <eventhub-name-value> --partition-count <partition-count-value> --cleanup-policy Compact

The response of the above command is successful and it includes this:

"retentionDescription": {
    "cleanupPolicy": "Compact"
  }

Then we run:
az eventhubs eventhub authorization-rule create --subscription <subscription-value> --resource-group <resource-group-value> --namespace-name <namespace-value> --eventhub-name <eventhub-name-value> --name <authorization-rule-name> --rights Send

And it fails with the error below.

Errors

(MessagingGatewayBadRequest) SubCode=40000. CleanupPolicy changes are not allowed in update.

Issue script & Debug output

cli.azure.cli.core.azclierror: (MessagingGatewayBadRequest) SubCode=40000. CleanupPolicy changes are not allowed in update. TrackingId:a4e9bb9e-9d67-4d70-8ffe-efb3a970db6c_G52, SystemTracker:...development.servicebus.windows.net:eventhub-name, Timestamp:2023-07-11T14:45:19
Code: MessagingGatewayBadRequest
Message: SubCode=40000. CleanupPolicy changes are not allowed in update. TrackingId:a4e9bb9e-9d67-4d70-8ffe-efb3a970db6c_G52, SystemTracker:....servicebus.windows.net:eventhub-name, Timestamp:2023-07-11T14:45:19

Expected behavior

The authorization rule should be created without any failure.

Environment Summary

azure-cli 2.50.0

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.Event Hubsaz eventhubsbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedThis issue is addressed and ready to close.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions