You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not able to delete service offering from UI or API #9475
I was not able to delete a service offering, upon calling the deleteServiceOffering API, it would transition the offering to Inactive state -> same as with enable/disable UI button. I don't know if this has been like this historically or there was some behaviour change in recent releases. I could mark them as removed in the DB, then they won't show up in the offering UI.
@rohityadavcloud I don't find any API which marks the service offering's removed column. deleteServiceOffering API and updateServiceOffering (using state parameter) API are updating the column "State" with Active and Inactive values.
This was the behaviour even before also.
With the PR #8821 we have now new filter for Active and Inactive offerings which can also lists all types of offerings
Created two offerings and then deleted both the offerings from UI. Following are the screenshots for Active and Inactive offerings
Active offerings
Inactive offerings
After enabled one of the offerings, it came back to Active list
Please check and let me know if anything else I'm missing here, otherwise we can close the ticket.
Hi, I am using CloudStack 4.20. I encountered the same issue. According to the author of #8821, the delete command in the API will no longer actually delete the offering. Instead, it will set the state to inactive. (#8817 (comment))
So is there a way to actually delete the service offering? (I guess making SQL operations would work, but I don't think it's appropriate for administrators to touch the SQL databse directly.)
@li-liwen If I read the changes in #8821 correctly it only changes the behaviour of the update<Disk/Service>Offering commands. So you should still be able to call the deleteServiceOffering API, for instance using cmk.
cc @vishesh92 ??
@DaanHoogland Yes, I'm able to call the deleteServiceOffering API using cmk. But the API just makes the offering inactive instead of deleting it. I think this is probably the intended behavior, but I just would like to know if there's a way to actually delete the offerings.
@vishesh92 , we could implement the delete API in such a way that it does a check if th offering is used and if it is it 'only' disables it. If not used it would actually mark it as removed.
Inactive as a workaround is okay - if historically there never was a way to delete offerings in the UI or deleteServiceOffering API didn't work, let's close this.
Activity
weizhouapache commentedon Aug 1, 2024
this looks related to #8821
cc @vishesh92
harikrishna-patnala commentedon Aug 19, 2024
@rohityadavcloud I don't find any API which marks the service offering's removed column. deleteServiceOffering API and updateServiceOffering (using state parameter) API are updating the column "State" with Active and Inactive values.
This was the behaviour even before also.
With the PR #8821 we have now new filter for Active and Inactive offerings which can also lists all types of offerings
Created two offerings and then deleted both the offerings from UI. Following are the screenshots for Active and Inactive offerings
Active offerings

Inactive offerings

After enabled one of the offerings, it came back to Active list

Please check and let me know if anything else I'm missing here, otherwise we can close the ticket.
DaanHoogland commentedon Dec 10, 2024
@rohityadavcloud can you expand on this? #8821 claims to fix this in 4.19.1, but you reported this in this version.
li-liwen commentedon Feb 7, 2025
Hi, I am using CloudStack 4.20. I encountered the same issue. According to the author of #8821, the delete command in the API will no longer actually delete the offering. Instead, it will set the state to inactive. (#8817 (comment))
So is there a way to actually delete the service offering? (I guess making SQL operations would work, but I don't think it's appropriate for administrators to touch the SQL databse directly.)
DaanHoogland commentedon Feb 7, 2025
@li-liwen If I read the changes in #8821 correctly it only changes the behaviour of the update<Disk/Service>Offering commands. So you should still be able to call the deleteServiceOffering API, for instance using cmk.
cc @vishesh92 ??
li-liwen commentedon Feb 7, 2025
@DaanHoogland Yes, I'm able to call the deleteServiceOffering API using cmk. But the API just makes the offering inactive instead of deleting it. I think this is probably the intended behavior, but I just would like to know if there's a way to actually delete the offerings.
vishesh92 commentedon Feb 7, 2025
it's been some time, but AFAIR it's kind of complicated and would require a lot of changes.
DaanHoogland commentedon Feb 7, 2025
I think for now setting the
removedfield tonow()is the best workaround.vishesh92 commentedon Feb 7, 2025
Yes. This should work. But it can cause issues with operations for existing VMs. The user will have to ensure no VM is using the offering.
li-liwen commentedon Feb 8, 2025
I got it. Thanks for helping. I would just leave them inactive for now.
DaanHoogland commentedon Feb 9, 2025
@vishesh92 , we could implement the delete API in such a way that it does a check if th offering is used and if it is it 'only' disables it. If not used it would actually mark it as removed.
yadvr commentedon Mar 4, 2025
Inactive as a workaround is okay - if historically there never was a way to delete offerings in the UI or deleteServiceOffering API didn't work, let's close this.
DaanHoogland commentedon Mar 4, 2025
converting to discuss item as the resolution would only be the workaround.