Title: Disk offering doesn't change when resize operation is performed · Issue #8413 · apache/cloudstack · GitHub
Open Graph Title: Disk offering doesn't change when resize operation is performed · Issue #8413 · apache/cloudstack
X Title: Disk offering doesn't change when resize operation is performed · Issue #8413 · apache/cloudstack
Description: 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/a...
Open Graph Description: 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 p...
X Description: 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 ...
Opengraph URL: https://github.com/apache/cloudstack/issues/8413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Disk offering doesn't change when resize operation is performed","articleBody":"ISSUE TYPE\r\n\r\nBug/Enhancement/Improvement request/\r\n\r\nCOMPONENT NAME\r\n\r\nComponent: UI/API/Usage\r\n\r\nCLOUDSTACK VERSION\r\n\r\nCloudstack version 4.18\r\n\r\nSUMMARY\r\n\r\nDisk offering doesn't change when the resize operation is performed\r\n\r\nhttps://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html\r\n\r\nSteps to reproduce the issue\r\n\r\n1. Create a data disk with offering 5gb ( Small disk offering)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n2. Click on the Resize \r\n\r\nNavigate volume\u003e select the disk and click on Resize option \r\n\r\n\r\n\r\nor execute the resizeVolume api call \r\n\r\nhttps://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html\r\n\r\n\r\n3. Provide the new disk size let's say 10gb\r\n\r\n\r\n\r\n\r\n\r\n4. Cloudstack resizes the data disk to 10gb, successfully but doesn't change the disk offering to custom disk offering\r\n\r\n\r\n\r\n\r\n**Actual behavior**\r\n\r\n**According to docs**\r\n\r\nhttp://docs.cloudstack.apache.org/en/4.18.1.0/adminguide/storage.html?highlight=disk%20resize#resizing-volumes\r\n\r\nAdditionally, 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.\r\n\r\n\r\nEven for the resizevolume api call is disk offering id is not mandatory \r\n\r\nhttps://cloudstack.apache.org/api/apidocs-4.18/apis/resizeVolume.html\r\n\r\n\r\n---\r\n\r\n**Not changing the disk offering id could lead billing issue if the end user considers disk offering for billing** \r\n\r\n\r\n \r\nIf 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 \r\n\r\nUsage_event table\r\n\r\nThe offering_id=3 is not updated when a volume.resize is performed\r\n\r\nmysql\u003e use cloud;\r\n\r\n```\r\nmysql\u003e select * from usage_event where resource_id=41 \\G;\r\n*************************** 1. row ***************************\r\n id: 146\r\n type: VOLUME.CREATE\r\n account_id: 2\r\n created: 2023-12-28 05:19:12\r\n zone_id: 1\r\n resource_id: 41\r\nresource_name: ty\r\n offering_id: 3\r\n template_id: NULL\r\n size: 5368709120\r\nresource_type: NULL\r\n processed: 0\r\n virtual_size: NULL\r\n*************************** 2. row ***************************\r\n id: 147\r\n type: VOLUME.RESIZE\r\n account_id: 2\r\n created: 2023-12-28 05:19:29\r\n zone_id: 1\r\n resource_id: 41\r\nresource_name: ty\r\n offering_id: 3\r\n template_id: NULL\r\n size: 8589934592\r\nresource_type: NULL\r\n processed: 0\r\n virtual_size: NULL\r\n```\r\n \r\n \r\nmysql\u003e use cloud_usage;\r\n\r\n```\r\nmysql\u003eselect * from cloud_usage where usage_type=6\r\n\r\n\r\n id: 235\r\n zone_id: 1\r\n account_id: 2\r\n domain_id: 1\r\n description: Volume Id: 41 usage time (DiskOffering: 3)\r\n usage_display: 0.499999 Hrs\r\n usage_type: 6\r\n raw_usage: 0.49999913573265076\r\n vm_instance_id: NULL\r\n vm_name: NULL\r\n offering_id: 3\r\n template_id: NULL\r\n usage_id: 41\r\n type: NULL\r\n size: 8589934592\r\n network_id: NULL\r\n start_date: 2023-12-28 05:45:14\r\n end_date: 2023-12-28 06:15:14\r\n virtual_size: NULL\r\n cpu_speed: NULL\r\n cpu_cores: NULL\r\n memory: NULL\r\nquota_calculated: 0\r\n is_hidden: 0\r\n```\r\n```\r\n \r\nmysql\u003e select * from usage_volume where volume_id=41 \\G;\r\n*************************** 1. row ***************************\r\n id: 29\r\n volume_id: 41\r\n zone_id: 1\r\n account_id: 2\r\n domain_id: 1\r\ndisk_offering_id: 3\r\n template_id: NULL\r\n size: 5368709120\r\n created: 2023-12-28 05:19:12\r\n deleted: 2023-12-28 05:19:29\r\n*************************** 2. row ***************************\r\n id: 30\r\n volume_id: 41\r\n zone_id: 1\r\n account_id: 2\r\n domain_id: 1\r\ndisk_offering_id: 3\r\n template_id: NULL\r\n size: 8589934592\r\n created: 2023-12-28 05:19:29\r\n deleted: NULL\r\n2 rows in set (0.00 sec)\r\n```\r\n\r\n\r\n**Expected behavior**\r\n\r\n\r\nCloudstack should update the disk offering to custom disk offering in UI and the databases (Cloud and cloud_usag) \r\n\r\n\r\n```\r\nmysql\u003e select * from disk_offering where id=6 \\G;\r\n*************************** 1. row ***************************\r\n id: 6\r\n name: Custom\r\n uuid: 9cc36337-08a4-4b00-9360-22353fa3503f\r\n display_text: Custom Disk\r\n disk_size: 0\r\n tags: NULL\r\n recreatable: 0\r\n use_local_storage: 0\r\n unique_name: Cloud.Com-Custom\r\n customized: 1\r\n removed: NULL\r\n created: 2023-12-26 11:01:13\r\n sort_key: 0\r\n display_offering: 1\r\n customized_iops: NULL\r\n min_iops: NULL\r\n max_iops: NULL\r\n bytes_read_rate: NULL\r\n bytes_read_rate_max: NULL\r\n bytes_read_rate_max_length: NULL\r\n bytes_write_rate: NULL\r\n bytes_write_rate_max: NULL\r\nbytes_write_rate_max_length: NULL\r\n iops_read_rate: NULL\r\n iops_read_rate_max: NULL\r\n iops_read_rate_max_length: NULL\r\n iops_write_rate: NULL\r\n iops_write_rate_max: NULL\r\n iops_write_rate_max_length: NULL\r\n state: Active\r\n hv_ss_reserve: NULL\r\n cache_mode: NULL\r\n provisioning_type: thin\r\n disk_size_strictness: 0\r\n compute_only: 0\r\n encrypt: 0\r\n```\r\n \r\n","author":{"url":"https://github.com/kiranchavala","@type":"Person","name":"kiranchavala"},"datePublished":"2023-12-28T12:31:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/8413/cloudstack/issues/8413"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e0c7812-0a98-9aa1-69ce-d1fe8e78ab6a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7DE:2086C7:A6D8E54:EAA8616:6A50EDD6 |
| html-safe-nonce | b0911e0510b41aa5592cc4724207e7ee03a898a359bc03337e8be0267a353045 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0RFOjIwODZDNzpBNkQ4RTU0OkVBQTg2MTY6NkE1MEVERDYiLCJ2aXNpdG9yX2lkIjoiODU4NjQ0OTk0OTM3NzQ5MDM5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ef261968095f90f4258189006601b2866950081633ad4fddab3bfc5738d36128 |
| hovercard-subject-tag | issue:2058383160 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/8413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c587963802bfd1e0e65587a2dbf441b6705745f90cdf19329dc3a01f29b55dd2/apache/cloudstack/issues/8413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c587963802bfd1e0e65587a2dbf441b6705745f90cdf19329dc3a01f29b55dd2/apache/cloudstack/issues/8413 |
| og:image:alt | 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 p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kiranchavala |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5ec60191a48933536a90c8a19f47142fcd0d4739 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width