Azure / Azure/azure-rest-api-specs
[BUG] Extending SQLVM with additional data disks not working as expected
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2023-10-01
### API Spec version
2023-10-01
### Describe the bug
With an existing sql vm with the following storage configuration:
```
"storageConfigurationSettings": {
"diskConfigurationType": "NEW",
"sqlDataSettings": {
"defaultFilePath": "F:\\SQLData",
"luns": [
0
]
},
"sqlLogSettings": {
"defaultFilePath": "F:\\SQLLog",
"luns": [
0
]
},
"sqlSystemDbOnDataDisk": false,
"sqlTempDbSettings": {
"dataFileCount": 8,
"dataFileSize": 256,
"dataGrowth": 512,
"defaultFilePath": "F:\\SQLTemp",
"logFileSize": 512,
"logGrowth": 512,
"luns": [
0
]
},
"storageWorkloadType": "OLTP"
},
```
When the following PUT request is sent containing the following storage configuration, we get an error that only one disk can be extended at a time:
```
"storageConfigurationSettings": {
"diskConfigurationType": "EXTEND",
"sqlDataSettings": {
"defaultFilePath": "F:\\SQLData",
"luns": [
1
]
},
"sqlLogSettings": {
"defaultFilePath": "F:\\SQLLog",
"luns": [
0
]
},
"sqlSystemDbOnDataDisk": false,
"sqlTempDbSettings": {
"dataFileCount": 8,
"dataFileSize": 256,
"dataGrowth": 512,
"defaultFilePath": "F:\\SQLTemp",
"logFileSize": 512,
"logGrowth": 512,
"luns": [
0
]
},
"storageWorkloadType": "OLTP"
},
```
When sqlTempDbSettings and sqlLogSettings are omitted from the request, we get an error stating "Original Error: Code="InvalidArgument" Message="Invalid argument 'DefaultFilePath'.".
When sqlTempDbSettings, sqlLogSettings and sqlDataSettings.DefaultFilePath are omitted from the PUT request, the extension happens successfully, however in a subsequent GET request our storage configuration now looks like:
```
"storageConfigurationSettings": {
"sqlDataSettings": {
"luns": [
1
]
},
"sqlLogSettings": {},
"sqlTempDbSettings": {},
"sqlSystemDbOnDataDisk": false,
"diskConfigurationType": "EXTEND"
},
```
### Expected behavior
Expect to be able to extend data disk and maintain existing storage configuration
### Actual behavior
Existing storage configuration must be omitted from the request and cannot be retrieved from subsequent GETs
### Reproduction Steps
1. Create an SQLVM with storage configuration
2. Send a PUT request with additional data disk
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.