Bug #12159
closedediting hosts with foreman_salt breaks
Description
Foreman is running and working and with foreman_salt. I can successfully import states and environments, manage minion-keys and run highstates on minions via theforeman interface (i.e. the foreman-proxy+salt). I can also upload highstate-reports and examine them within foreman.
But when i try to edit a host and submit the data, i get an 500 error:
"undefined method `build?' for nil:NilClass".
The data i enter into the form is:
###
Name: jessie-naked
Hostgroup: Webpack (a hostgroup i created)
Environment: production
Salt-Master: Salt-Master (my smart-proxy)
Salt-Environment: base
###
The full trace generated after hitting 'Submit' is attached to this report. To me it seems like some function/class is missing in
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman_salt-3.0.2/app/models/foreman_salt/concerns/orchestration/salt.rb
But i know nothing about ruby :-)
Core Info:
HOSTNAME: api.intern.domain.com
OS: debian
RELEASE: 8.2
FOREMAN: 1.9.2
RUBY: ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
PUPPET: 3.7.2
ruby-foreman-salt: 3.0.2-1
ruby-smart-proxy-salt: 2.1.5-1
Files
Updated by Dominic Cleal over 9 years ago
- Project changed from Foreman to Salt
- Subject changed from editing hosts with foreman_salt brakes to editing hosts with foreman_salt breaks
- Category set to Foreman Integration
Updated by Stephen Benjamin over 9 years ago
Editing works fine for me, "old" is a magic Rails thing that should be available.
If you want to change /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman_salt-3.0.2/app/models/foreman_salt/concerns/orchestration/salt.rb, you can update line 32 to say:
if old && old.build? && !build?
And restart foreman that'll fix it
Updated by Volker None over 9 years ago
And restart foreman that'll fix it
Works perfectly! Thank you being so fast :-)
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_salt/pull/50 added
- Pull request deleted (
)
Updated by Anonymous over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_salt|e1ce3ed3dcdb719fcc745904a844686d53056195.