Skip to content

Not able to delete service offering from UI or API #9475

Closed

Description

@yadvr

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.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
API, Service offerings
CLOUDSTACK VERSION
4.19.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Activity

  1. weizhouapache commented on Aug 1, 2024

    @weizhouapache
    Member

    this looks related to #8821

    cc @vishesh92

  2. added this to the 4.19.2.0 milestone on Aug 9, 2024
  3. harikrishna-patnala commented on Aug 19, 2024

    @harikrishna-patnala
    Member

    @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
    Screenshot 2024-08-19 at 3 57 01 PM

    Inactive offerings
    Screenshot 2024-08-19 at 3 57 09 PM

    After enabled one of the offerings, it came back to Active list
    Screenshot 2024-08-19 at 3 57 29 PM

    Please check and let me know if anything else I'm missing here, otherwise we can close the ticket.

  4. DaanHoogland commented on Dec 10, 2024

    @DaanHoogland
    Contributor

    @rohityadavcloud can you expand on this? #8821 claims to fix this in 4.19.1, but you reported this in this version.

  5. moved this from ready for Review to on Hold in Apache CloudStack BugFest - Issueson Jan 20, 2025
  6. li-liwen commented on Feb 7, 2025

    @li-liwen

    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.)

  7. DaanHoogland commented on Feb 7, 2025

    @DaanHoogland
    Contributor

    @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 ??

  8. li-liwen commented on Feb 7, 2025

    @li-liwen

    @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.

  9. vishesh92 commented on Feb 7, 2025

    @vishesh92
    Member

    it's been some time, but AFAIR it's kind of complicated and would require a lot of changes.

  10. DaanHoogland commented on Feb 7, 2025

    @DaanHoogland
    Contributor

    I think for now setting the removed field to now() is the best workaround.

  11. vishesh92 commented on Feb 7, 2025

    @vishesh92
    Member

    I think for now setting the removed field to now() is the best workaround.

    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.

  12. li-liwen commented on Feb 8, 2025

    @li-liwen

    I got it. Thanks for helping. I would just leave them inactive for now.

  13. modified the milestones: 4.19.2, unplanned on Feb 9, 2025
  14. DaanHoogland commented on Feb 9, 2025

    @DaanHoogland
    Contributor

    @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.

  15. yadvr commented on Mar 4, 2025

    @yadvr
    MemberAuthor

    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.

  16. DaanHoogland commented on Mar 4, 2025

    @DaanHoogland
    Contributor

    converting to discuss item as the resolution would only be the workaround.

  17. locked and limited conversation to collaborators on Mar 4, 2025
  18. converted this issue into a discussion #10498 on Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions