Skip to content

Sidecar does not throw error when it fails to subscribe to Azure ServiceBus through Dapr component due to authentication #3715

Open
@rpaiAveva

Description

@rpaiAveva

Dapr Version :1.14.2

Expected Behavior

Dapr sidecar should throw error and return unhealthy status until the pub/sub component succeeds to subscribe on retry.
Sidecar should throw error when it fails to subscribe to Azure ServiceBus through Dapr pub/sub component when pod identity doesnt have role assignment to the servicebus. Sidecar should keep retrying and report healthy when pub/sub component subscribes to AzureServiceBus successfully.

Actual Behavior

We use dapr pub/sub component that shows warning to subscribe in the sidecar logs without retry or recovery logic. Even after the role assignment is complete the dapr sidecar doesnt recover and resume to subscribe.

Warning logs in dapr sidecar :

level=warning msg="failed to subscribe to topics: failed to subscribe to topic TestEventV1: could not create topic TestEventV1: PUT [https://sbname.servicebus.windows.net/TestEventV1](https://sbname.servicebus.windows.net/TestEventV1%5C)
RESPONSE 401: 401 Unauthorized\nERROR CODE: 401401Authorization failed for specified action: Manage,EntityWrite."

level=info msg="dapr initialized. Status: Running. Init Elapsed 13099ms" app_id=... scope=dapr.runtime type=log ver=1.14.2

Steps to Reproduce the Problem

This issue crops when a new K8s pod is created and its identity doesn't yet have a role assignment to access the AzureServicebus.
RoleAssignment happens async just within a few seconds after the pod creation.
On a manual restart of the pod after roleassignment is done, dapr pub/sub component subscribes to the servicebus without any warnings and functions normally.

Release Note

RELEASE NOTE:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions