Bug 1322272 - undefined method `fulltree_arranged' for nil:NilClass [vm_infra/pre_prov]
Summary: undefined method `fulltree_arranged' for nil:NilClass [vm_infra/pre_prov]
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Adam Grare
QA Contact: Pavol Kotvan
URL:
Whiteboard: ui:provision
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-30 07:51 UTC by Pavol Kotvan
Modified: 2016-05-12 09:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 09:48:13 UTC
Category: Bug
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Comment 3 Harpreet Kataria 2016-03-31 19:58:08 UTC
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

Comment 5 Harpreet Kataria 2016-04-01 13:23:19 UTC
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

Comment 6 Greg McCullough 2016-04-01 14:04:53 UTC
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.

Comment 7 Adam Grare 2016-05-02 14:00:38 UTC
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


Note You need to log in before you can comment on or make changes to this bug.