Comments (11)
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.
Hi,
thank you for moving. Any idea about that issue?
from foreman_hooks.
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.
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.
Joining this request. we are using host_parameters_attributes to orchestrate BMC configuration prior the host creation.
from foreman_hooks.
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.
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.
Found it, RABL issue, reported here: http://projects.theforeman.org/issues/14981
from foreman_hooks.
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.
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.
For the record the fix for the above is here: #36
from foreman_hooks.
Related Issues (20)
- Cannot use after_build hook HOT 2
- question: does foreman hooks work on Katello Content hosts too? HOT 1
- Audit hook never called HOT 6
- Hook for instances power-on/power-off
- Remove of hook result in 500 Error HOT 2
- foreman-rake hooks:events[host/managed] doesnt list all events HOT 3
- Missing hooks are failures
- Missing host parameters in foreman_hooks json HOT 3
- Include current user as an argument to hook scripts
- foreman-rake hooks:events[foreman/model/ec2] ends with error HOT 2
- Hook data json structure has changed in latest release HOT 8
- Empty 'parameters' array in json output HOT 20
- Empty values/No facts as json input for after_create event after discovery
- hooks on bulk actions
- foreman-rake hooks:events[nic/bmc] ends with error bug
- config_report hook generates log warning HOT 8
- Hosts: Base versus Manged
- Unable to run hook on bare metal build or simple rebuild
- FOREMAN_HOOKS_USER not working with audits and user logins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foreman_hooks.