Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error "value of storage_account_type must be one of: Standard_LRS, StandardSSD_LRS, Premium_LRS, UltraSSD_LRS, got: Premium_ZRS" while adding a new disk on the azure cloud #1108

Closed
Sayalijoshi25 opened this issue Mar 13, 2023 · 1 comment
Labels
medium_priority Medium priority not a bug Not a bug work in In trying to solve, or in working with contributors

Comments

@Sayalijoshi25
Copy link

Sayalijoshi25 commented Mar 13, 2023

SUMMARY

While executing the playbook for adding a new disk on the azure cloud facing an issue to select storage_account_type as Standard_ZRS.

The storage_account_type parameter for os- and data disks restricts Standard_ZRS.

ERROR: "msg": "value of storage_account_type must be one of: Standard_LRS, StandardSSD_LRS, Premium_LRS, UltraSSD_LRS, got: Premium_ZRS"

- Bug Report

##### COMPONENT NAME
Azure.azcollection.azure_rm_manageddisk module

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible [core 2.14.0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.13 (main, Nov  9 2022, 13:16:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True

```

##### COLLECTION VERSION
-->
```
Collection         Version
------------------ -------
azure.azcollection 1.14.0 
```

##### CONFIGURATION
```
CONFIG_FILE() = /etc/ansible/ansible.cfg

```

```
- name: Using Azure collection
  hosts: localhost
  connection: local
  collections:
     - azure.azcollection

  tasks:
       - azure_rm_manageddisk:
          name: '{{ diskname }}'
          location: West Europe
          resource_group: '{{ resource_group }}'
          disk_size_gb: '{{ disk_size }}'
          storage_account_type: '{{ storage_account_type }}
#          zones: "{{result.response[0].zones }}"
          zone: '{{ zone_id }}'
```

##### EXPECTED RESULTS

Compared to the latest code: 

https://github.com/ansible-collections/azure/blob/dev/plugins/modules/azure_rm_manageddisk.py#LL344C61-L344C61 the  "Standard_ZRS " should be added to the choices. 

Error:

ASK [azure_rm_manageddisk] ****************************************************
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: awx
<localhost> EXEC /bin/sh -c 'echo ~awx && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/lib/awx/.ansible/tmp `"&& mkdir "` echo /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772 `" && echo ansible-tmp-1676546468.1-95-259407108835772="` echo /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772 `" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/azure/azure_rm_manageddisk.py
<localhost> PUT /var/lib/awx/.ansible/tmp/ansible-local-3tY5VGA/tmp3hnRo3 TO /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772/AnsiballZ_azure_rm_manageddisk.py
<localhost> EXEC /bin/sh -c 'chmod u+x /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772/ /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772/AnsiballZ_azure_rm_manageddisk.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python2 /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772/AnsiballZ_azure_rm_manageddisk.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /var/lib/awx/.ansible/tmp/ansible-tmp-1676546468.1-95-259407108835772/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "api_profile": "latest", 
            "append_tags": true, 
            "cloud_environment": "AzureCloud", 
            "disk_size_gb": 16, 
            "location": "West Europe", 
            "name": "smc8354_datadisk02", 
            "resource_group": "RG-PILOT-QAS", 
            "state": "present", 
            "storage_account_type": "Standard_ZRS", 
            "zone": "1"
        }
    }, 
    "msg": "value of storage_account_type must be one of: Standard_LRS, StandardSSD_LRS, Premium_LRS, UltraSSD_LRS, got: Premium_ZRS"
}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

```
@Fred-sun Fred-sun added medium_priority Medium priority not a bug Not a bug work in In trying to solve, or in working with contributors labels Mar 20, 2023
@Fred-sun
Copy link
Collaborator

@Sayalijoshi25 'Premium_ZRS' has been released to v1.14.0, v1.15.0, and you should not have updated this file. Please refer to PR #855. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority not a bug Not a bug work in In trying to solve, or in working with contributors
Projects
None yet
Development

No branches or pull requests

2 participants