Bug 1716847
Summary: | service template update with REST API result undefined method `key?' for nil:NilClass | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Gellert Kis <gekis> | |
Component: | Automate | Assignee: | drew uhlmann <duhlmann> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Parthvi Vala <pvala> | |
Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | |
Priority: | high | |||
Version: | 5.10.4 | CC: | bilwei, duhlmann, gmccullo, jocarter, mfeifer, mkanoor, mshriver, obarenbo, pvala, simaishi, tfitzger, yrudman | |
Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
Target Release: | 5.11.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | 5.11.0.16 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1732117 (view as bug list) | Environment: |
tested in both with 5.10.0.33 and 5.10.4.3
|
|
Last Closed: | 2019-12-13 14:54:53 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | Bug | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | CFME Core | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1732117 |
Comment 2
Gellert Kis
2019-06-04 11:34:20 UTC
Hey Bill, GM said that https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template_ansible_playbook.rb#L139 is supposed to have all the options from the angular UI that it needs to be able to successfully do this service template update. ServiceTemplate.last.update_catalog_item({:name=>"Updated Service Name", :description=>"Updated Service Description"}, User.first) NoMethodError: undefined method `key?' for nil:NilClass from /var/www/miq/vmdb/app/models/service_template_ansible_playbook.rb:118:in `validate_config_info' from /var/www/miq/vmdb/app/models/service_template_ansible_playbook.rb:227:in `validate_update_config_info' from /var/www/miq/vmdb/app/models/service_template_ansible_playbook.rb:139:in `update_catalog_item' I don't know anything about this, could you please tell me how it's supposed to work? We should by pass the validation and update of config_info unless it presents. Please follow the same pattern in ServiceTemplateAnsibleTower to create a fix. Per https://github.com/ManageIQ/manageiq/commit/a8947bca9cf190989a365d9eee38aafc23934683 though I think this should, rather than Bill's suggestion, look more like the code in that PR at app/models/service_template_ansible_tower.rb because I think we support update without config_info. Meeeeeee. Sorry, so busy. Here's the issue I'm having. https://github.com/ManageIQ/manageiq/commit/a8947bca9cf190989a365d9eee38aafc23934683#diff-6e711c8868f44a0279bbeb7815bf8135R230 means we at one point thought you could run an update without config_info being present. Bill's comment makes me think that that shouldn't be the case and I don't know what the right thing to do here is. Tina, I don't know what to do here. Drew your example is a spec for ServiceTemplate. As mentioned earlier the fix is to follow the example of https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template_ansible_tower.rb#L76. The fix should be made in class ServiceTemplateAnsiblePlaybook. Bill, we pass options in here: https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template_ansible_playbook.rb#L226 and then never use them. I know which file needs the change you're talking about. But that method looks like it's doing the wrong thing anyway at the moment. I put in the link to the spec to service template because that's what the service template ansible playbook is calling when it calls super: https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template_ansible_playbook.rb#L227 solved through https://github.com/ManageIQ/manageiq/pull/18981 It means I'm working on it right now. FIXED. Verified on 5.11.0.16.20190724210259_2b4aa51. |