Bug 1733934
| Summary: | [IPI on Azure]Can't set length of spec.storage.azure.accountname value is equal to 3. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | XiuJuan Wang <xiuwang> | ||||
| Component: | Image Registry | Assignee: | Oleg Bulatov <obulatov> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Wenjing Zheng <wzheng> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.2.0 | CC: | adam.kaplan, aos-bugs, obulatov, pweil | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | 4.6.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-10-27 15:54:19 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Can you please verify that you actually had an account with name "zhs" created on Azure? It doesn't look like you got a name length failure, it was an account not found failure. Yeah, No ’zhs‘ created on Azure. The length of value 4-24 have been created for account name. Closing as not a bug. We have message to announce 3 strings is vaild , however we can't create 3 strings for accountName. Shouldn't treat this as a issue? Are you able to create an account name with three characters on Azure to test with? According to your previous message, there was no "zhs" account on azure, hence the error that you recived about that account not existing. I could create a storage account with three chars manually on Azure. @Corey , IMO, this issue still is a problem, so I reopen it, feel free to correct me. Ok, I must not be understanding then. Could you please provide the steps that you are using to test this (in a good amount of detail) so I can try to figure out what I am missing here? Hi, Corey
Here is my reproduce steps,
1.install a ipi on azure cluster
2.Set spec.storage.azure.accountname with 3 chars.
$oc patch config.imageregistry.operator cluster -p '{"spec":{"storage":{"azure":{"accountName":"wab"}}}}' --type=merge
3.Check imageregistry config.
$oc describe config.imageregistry.operator.
The storage account with 3 chars can't be created automaticlly when others with 4-24 chars do.
Can't reproduce this issue with 4.2.0-0.nightly-2019-08-10-002649 payload. Could you help move this bug to on_qa, so I can verify it? Thanks Move to verified as comment #10. Corey, thanks~ Could reproduce the issue that can't set the length of spec.storage.azure.accountname value to 3 in 4.2.0-0.nightly-2019-09-10-235718 again.
Could handle the length 4:
$ oc describe config.image | grep Account -B2 -A2
Storage:
Azure:
Account Name: dudu
Container: qe-xiuwang-azure-911-j4rg2-test
Status:
--
Storage:
Azure:
Account Name: dudu
Container: qe-xiuwang-azure-911-j4rg2-test
Storage Managed: true
Will fail with the length 3, such as duo
$ oc describe config.image | grep Account -B2 -A2
Storage:
Azure:
Account Name: duo
Container: qe-xiuwang-azure-911-j4rg2-test
Status:
Conditions:
Last Transition Time: 2019-09-11T02:41:51Z
Message: Unable to get account primary key: failed to get keys for the storage account duo: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/duo' under resource group 'qe-xiuwang-azure-911-j4rg2-rg' was not found."
Reason: AzureError
Status: False
--
Type: Available
Last Transition Time: 2019-09-11T02:41:51Z
Message: Unable to apply resources: unable to sync storage configuration: failed to get keys for the storage account duo: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/duo' under resource group 'qe-xiuwang-azure-911-j4rg2-rg' was not found."
Reason: Error
Status: True
--
Storage:
Azure:
Account Name: dudu
Container: qe-xiuwang-azure-911-j4rg2-test
Storage Managed: true
Are you sure that the 3 letter long account name that you used exists? I believe that was the issue last time. "The Resource 'Microsoft.Storage/storageAccounts/duo' under resource group 'qe-xiuwang-azure-911-j4rg2-rg' was not found." @Corey, the 3 letter long account name does NOT exist which can't be created automaticlly, when name between 4-24 letters could be created automaticlly. So I treat it as a issue. See https://github.com/openshift/cluster-image-registry-operator/blob/master/pkg/storage/azure/azure.go#L118-L121 Moving low priority 4.x bugs to 4.4.0 $ oc describe config.image | grep Account -B2 -A2
Storage:
Azure:
Account Name: cil
Container: ci-ln-w8qjftb-002ac-ps5wx-image-registry-mwlfrdwkjebcvkmnevexd
Status:
--
--
Storage:
Azure:
Account Name: cil
Container: ci-ln-w8qjftb-002ac-ps5wx-image-registry-mwlfrdwkjebcvkmnevexd
Storage Managed: true
I tried to use the account name "cil", and the operator successfully created it. Can you still reproduce it?
@Oleg I still could reproduce this issue with 4.6.0-0.nightly-2020-07-23-033606 version.
Does your `cli` accountname exist before you set up it?
$oc describe config.image | grep Account -B2 -A2
Storage:
Azure:
Account Name: who
Cloud Name: AzurePublicCloud
Container: qeci-6585-7mphb-image-registry-rlelivtvbjcjgyfeiglgodleefcaicw
--
Type: NodeCADaemonControllerDegraded
Last Transition Time: 2020-07-23T10:22:01Z
Message: Unable to get account primary key: failed to get keys for the storage account who: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/who' under resource group 'qeci-6585-7mphb-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
Reason: AzureError
Status: False
--
Type: Available
Last Transition Time: 2020-07-23T10:22:01Z
Message: Unable to apply resources: unable to sync storage configuration: failed to get keys for the storage account who: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/who' under resource group 'qeci-6585-7mphb-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
Reason: Error
Status: True
--
Storage:
Azure:
Account Name: imageregistryqeci65l4wq4
Cloud Name: AzurePublicCloud
Container: qeci-6585-7mphb-image-registry-rlelivtvbjcjgyfeiglgodleefcaicw
=====================with 5 string account name======================
oc describe config.image | grep Account -B2 -A2
Storage:
Azure:
Account Name: whome
Cloud Name: AzurePublicCloud
Container: qeci-6585-7mphb-image-registry-rlelivtvbjcjgyfeiglgodleefcaicw
--
Storage:
Azure:
Account Name: whome
Cloud Name: AzurePublicCloud
Container: qeci-6585-7mphb-image-registry-rlelivtvbjcjgyfeiglgodleefcaicw
Created attachment 1713698 [details]
Not existing storage account
Oleg, thanks
After check from Azure Web Console , I got 'imd' name is not taken and cmd also shows same thing.
$host imd.blob.core.windows.net
Host imd.blob.core.windows.net not found: 3(NXDOMAIN)
Then the 3 letter account could be created after configured.
Storage:
Azure:
Account Name: imd
Cloud Name: AzurePublicCloud
Container: xiuwang46azure-lsttk-image-registry-xdjghmfmtrrkneappkvveyblbi
Management State: Managed
Storage Managed: true
Events: <none>
For improving the operator's error message for taken accounts, I will report a new bug.
Verified with 4.6.0-0.nightly-2020-09-02-210353 azure cluster.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196 |
Description of problem: When set length to 2, prompt message "alidation failed: parameter=accountName constraint=MinLength value="zh" details: value length must be greater than or equal to 3". But met 404 error when set length of spec.storage.azure.accountname value is equal to 3. Version-Release number of selected component (if applicable): 4.2.0-0.nightly-2019-07-28-222114 How reproducible: alwasy Steps to Reproduce: 1.Set length of spec.storage.azure.accountname value is equal to 3 2. 3. Actual results: Met error: Storage: Azure: Account Name: zhs Container: image-registry-test Status: Conditions: Last Transition Time: 2019-07-29T08:47:57Z Message: Unable to get account primary keys: failed to get keys for the storage account zhs: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/zhs' under resource group 'zhsun3-gzhhs-rg' was not found." Reason: AzureError Status: Unknown Type: StorageExists Expected results: Could set length of spec.storage.azure.accountname value between 3 and 24. Additional info: