Project

General

Profile

Actions

Bug #12159

closed

editing hosts with foreman_salt breaks

Added by Volker None over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Foreman Integration
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

foreman_debug_trace.log foreman_debug_trace.log 20.6 KB Volker None, 10/14/2015 06:17 AM
Actions #1

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
Actions #2

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

Actions #3

Updated by Volker None over 9 years ago

And restart foreman that'll fix it

Works perfectly! Thank you being so fast :-)

Actions #4

Updated by Volker None over 9 years ago

*for

Actions #5

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 ()
Actions #6

Updated by Anonymous over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF