Project

General

Profile

Actions

Bug #17203

closed

hostgroups and salt breaks vmware integration

Added by Dinges XXX over 7 years ago. Updated over 7 years ago.

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

Description

Foreman version: 1.13.0
Salt plugin: 7.0.0

If I do the steps:
Hosts -> New Host -> Hostgroup: "some_hostgroup"
then the option "deploy to" gets greyed out, so i can't select my Virtual Center.

If I do the steps:
Hosts -> New Host -> Deploy to: "my virtual center"
Hostgroup: "some hostgroup"
then I get the notification that i MUST specify a mac-address. While this should not be given.

easy dirty ducktape fix:
change line 61 in file: /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-7.0.0/app/models/foreman_salt/concerns/host_managed_extensions.rb
from:
def set_hostgroup_defaults_with_salt_proxy
to
def set_hostgroup_defaults_with_salt_proxy(i_dont_care_about_this_boolean_what_does_it_even_do=true)


Related issues 1 (0 open1 closed)

Has duplicate Salt - Bug #17217: "/hosts/process_hostgroup" Action failed | ArgumentError: wrong number of arguments (1 for 0)Duplicate11/04/2016Actions
Actions #1

Updated by Anonymous over 7 years ago

  • Has duplicate Bug #17217: "/hosts/process_hostgroup" Action failed | ArgumentError: wrong number of arguments (1 for 0) added
Actions #2

Updated by Anonymous over 7 years ago

Could you please test on Foreman 1.13.x on top of foreman_salt 7.0.2: https://github.com/mmoll/foreman_salt/commit/0ab5e73.diff ?

Actions #3

Updated by Tom K. over 7 years ago

  • Priority changed from Normal to High

Still existing in 1.13.2

see my post in https://groups.google.com/forum/#!topic/foreman-users/La9t42lvK8E

2016-12-07 17:34:41 30b4a956 [app] [I] Started POST "/hosts/process_hostgroup" for 10.1.95.1 at 2016-12-07 17:34:41 +0100
2016-12-07 17:34:41 30b4a956 [app] [I] Processing by HostsController#process_hostgroup as */*
2016-12-07 17:34:41 30b4a956 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"faVHp1mkucx/YRzcva81KBMDDFf3L8FUJzQvAHpO+XFIHIOucjTtvHQ1junWN1h5P9gQYnbIJnHxoB5n5+M7Pw==", "host"=>{"salt_module_ids"=>[""], "name"=>"vmg-ffm-installtest003", "hostgroup_id"=>"2", "salt_environment_id"=>"", "salt_proxy_id"=>"", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"vmg-ffm-installtest003", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"", "provision_method"=>"build", "build"=>"1", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "fakepassword"=>"[FILTERED]", "bare_metal_capabilities"=>"build"}
2016-12-07 17:34:41 30b4a956 [app] [W] Action failed | ArgumentError: wrong number of arguments (1 for 0) | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-7.0.2/app/models/foreman_salt/concerns/host_managed_extensions.rb:61:in `set_hostgroup_defaults_with_salt_proxy' | /usr/share/foreman/app/controllers/hosts_controller.rb:655:in `process_hostgroup' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-7.0.2/app/controllers/foreman_salt/concerns/hosts_controller_extensions.rb:18:in `process_hostgroup_with_salt_modules' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call' | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'

Actions #4

Updated by Tom K. over 7 years ago

With the patch from https://github.com/mmoll/foreman_salt/commit/0ab5e73.diff
the first Steps under "Host" works. Preselection based on hostgroup works.

BUT: I can select any salt-states. Just the message "Please select a Salt environment first". Even also no predefined states inherit from hostgroup.

Furthermore my Interface settings are not updated. My selected Hostgroup should switch to a vmware/vsphere host. But the "interface" settings keeped Type "physical". Also the settings "deploy on" keep baremetal.

If i change after hostgroup selection manual from baremetal to vmware, the interface settings get updated.

But still no preselection for saltstates.

Actions #5

Updated by Anonymous over 7 years ago

  • Category set to Foreman Integration
  • Status changed from New to Closed
  • Assignee set to Anonymous

Tom, thanks for testing, I pushed the fix into the SALT-7.0 branch. The other issue you're seeing now is tracked under #17451 and has no solution currently.

Actions

Also available in: Atom PDF