Bug #24151
closedProvisioning a new host with bond interface without domain and subnet failed with undefined method `vlanid' for nil:NilClass
Description
Provisioning a new host with bond interface without domain and subnet failed with undefined method `vlanid' for nil:NilClass
Error when we try to render the Provisioning template:
"There was an error rendering the Satellite Kickstart Default template: ERF42-7327 [Foreman::Exception]: The snippet 'kickstart_ifcfg_generic_interface' threw an error: undefined method `vlanid' for nil:NilClass"
Foreman production log trace:
~~~
2018-07-03 05:39:40 0f1f8e82 [app] [W] Error rendering the Satellite Kickstart Default template
| Foreman::Exception: ERF42-7327 [Foreman::Exception]: The snippet 'kickstart_ifcfg_generic_interface' threw an error: undefined method `vlanid' for nil:NilClass
| /usr/share/foreman/app/models/nic/interface.rb:26:in `vlanid'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/jail.rb:31:in `method_missing'
| kickstart_ifcfg_generic_interface:116:in `bind'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
| /usr/share/foreman/lib/foreman/renderer.rb:56:in `render_safe'
| /usr/share/foreman/lib/foreman/renderer.rb:175:in `unattended_render'
| /usr/share/foreman/lib/foreman/renderer.rb:121:in `snippet'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
| kickstart_ifcfg_bond_interface:52:in `bind'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
| /usr/share/foreman/lib/foreman/renderer.rb:56:in `render_safe'
| /usr/share/foreman/lib/foreman/renderer.rb:175:in `unattended_render'
| /usr/share/foreman/lib/foreman/renderer.rb:121:in `snippet'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
| kickstart_networking_setup:58:in `block in bind'
| /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
| /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
| /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/jail.rb:31:in `method_missing'
| kickstart_networking_setup:53:in `bind'
~~~
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5766 added
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/community-templates/pull/492 added
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset community-templates|3474f70ad8f032bad0583420dd53e5c2cc7d470b.