sous-chefs / foreman Goto Github PK
View Code? Open in Web Editor NEWDevelopment repository for the foreman cookbook
Home Page: https://supermarket.chef.io/cookbooks/foreman
License: Other
Development repository for the foreman cookbook
Home Page: https://supermarket.chef.io/cookbooks/foreman
License: Other
Given this ressource at recipes/proxy_register.rb
:
foreman_smartproxy node['foreman-proxy']['registered_name'] do
base_url node['foreman-proxy']['foreman_base_url']
consumer_key node['foreman-proxy']['oauth_consumer_key']
consumer_secret node['foreman-proxy']['oauth_consumer_secret']
effective_user node['foreman-proxy']['oauth_effective_user']
url node['foreman-proxy']['registered_proxy_url']
only_if { node['foreman-proxy']['register'] }
retries 3
retry_delay 5
action :create
This resource currently can not succeed on the first run because url
is referring to a derived attribute which is changed after compile time.
Looking at attributes/foreman_proxy.rb
shows that:
default['foreman-proxy']['registered_proxy_url'] = "http#{'s' if node['foreman-proxy']['ssl']}://#{node['foreman-proxy']['registered_name']}:#{registered_port}"
referred by url
is derived from:
default['foreman-proxy']['registered_name'] = node['fqdn']
This node attribute node[fqdn]
is changed by the included hostname
cookbook during the (initial) run.
I guess a possible solution could be to leverage lazy evaluation of attributes.
Here is the issue:
================================================================================
Error executing action `run` on resource 'execute[named-checkconf]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/named-checkconf -z /etc/bind/named.conf ----
STDOUT: zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone foreman.example/IN: loading from master file master/db.foreman.example failed: file not found
zone foreman.example/IN: not loaded due to errors.
STDERR: _default/foreman.example/in: file not found
---- End output of /usr/sbin/named-checkconf -z /etc/bind/named.conf ----
Ran /usr/sbin/named-checkconf -z /etc/bind/named.conf returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/bind/recipes/default.rb
121: execute 'named-checkconf' do
122: command "/usr/sbin/named-checkconf -z #{node['bind']['conf_file']}"
124: notifies :enable, 'service[bind]', :immediately
125: notifies :start, 'service[bind]', :immediately
126: only_if { ::File.exist?('/usr/sbin/named-checkconf') }
127: end
128:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/bind/recipes/default.rb:121:in `from_file'
execute("named-checkconf") do
action [:nothing]
retries 0
retry_delay 2
default_guard_interpreter :execute
command "/usr/sbin/named-checkconf -z /etc/bind/named.conf"
backup 5
returns 0
declared_type :execute
cookbook_name "bind"
recipe_name "default"
only_if { #code block }
end
Recipe: tftp::server
* service[tftpd-hpa] action restart
- restart service service[tftpd-hpa]
Recipe: dhcp::_service
* service[isc-dhcp-server] action restart
================================================================================
Error executing action `restart` on resource 'service[isc-dhcp-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- End output of /sbin/start isc-dhcp-server ----
Ran /sbin/start isc-dhcp-server returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/dhcp/recipes/_service.rb
3: service node['dhcp']['service_name'] do
4: supports restart: true, status: true, reload: true
5: action [:enable]
6: # use upstart on ubuntu > 9.10
7: case node['platform']
8: when 'ubuntu'
9: if node['platform_version'].to_f >= 9.10
10: provider Chef::Provider::Service::Upstart
11: end
12: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/dhcp/recipes/_service.rb:3:in `from_file'
service("isc-dhcp-server") do
provider Chef::Provider::Service::Upstart
action [:enable]
supports {:restart=>true, :status=>true, :reload=>true}
retries 0
retry_delay 2
default_guard_interpreter :default
service_name "isc-dhcp-server"
enabled true
pattern "isc-dhcp-server"
declared_type :service
cookbook_name "dhcp"
end
Recipe: bind::default
* service[bind] action reload
- reload service service[bind]
Running handlers:
[2015-12-01T23:08:07+00:00] ERROR: Running exception handlers
Running handlers complete
[2015-12-01T23:08:07+00:00] ERROR: Exception handlers complete
Chef Client failed. 63 resources updated in 07 minutes 17 seconds
[2015-12-01T23:08:07+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2015-12-01T23:08:07+00:00] ERROR: Chef::Exceptions::MultipleFailures
[2015-12-01T23:08:08+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Judging from the bind cookbook this cookbook is using, we are missing a template file:
https://github.com/DennisBP/cookbook-bind/blob/master/recipes/default.rb#L121-L134
It's expecting example.org.erb to be present, but it's not present in either cookbook.
It would be super awesome if this could also install Foreman chef and Smart proxy Chef, also maybe a support for configuring chef handlers on chef nodes.
It also makes me think about introducing kafo parser for chef cookbooks so we could have foreman-installer based on chef.
Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
The checks are not passing.
Version of the cookbook where you are encountering the issue.
Version of chef-client in your environment.
Operating system distribution and release version. Cloud provider if running in the cloud.
Steps to reproduce the behavior:
All of the checks including integration tests pass.
Add any other context about the problem here. e.g. related issues or existing pull requests.
I fixed this https://github.com/svanzoest-cookbooks/apache2/pull/420/files
by updating the metadata file with
depends 'apache2' , '<=3.2.1'
I'm working on a branch to add centos/RHEL support. Initially I'm working on 6.7 then will do 7.2.
The repo DennisBP/cookbook-bind
went offline breaking our foreman cookbook. ๐ข
Hi,
just a question, this cookbook is still in work in progress state?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/ci.yml
sous-chefs/.github 3.1.1
actions/checkout v4
actionshub/chef-install 3.0.0
actionshub/test-kitchen 3.0.0
.github/workflows/stale.yml
actions/stale v9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.