Git Product home page Git Product logo

Comments (11)

domcleal avatar domcleal commented on August 12, 2024

Hi,
since 1.11.0 most of informations gone in the foreman_hooks. Before we had:

{"host":{"ip":"10.15.254.5","environment_id":null,"environment_name":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"spibund.local","architecture_id":2,"architecture_name":"x86_64","operatingsystem_id":2,"operatingsystem_name":"RHEL 7.2","subnet_id":2,"subnet_name":"MGMT-Soft","sp_subnet_id":null,"ptable_id":122,"ptable_name":"RedHat-Default","medium_id":16,"medium_name":"RHEL-7","build":true,"comment":"","disk":"","installed_at":null,"model_id":null,"model_name":null,"hostgroup_id":18,"hostgroup_name":"TEST-MGMT-QS-Linux","owner_id":8,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":true,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":4,"compute_resource_name":"LYO","compute_profile_id":36,"compute_profile_name":"TEST-MGMT-QS-Linux","capabilities":["build","image"],"provision_method":"build","puppet_proxy_id":null,"certname":"linux01.domain.local","image_id":null,"image_name":null,"created_at":null,"updated_at":null,"last_compile":null,"global_status":0,"global_status_label":"OK","puppet_status":0,"build_status":1,"build_status_label":"Pending installation","name":"linux01.domain.local","id":null,"parameters":[],"interfaces":[{"id":null,"name":"linux01.domain.local","ip":"10.15.254.5","mac":null,"identifier":"","primary":true,"provision":true,"type":"interface"}],"puppetclasses":[],"config_groups":[],"all_parameters":[{"id":46,"name":"WINDOMAINFULL","value":"DOMAIN.LOCAL"},{"id":44,"name":"WINDOMAIN","value":"DOMAIN"},{"id":40,"name":"MAILRELAY","value":"mail.domain.local"},{"id":42,"name":"MAILDOMAIN","value":"domain.de"}],"all_puppetclasses":[]}}

now there is only:

{"host":{"id":null,"name":"linux01.domain.local","last_compile":null,"last_report":null,"updated_at":null,"created_at":null,"root_pass":"xyz","architecture_id":2,"operatingsystem_id":4,"environment_id":null,"ptable_id":124,"medium_id":18,"build":true,"comment":"bla","disk":"","installed_at":null,"model_id":null,"hostgroup_id":12,"owner_id":18,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":true,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":4,"puppet_proxy_id":null,"certname":"linux01.domain.local","image_id":null,"organization_id":null,"location_id":null,"otp":null,"realm_id":null,"compute_profile_id":34,"provision_method":"build","grub_pass":"","global_status":0,"lookup_value_matcher":"fqdn=linux01.domain.local"}}

from foreman_hooks.

gzuki avatar gzuki commented on August 12, 2024

Hi,
thank you for moving. Any idea about that issue?

from foreman_hooks.

mleklund avatar mleklund commented on August 12, 2024

This one is also biting me. We use data such as subnet_name, and location_name to orchestrate some other things that are not directly controlled by foreman.

Though I guess that most of that could be had from the ids, but I didn't really want to connect to postgres, or the API to get that info.

from foreman_hooks.

sasskinn12 avatar sasskinn12 commented on August 12, 2024

Yes, we have exactly same problem, we are using host: parameters in hooks and now after upgrade to 1.11.x they are not forwarded to hooks anymore :( Can somebody fix that?

from foreman_hooks.

depatl avatar depatl commented on August 12, 2024

Joining this request. we are using host_parameters_attributes to orchestrate BMC configuration prior the host creation.

from foreman_hooks.

lzap avatar lzap commented on August 12, 2024

It looks like MAC address is not available in after_build hook as well, which prevents the UEFI TFTP workaround in Satellite 6.2. Could ae46f24 cause this (comparison of string vs constant)?

from foreman_hooks.

lzap avatar lzap commented on August 12, 2024

I am getting

2016-05-10T13:07:19 [sql] [D] Running hook: /home/lzap/work/foreman/config/hooks/host/managed/create/00_test.sh create fake10c469.local.lan
2016-05-10T13:07:19 [sql] [W] Unable to render fake10c469.local.lan (Host::Managed) using RABL: undefined method `facets_with_definitions' for nil:NilClass
2016-05-10T13:07:19 [sql] [D] /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl/engine.rb:419:in `instance_eval'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl/engine.rb:419:in `instance_eval'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl/engine.rb:419:in `eval_source'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl/engine.rb:35:in `apply'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl/renderer.rb:54:in `render'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rabl-0.12.0/lib/rabl.rb:77:in `render'
 | /home/lzap/work/foreman_hooks/lib/foreman_hooks/util.rb:21:in `render_hook_json'
 | /home/lzap/work/foreman_hooks/lib/foreman_hooks/util.rb:32:in `block in exec_hook'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.10.5/lib/bundler.rb:245:in `block in with_clean_env'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.10.5/lib/bundler.rb:232:in `with_original_env'
 | /home/lzap/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.10.5/lib/bundler.rb:238:in `with_clean_env'
 | /home/lzap/work/foreman_hooks/lib/foreman_hooks/util.rb:32:in `exec_hook'
 | /home/lzap/work/foreman_hooks/lib/foreman_hooks/orchestration_hook.rb:56:in `hook_execute_set'
 | /home/lzap/work/foreman/app/models/concerns/orchestration.rb:162:in `execute'
 | /home/lzap/work/foreman/app/models/concerns/orchestration.rb:107:in `block in process'
 | /home/lzap/work/foreman/app/models/concerns/orchestration.rb:99:in `each'
 | /home/lzap/work/foreman/app/models/concerns/orchestration.rb:99:in `process'
 | /home/lzap/work/foreman/app/models/concerns/orchestration.rb:35:in `on_save'

Investigating.

from foreman_hooks.

lzap avatar lzap commented on August 12, 2024

Found it, RABL issue, reported here: http://projects.theforeman.org/issues/14981

from foreman_hooks.

lzap avatar lzap commented on August 12, 2024

The issue was NOT fully fixed, it was only fixed when creating hosts via API. When using UI another error message appears:

Unable to render fake-fdafsd.vlan98.coe.muc.redhat.com (Host::Managed) using RABL: Cannot find rabl template 'katello/api/v2/content_facet/base_with_root' within registered (["app/views", "/usr/share/foreman/app/views"]) view paths!

from foreman_hooks.

domcleal avatar domcleal commented on August 12, 2024

That looks like a different issue and message, closing this as it's been fixed in Foreman core and will be released shortly.

from foreman_hooks.

lzap avatar lzap commented on August 12, 2024

For the record the fix for the above is here: #36

from foreman_hooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.