You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "kiranchavala (via GitHub)" <gi...@apache.org> on 2023/12/28 12:31:37 UTC
[I] Disk offering doesn't change when resize operation is performed [cloudstack]
kiranchavala opened a new issue, #8413:
URL: https://github.com/apache/cloudstack/issues/8413
ISSUE TYPE
Bug/Enhancement/Improvement request/
COMPONENT NAME
Component: UI/API/Usage
CLOUDSTACK VERSION
Cloudstack version 4.18
SUMMARY
Disk offering doesn't change when the resize operation is performed
https://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html
Steps to reproduce the issue
1. Create a data disk with offering 5gb ( Small disk offering)


2. Click on the Resize
Navigate volume> select the disk and click on Resize option

or execute the resizeVolume api call
https://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html
3. Provide the new disk size let's say 10gb

4. Cloudstack resizes the data disk to 10gb, successfully but doesn't change the disk offering to custom disk offering

**Actual behavior**
**According to docs**
http://docs.cloudstack.apache.org/en/4.18.1.0/adminguide/storage.html?highlight=disk%20resize#resizing-volumes
Additionally, using the resizeVolume API, a data volume can be moved from a static disk offering to a custom disk offering with the size specified. This functionality allows those who might be billing by certain volume sizes or disk offerings to stick to that model, while providing the flexibility to migrate to whatever custom size is necessary.
Even for the resizevolume api call is disk offering id is not mandatory
https://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html
---
**Not changing the disk offering id could lead billing issue if the end user considers disk offering for billing**
If we take a look at the Database entries the offering id remains the same even after the resize is done, ideally it should change to a custom disk offering
Usage_event table
The offering_id=3 is not updated when a volume.resize is performed
mysql> use cloud;
```
mysql> select * from usage_event where resource_id=41 \G;
*************************** 1. row ***************************
id: 146
type: VOLUME.CREATE
account_id: 2
created: 2023-12-28 05:19:12
zone_id: 1
resource_id: 41
resource_name: ty
offering_id: 3
template_id: NULL
size: 5368709120
resource_type: NULL
processed: 0
virtual_size: NULL
*************************** 2. row ***************************
id: 147
type: VOLUME.RESIZE
account_id: 2
created: 2023-12-28 05:19:29
zone_id: 1
resource_id: 41
resource_name: ty
offering_id: 3
template_id: NULL
size: 8589934592
resource_type: NULL
processed: 0
virtual_size: NULL
```
mysql> use cloud_usage;
```
mysql>select * from cloud_usage where usage_type=6
id: 235
zone_id: 1
account_id: 2
domain_id: 1
description: Volume Id: 41 usage time (DiskOffering: 3)
usage_display: 0.499999 Hrs
usage_type: 6
raw_usage: 0.49999913573265076
vm_instance_id: NULL
vm_name: NULL
offering_id: 3
template_id: NULL
usage_id: 41
type: NULL
size: 8589934592
network_id: NULL
start_date: 2023-12-28 05:45:14
end_date: 2023-12-28 06:15:14
virtual_size: NULL
cpu_speed: NULL
cpu_cores: NULL
memory: NULL
quota_calculated: 0
is_hidden: 0
```
```
mysql> select * from usage_volume where volume_id=41 \G;
*************************** 1. row ***************************
id: 29
volume_id: 41
zone_id: 1
account_id: 2
domain_id: 1
disk_offering_id: 3
template_id: NULL
size: 5368709120
created: 2023-12-28 05:19:12
deleted: 2023-12-28 05:19:29
*************************** 2. row ***************************
id: 30
volume_id: 41
zone_id: 1
account_id: 2
domain_id: 1
disk_offering_id: 3
template_id: NULL
size: 8589934592
created: 2023-12-28 05:19:29
deleted: NULL
2 rows in set (0.00 sec)
```
**Expected behavior**
Cloudstack should update the disk offering to custom disk offering in UI and the databases (Cloud and cloud_usag)
```
mysql> select * from disk_offering where id=6 \G;
*************************** 1. row ***************************
id: 6
name: Custom
uuid: 9cc36337-08a4-4b00-9360-22353fa3503f
display_text: Custom Disk
disk_size: 0
tags: NULL
recreatable: 0
use_local_storage: 0
unique_name: Cloud.Com-Custom
customized: 1
removed: NULL
created: 2023-12-26 11:01:13
sort_key: 0
display_offering: 1
customized_iops: NULL
min_iops: NULL
max_iops: NULL
bytes_read_rate: NULL
bytes_read_rate_max: NULL
bytes_read_rate_max_length: NULL
bytes_write_rate: NULL
bytes_write_rate_max: NULL
bytes_write_rate_max_length: NULL
iops_read_rate: NULL
iops_read_rate_max: NULL
iops_read_rate_max_length: NULL
iops_write_rate: NULL
iops_write_rate_max: NULL
iops_write_rate_max_length: NULL
state: Active
hv_ss_reserve: NULL
cache_mode: NULL
provisioning_type: thin
disk_size_strictness: 0
compute_only: 0
encrypt: 0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2157553757
as far as I know, `size` is just a property of `disk offering`.
`disk offering` has other properties, for instance, storage type, QoS, service offering, etc.
I think the disk offering id should not be changed to the id of customized disk offering.
@kiranchavala do you know if there is any issues caused by it ?
cc @kiranchavala @DaanHoogland @sureshanaparti
what's your opinion ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed issue #8413: Disk offering doesn't change when resize operation is performed
URL: https://github.com/apache/cloudstack/issues/8413
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2160537935
@weizhouapache Agree with you this is not a bug, probably we only need to update the document what Kiran is pointing out !!!
Regarding the removal of selection of diskoffering on resize form is to make only single point to change the diskoffering using changeOfferingForVolume. There is an action icon for changing the offering.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2159931442
> > as far as I know, `size` is just a property of `disk offering`. `disk offering` has other properties, for instance, storage type, QoS, service offering, etc. I think the disk offering id should not be changed to the id of customized disk offering. @kiranchavala do you know if there is any issues caused by it ?
>
> If changing disk size is allowed, this also must have been a property of the diskoffering. If it is not allowed in the offering and it succeeds anyway, i think this is a bug.

but it is not mentioned in @kiranchavala 's description
> Disks can also be changed by changing the offering, but I am not sure what the effects of that are. I agree that offering should not implicitly change on resize, only explicitly, if the user asks so.
yes @DaanHoogland
I think this is not a bug.
since resizeVolume API supports diskofferingid parameter, it could be a UI improvement to specify disk offering when resize a volume.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2160550268
> @weizhouapache Agree with you this is not a bug, probably we only need to update the document what Kiran is pointing out !!!
>
> Regarding the removal of selection of diskoffering on resize form, it is to make only single point to change the diskoffering using changeOfferingForVolume. There is an action icon for changing the offering.
cool, thanks a lot @harikrishna-patnala
@kiranchavala @DaanHoogland
let's close this if there is no objections ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2160308378
the disk offering selection was present before.
it has been removed in #5008
@harikrishna-patnala do you remember why it is removed ? thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2159913907
> as far as I know, `size` is just a property of `disk offering`. `disk offering` has other properties, for instance, storage type, QoS, service offering, etc. I think the disk offering id should not be changed to the id of customized disk offering. @kiranchavala do you know if there is any issues caused by it ?
If changing disk size is allowed, this also must have been a property of the diskoffering. If it is not allowed in the offering and it succeeds anyway, i think this is a bug. Disks can also be changed by changing the offering, but I am not sure what the effects of that are. I agree that offering should not implicitly change on resize, only explicitly, if the user asks so.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-2162436790
closing
@kiranchavala
as Hari mentioned, please use `changeOfferingForVolume` to change the disk offering of volume
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Disk offering doesn't change when resize operation is performed [cloudstack]
Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on issue #8413:
URL: https://github.com/apache/cloudstack/issues/8413#issuecomment-1871124341
There is no issue observed if change offeringfor volume is performed
https://cloudstack.apache.org/api/apidocs-4.18/apis/changeOfferingForVolume.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org