Hide Forgot
Pavol, I am curious to find out how did you delete Provider that the templates in question belong to, did you delete the provider from CFME UI? Also can you provide access to the appliance where i can see this issue. Thanks, ~Harpreet
Greg, It looks like when a provider is deleted from db, it didnt update ems_id column for VM records, VMs that do not belong to a provider should not be returned by eligible_for_provisioning method https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_template.rb#L28, that's being called to display pre provisioning list for user to select a template. I downloaded a db in question from appliance and confirmed that ems_id column is still populated for the VM records whereas there are no providers in the db. Let me know if you have questions or need a copy of the database. Thanks, ~Harpreet
Sending to Provider group. The eligible_for_provisioning method relies on the vms.ems_id being nil excluded templates from the list. In my tests this value is properly nullified when the provider is removed so it is unclear why it did not happen in this instance. https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_template.rb#L29 Other VmOrTemplate methods like archived? and orphaned? also rely on the nil ems_id. Therefore the issue here is understanding why that column is not being reset.
Pavol, I also tested this and see the ems_id cleared properly, do you have logs from when this happened and/or are you able to reproduce it? Thanks, Adam