Azure / azure-cli

Azure Command-Line Interface
MIT License
3.92k stars 2.89k forks source link

[ERROR] using az servicebus queue create command #17002

Open fafg opened 3 years ago

fafg commented 3 years ago

{ "error": { "code": "OK", "message": "OK CorrelationId: ed2a6c29-0046-4145-9162-b012eeccba0f" }, "id": null, "name": null, "rights": null, "type": null }

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az servicebus queue create

Errors:

'int' object is not iterable
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 233, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 589, in execute
    parsed_args = self.parser.parse_args(args)
...
3.8/lib/python3.8/difflib.py, ln 311, in __chain_b
    for i, elt in enumerate(b):
TypeError: 'int' object is not iterable

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

macOS-11.1-x86_64-i386-64bit
Python 3.8.7
Installer: HOMEBREW

azure-cli 2.19.1
azure-cli-iot-ext 0.8.10

Extensions:
azure-cli-iot-ext 0.8.10
azure-iot 0.10.7
aks-preview 0.4.70
azure-devops 0.18.0
application-insights 0.1.12

Additional Context

fafg commented 3 years ago
az servicebus queue create `
    --resource-group <RG> `
    --namespace-name <sb-namespace> `
    --name <queue-name> `
    --lock-duration "PT5M" `
    --max-size 16384

using parameter --max-size the command blowup, without this parameter the command works. maybe using any other int parameter will break.

then you guys forces me to use arm template. =/

fafg commented 3 years ago

https://stackoverflow.com/questions/19523563/python-typeerror-int-object-is-not-iterable

fafg commented 3 years ago

ok, using the standard tier i am limited to use up to 5gb, however using values different from these values --max-size on Standard sku namespace only supports upto [1024, 2048, 3072, 4096, 5120] GB will show me that error =/

fafg commented 3 years ago

another problem. using these parameters:

    --name $queueName `
    --lock-duration "PT5M" `
    --max-size 5120 `
    --enable-duplicate-detection false `
    --enable-session false `
    --default-message-time-to-live "P90D" `
    --enable-dead-lettering-on-message-expiration false `
    --enable-batched-operations true `
    --duplicate-detection-history-time-window "PT2M" `
    --max-delivery-count 10 `
    --status "Active" `
    --enable-partitioning true `
    --enable-express false

it generates a queue with this size:

image

80gb? but the messages previously said I can't create anything above 5gb since my tier is a standard one? 0.o

fafg commented 3 years ago

command line feedback:

{
  "accessedAt": "0001-01-01T00:00:00",
  "autoDeleteOnIdle": "10675199 days, 2:48:05.477581",
  "countDetails": {
    "activeMessageCount": 0,
    "deadLetterMessageCount": 0,
    "scheduledMessageCount": 0,
    "transferDeadLetterMessageCount": 0,
    "transferMessageCount": 0
  },
  "createdAt": "2021-02-19T19:07:33.113000+00:00",
  "deadLetteringOnMessageExpiration": false,
  "defaultMessageTimeToLive": "90 days, 0:00:00",
  "duplicateDetectionHistoryTimeWindow": "0:02:00",
  "enableBatchedOperations": true,
  "enableExpress": false,
  "enablePartitioning": true,
  "forwardDeadLetteredMessagesTo": null,
  "forwardTo": null,
  "id": "wwwwwwwwww",
  "location": "wwwwwww",
  "lockDuration": "0:05:00",
  "maxDeliveryCount": 10,
  ******* "maxSizeInMegabytes": 81920, ******* 
  "messageCount": 0,
  "name": "wwwwwwww",
  "requiresDuplicateDetection": false,
  "requiresSession": false,
  "resourceGroup": "wwwwwwwww",
  "sizeInBytes": 0,
  "status": "Active",
  "type": "Microsoft.ServiceBus/Namespaces/Queues",
  "updatedAt": "2021-02-19T19:07:33.340000+00:00"
}
fafg commented 3 years ago

Guys, the issue i believe is regarding the value and the python explode.

but I could understand my issue.

I have started create the command line to deploy a queue, and then wisely I went to the portal had a look over a existent one in order to extract the properties from the arm template.

the generated arm template shows me the MAX-SIZE as 16gb, therefore i have used this value on the command line (it explode using this value). but talking with a friend, the partitioning enabled when you deploy with 1gb the portal shows 16gb. then when we have a max size of 5gb and partition enabled we get 80gb as expected.

so, the issue then is the command that is exploding with values above 5gb and not showing a properly feedback message.

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl, @axisc.

Issue Details
{ "error": { "code": "OK", "message": "OK CorrelationId: ed2a6c29-0046-4145-9162-b012eeccba0f" }, "id": null, "name": null, "rights": null, "type": null } ### **This is autogenerated. Please review and update as needed.** ## Describe the bug **Command Name** `az servicebus queue create` **Errors:** ``` 'int' object is not iterable Traceback (most recent call last): python3.8/site-packages/knack/cli.py, ln 233, in invoke cmd_result = self.invocation.execute(args) cli/core/commands/__init__.py, ln 589, in execute parsed_args = self.parser.parse_args(args) ... 3.8/lib/python3.8/difflib.py, ln 311, in __chain_b for i, elt in enumerate(b): TypeError: 'int' object is not iterable ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `az servicebus queue create --resource-group {} --namespace-name {} --name {} --lock-duration {} --max-size {} --enable-duplicate-detection {} --enable-session {} --default-message-time-to-live {} --enable-dead-lettering-on-message-expiration {} --enable-batched-operations {} --duplicate-detection-history-time-window {} --max-delivery-count {} --status {} --auto-delete-on-idle {} --enable-partitioning {} --enable-express {}` ## Expected Behavior ## Environment Summary ``` macOS-11.1-x86_64-i386-64bit Python 3.8.7 Installer: HOMEBREW azure-cli 2.19.1 azure-cli-iot-ext 0.8.10 Extensions: azure-cli-iot-ext 0.8.10 azure-iot 0.10.7 aks-preview 0.4.70 azure-devops 0.18.0 application-insights 0.1.12 ``` ## Additional Context
Author: fafg
Assignees: -
Labels: `Error Handling`, `Service Attention`, `Service Bus`, `needs-triage`, `question`
Milestone: -
yungezz commented 3 years ago

route to appropriate team

Saglodha commented 2 years ago

@fafg- Thank you for bringing this to our attention. You're right about the total size to be addition of all partitions involved, I would work within the team to have an informative error message. I would keep you posted for additional updates.