Skip to content

[Investigation] Templates/ISOs are not removed but marked as Inactive #4470

Closed

Description

@nvazquez

Probably not an issue, but worth investigating the reason why templates/ISOs are not deleted in database (the removed column stays NULL) after deleting a template/ISO. The ticket is raised after some doubts on the reviews of PR #4047

ISSUE TYPE
  • Other
COMPONENT NAME
API, templates, ISOs
CLOUDSTACK VERSION
All versions
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

Deleting a template/ISO does not actually remove it, but set it to Inactive and hidden

STEPS TO REPRODUCE
Remove a template/ISO
EXPECTED RESULTS
Template/ISO removed in database
ACTUAL RESULTS
Template/ISO state = 'Inactive' but removed column not changed

Activity

  1. added this to the 4.15.0.0 milestone on Nov 18, 2020
  2. yadvr commented on Nov 18, 2020

    @yadvr
    Member

    Cc @Spaceman1984 looks like GC issue, have you seen this or can you discuss with @nvazquez and investigate/fix?

  3. Spaceman1984 commented on Nov 19, 2020

    @Spaceman1984
    Contributor

    I'll take a look @rhtyd

  4. Spaceman1984 commented on Nov 23, 2020

    @Spaceman1984
    Contributor

    I'm not sure what the original problem was, I have traced the active/inactive fields to a commit in 2013. In the git log there is speak of some kind of problem that was solved from version 2.1.x to do with the removed column not being correctly used.

    Fixed the problem with offerings and templates.  These two items due to a previous patch all the way back in 2.1.x versions uses the removed column incorrectly.  No one fixed since then.  Hence, there's a bunch of findbyidincludingremoved calls in the cloudstack code around these two items.
    
    abbae2aa Alex Huang <alex.huang@citrix.com> on 2013/08/27 at 02:30
    
  5. DaanHoogland commented on Nov 25, 2020

    @DaanHoogland
    Contributor

    ok, this means we'll have to look for those find including removed calls and try to make sure the removed column is correctly filled at the correct moment. (future version for now)

  6. yadvr commented on Apr 22, 2021

    @yadvr
    Member

    Looks liked fixed in #4748
    @nvazquez can you check?

  7. modified the milestones: 4.16.0.0, 4.15.1.0 on Apr 22, 2021
  8. nvazquez commented on Apr 22, 2021

    @nvazquez
    ContributorAuthor

    Tested - fixed confirmed. Thanks @Pearl1594 @rhtyd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions