Repository navigation
New rootdisksize not set with Scale instance in 4.17.2 #7325
Copy link
Copy link
Closed
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.17.1 and 4.17.2
CONFIGURATION
Advanced networking with local storage. vmware 6.7.
OS / ENVIRONMENT
N/A
Service Offering used on the instance
{
"count": 1,
"serviceoffering": [
{
"cacheMode": "none",
"cpuspeed": 1600,
"created": "2022-11-16T08:21:16+0000",
"defaultuse": false,
"diskofferingstrictness": false,
"displaytext": "S-Packages",
"dynamicscalingenabled": true,
"hasannotations": false,
"id": "08f5f8fa-88d7-44c7-8ed5-7f06a6031888",
"iscustomized": true,
"issystem": false,
"isvolatile": false,
"limitcpuuse": false,
"name": "S-Packages",
"networkrate": 500,
"offerha": false,
"provisioningtype": "thin",
"rootdisksize": 0,
"serviceofferingdetails": {
"maxcpunumber": "8",
"maxmemory": "32768",
"mincpunumber": "1",
"minmemory": "512"
},
"storagetype": "local"
}
]
}
Virtualmachine
{
"count": 1,
"virtualmachine": [
{
"account": "emeaclient_16_49",
"affinitygroup": [],
"cpunumber": 1,
"cpuspeed": 1600,
"created": "2023-03-07T10:21:04+0000",
"details": {
"Message.ReservedCapacityFreed.Flag": "true",
"cpuNumber": "1",
"cpuOvercommitRatio": "2.0",
"cpuSpeed": "1600",
"dataDiskController": "osdefault",
"keyboard": "us",
"memory": "1024",
"memoryOvercommitRatio": "2.0",
"nicAdapter": "Vmxnet3",
"rootDiskController": "scsi",
"rootdisksize": "10"
},
"displayname": "Test-Scale-March-3",
"displayvm": true,
"domain": "cloud16",
"domainid": "793d17f0-30d3-46c1-adbf-657c4659a624",
"guestosid": "6428ffbd-1f58-11ec-b6e8-244bfeb8116f",
"haenable": false,
"hasannotations": false,
"hypervisor": "VMware",
"id": "a2b9aca8-4e67-4cb4-8526-e2507b8d3898",
"instancename": "i-74-1443-VM",
"isdynamicallyscalable": false,
"lastupdated": "2023-03-07T10:30:43+0000",
"memory": 1024,
"name": "VM-a2b9aca8-4e67-4cb4-8526-e2507b8d3898",
"nic": [
{
"broadcasturi": "vlan://untagged",
"deviceid": "0",
"extradhcpoption": [],
"gateway": "46.xx.xxx.49",
"id": "4e23f2be-ecc5-4793-8cbd-c3bc15920cd1",
"ipaddress": "46.xx.xxx.54",
"isdefault": true,
"isolationuri": "vlan://untagged",
"macaddress": "1e:00:cf:00:00:87",
"netmask": "255.255.255.240",
"networkid": "3f5fbbe4-fe38-42ae-af2d-01709d7a2e9c",
"networkname": "NL-01",
"secondaryip": [],
"traffictype": "Guest",
"type": "Shared"
}
],
"osdisplayname": "Other Linux (64-bit)",
"ostypeid": "6428ffbd-1f58-11ec-b6e8-244bfeb8116f",
"passwordenabled": true,
"pooltype": "VMFS",
"receivedbytes": 0,
"rootdeviceid": 0,
"rootdevicetype": "ROOT",
"securitygroup": [],
"sentbytes": 0,
"serviceofferingid": "08f5f8fa-88d7-44c7-8ed5-7f06a6031888",
"serviceofferingname": "S-Packages",
"state": "Stopped",
"tags": [
{
"account": "emeaclient_16_49",
"domain": "cloud16",
"domainid": "793d17f0-30d3-46c1-adbf-657c4659a624",
"key": "service_id",
"resourceid": "a2b9aca8-4e67-4cb4-8526-e2507b8d3898",
"resourcetype": "UserVm",
"value": "450"
},
{
"account": "emeaclient_16_49",
"domain": "cloud16",
"domainid": "793d17f0-30d3-46c1-adbf-657c4659a624",
"key": "service_type",
"resourceid": "a2b9aca8-4e67-4cb4-8526-e2507b8d3898",
"resourcetype": "UserVm",
"value": "S-2"
}
],
"templatedisplaytext": "RockyLinux-8",
"templateid": "be405fbf-9ca9-4b90-bf97-9806ebf75b7b",
"templatename": "RockyLinux-8",
"userid": "df0acf1e-52a2-4c4f-b4e6-535546cf6b12",
"username": "emeaclient_16_49",
"zoneid": "55f0123b-285c-4a70-8b34-565d8454393d",
"zonename": "NL-01"
}
]
}
SUMMARY
New value for “rootdisksize” parameter does not have any effect on the instance
STEPS TO REPRODUCE
scale virtualmachine id=a2b9aca8-4e67-4cb4-8526-e2507b8d3898 serviceofferingid=08f5f8fa-88d7-44c7-8ed5-7f06a6031888 details[0].cpuNumber=1 details[0].memory=1024 details[0].rootdisksize=25
EXPECTED RESULTS
New value for rootdisk to be set, and not ignored,
ACTUAL RESULTS
Only the CPU and Memory is scaled, rootdisksize is ignored without any error in the log.
GET apiKey=fXfTV81qwEJ_9WrhJYtYOXE3oPSLlEjfNZx2i9YLUMZD1Zw61_PySJv3ethOdvQUBIFrvMI6UYwQJZtvNNp-Eg&command=scaleVirtualMachine&details[0].cpuNumber=1&details[0].memory=1024&details[0].rootdisksize=25&id=a2b9aca8-4e67-4cb4-8526-e2507b8d3898&response=json&serviceofferingid=08f5f8fa-88d7-44c7-8ed5-7f06a6031888&signature=A1d99N328ZK2SbfDo%2FP74xMpPcU%3D
Activity
weizhouapache commentedon Mar 8, 2023
@ccycv
You scaled the vm to same custom service offering which has custom disk offering , right ?
ccycv commentedon Mar 8, 2023
I scale the VM with the same service offering. The VM was created only with root disk with the above service offering, no extra disk offering.
kiranchavala commentedon Mar 9, 2023
@ccycv
Did you check global setting "allow.diskoffering.change.during.scale.vm"
ccycv commentedon Mar 9, 2023
Yes, I only forgot to mention here.
"I have also changed the value to "true" for allow.diskoffering.change.during.scale.vm. The only difference is that I do not see any more the warning in the log "Changing the disk offering of the root volume during the compute offering change operation is disabled. Please check the setting [allow.diskoffering.change.during.scale.vm]""
kiranchavala commentedon Mar 9, 2023
@ccycv
I see that the "rootdisksize": 0, for the service offering id "08f5f8fa-88d7-44c7-8ed5-7f06a6031888"
Could you please create custom service offering with root disk say 20 gb and then try scaling of the vm
Ideally, resizeVolume api will be triggered as part for the scale virtual machine job
https://cloudstack.apache.org/api/apidocs-4.17/apis/resizeVolume.html
My lab Logs
Could you please send the management server logs ( /var/log/cloudstack/management/management-server.log )
weizhouapache commentedon Mar 9, 2023
@ccycv
what's the value in zone setting ?
ccycv commentedon Mar 9, 2023
"true" as I mentioned above.
ccycv commentedon Mar 9, 2023
Yes, it is with 0
Yes, it is with "0" because I want to set any rootdisksize at deploy, this is why "Disk offering strictness" is disabled. In this way I can scale the VM as I wish and resize the volume, but the volume not with scale...
And to answer to your question, this is what happens when I create a disk offering with 20 and use on this vm for scale.
ccycv commentedon Mar 9, 2023
everywhere is true. I did this check before. There is no error returned via API or in log with debug enabled.
ccycv commentedon Mar 9, 2023
@weizhouapache @kiranchavala
I have found additional info
"Volume Vol[1515|vm=1443|ROOT] is already having disk offering ebfec3b0-5685-4a0f-b5eb-175b754b3a64"
kiranchavala commentedon Mar 9, 2023
Hi @ccycv @weizhouapache
It could be a defect
I am not hitting the issue when i perform the following steps
Stop the vm
Create a new custom offering with root disk of 25gb

scale the vm to the new custom offering
Scaling was success the vm's root disk is 25gb
weizhouapache commentedon Mar 9, 2023
@ccycv
I think this explains: The disk offering of the service offering is not customized. You can use resizeVolume .
In additional to @kiranchavala 's testing, I have tested the following steps
Scaling CPU and/or Memory of VM with custom service offering. New disk offering stills the same. Skipping the Disk offering change on Volume 8501cd62-28b7-4042-bd24-dfcb7653c49a., which seems to be expected (see Fix #6263 Cannot scale VM with custom offering #6267)ccycv commentedon Mar 9, 2023
FYI. I tested with service offering which use a custom disk offering and not, the results are the same. The message I see in the log "Volume Vol[1515|vm=1443|ROOT] is already having disk offering ebfec3b0-5685-4a0f-b5eb-175b754b3a64" Is for the service offering which does not use any disk offering, and this disk offering "ebfec3b0-5685-4a0f-b5eb-175b754b3a64"does not exist.
kiranchavala commentedon Mar 9, 2023
hi @ccycv
I also got the same message as @weizhouapache
Stop the vm
Scale the vm to the same cutom offering but mention the new disk size of 25 gb
ccycv commentedon Mar 9, 2023
Right, this is correct. This is how it should work? or it is a bug? Yes, I know that I can resize the volume separately, but this requires an extra API call. Because i'm doing all these via API, I must list the volume to get the ID of it and then resize, instead just doing via scale.
1 remaining item
harikrishna-patnala commentedon Mar 10, 2023
I see an issue here, in any case if linked diskoffering is custom then it should consider the new size while changing the compute offering.
weizhouapache commentedon Mar 10, 2023
@harikrishna-patnala
did you mean the check in #6267 is wrong ? (I personally agree..)
harikrishna-patnala commentedon Mar 10, 2023
Yes @weizhouapache , we can skip only in the case having same non-custom diskofferings
weizhouapache commentedon Mar 10, 2023
great we reache a consensus. @harikrishna-patnala @kiranchavala
I have marked this as bug and added it to 4.18.1.0 milestone.
shwstppr commentedon Apr 6, 2023
Fixed with #7359
@ccycv you may test the latest nightly