Skip to content

Avoid concurrent infra provisioning requests #427

@alexluong

Description

@alexluong

Describe the bug
Outpost is responsible for creating its own mqs based on the user configuration. On startup, every Outpost service will check if the mqs are provisioned, and if not, Outpost will create them. This behavior may cause issues on the very first run when multiple nodes attempt to provision the same mqs.

To Reproduce
Steps to reproduce the behavior:

  1. set up a new set of Azure mq credentials
  2. run a cluster of Outpost

Expected behavior
The deliverymq and logmq topics and subscriptions are created.

Screenshots

running...
{"level":"info","ts":1749544317.5334902,"caller":"app/app.go:47","msg":"starting outpost","config_path":".env","service":"api"}
{"level":"info","ts":1749544317.7974298,"caller":"app/app.go:197","msg":"no migrations applied","version":3}
failed to declare topic: failed to create topic outpost-delivery: PUT https://management.azure.com/subscriptions/21f864a1-c750-44d6-b40a-bf62a33541aa/resourceGroups/outpost-rg/providers/Microsoft.ServiceBus/namespaces/outpost-servicebus-271b4344/topics/outpost-delivery
--------------------------------------------------------------------------------
RESPONSE 429: 429 Too Many Requests
ERROR CODE: MessagingGatewayTooManyRequests
--------------------------------------------------------------------------------
{
  "error": {
    "code": "MessagingGatewayTooManyRequests",
    "message": "SubCode=40900. Conflict. You're requesting an operation that isn't allowed in the resource's current state. To know more visit https://aka.ms/sbResourceMgrExceptions.  ExceptionDescription: sb://outpost-servicebus-271b4344.servicebus.windows.net/outpost-delivery. TrackingId:49463282-fa78-475b-8110-355879cf2d3b_G13, SystemTracker:outpost-servicebus-271b4344.servicebus.windows.net:outpost-delivery, Timestamp:2025-06-10T08:32:01"
  }
}
--------------------------------------------------------------------------------

Process Exit with Code: 1

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions