I set up roles and profiles with hiera.
Nodes are classified by custom facts and profiles are assiged to roles in hiera.
How do work the subrole fact into this design? I am soo stumped here.
/opt/puppetlabs/facter/facts.d/role.yaml
role: mysql
/opt/puppetlabs/facter/facts.d/subrole.yaml
subrole: slave
hiera.yaml
:hierarchy:
- "nodes/%{::trusted.certname}"
- "roles/%{::role}"
- common
site.pp
hiera_include('classes')
hieradata/roles/mysql.yaml
---
classes:
- profile::mysql
↧
Confused how to implement subrole
↧
Unable to start puppetserver after "yum update"
Hi Guys,
I had a good running puppetserver daemon but after
sudo yum update -y
It is not running, complaining Specified bootstrap config file does not exist: '/etc/puppetlabs/puppetserver/bootstrap.cfg'.
detailed log output from puppetserver-daemon.log is as below:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Exception in thread "main" java.lang.IllegalArgumentException: Specified bootstrap config file does not exist: '/etc/puppetlabs/puppetserver/bootstrap.cfg'
at puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_error__14663$fn__14664.invoke(bootstrap.clj:131)
at puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_error__14663.invoke(bootstrap.clj:127)
at puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686$fn__14687.invoke(bootstrap.clj:150)
at puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686.invoke(bootstrap.clj:134)
at puppetlabs.trapperkeeper.bootstrap$eval14704$get_annotated_bootstrap_entries__14709$fn__14710$iter__14711__14717$fn__14718.invoke(bootstrap.clj:160)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:507)
at clojure.core$seq__4128.invoke(core.clj:137)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
at clojure.core.protocols$fn__6506.invoke(protocols.clj:101)
at clojure.core.protocols$fn__6452$G__6447__6465.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6519)
at puppetlabs.trapperkeeper.bootstrap$eval14944$remove_duplicate_entries__14949$fn__14950.invoke(bootstrap.clj:284)
at puppetlabs.trapperkeeper.bootstrap$eval14944$remove_duplicate_entries__14949.invoke(bootstrap.clj:263)
at puppetlabs.trapperkeeper.bootstrap$eval14970$parse_bootstrap_configs_BANG___14977$fn__14978.invoke(bootstrap.clj:304)
at puppetlabs.trapperkeeper.bootstrap$eval14970$parse_bootstrap_configs_BANG___14977.invoke(bootstrap.clj:293)
at puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259$fn__15260.invoke(core.clj:129)
at puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259.invoke(core.clj:95)
at puppetlabs.trapperkeeper.core$eval15281$run__15286$fn__15287.invoke(core.clj:151)
at puppetlabs.trapperkeeper.core$eval15281$run__15286.invoke(core.clj:145)
at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:173)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:394)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:630)
at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:394)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:630)
at clojure.main$main_opt.invoke(main.clj:316)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:512)
at clojure.lang.Var.invoke(Var.java:409)
at clojure.lang.AFn.applyToHelper(AFn.java:178)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at clojure.java.io$fn__9197.invoke(io.clj:248)
at clojure.java.io$fn__9102$G__9095__9109.invoke(io.clj:69)
at clojure.java.io$fn__9163.invoke(io.clj:165)
at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69)
at clojure.java.io$reader.doInvoke(io.clj:102)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686$fn__14687.invoke(bootstrap.clj:144)
... 37 more
Information about puppetserver
[jim@puppet ~]$ puppetserver --version
puppetserver version: 2.5.0
[jim@puppet ~]$ puppet agent --version
4.6.1
[jim@puppet ~]$
Host Operating System:
CentOS 6.8
Any help would be greatly appreciated.
↧
↧
Foreman : "Fog::Compute::Vsphere::NotFound" message when I try to edit a host
Hello,
In the context of my work, we have recently migrated a dozen servers from a vcenter to another :
pwcenter101 => pavcenter101
Naturally, I have done the changes in foreman in "Infrastructure" > "Compute resources" and changed ;
- vcenter : pwcenter101 => pavcenter101
- thumbprint
When I click on "test the connection", there is no error message.
The problem is now that I am trying to edit a host from the new vcenter, I get the following message "Fog::Compute::Vsphere::NotFound"
Here below is the complete ruby stacktrace found in production.log :
2016-09-12 10:14:20 [app] [I]
|
| Started GET "/hosts/pucrmde101.boulogne.boursorama.fr/edit" for 10.1.156.2 at 2016-09-12 10:14:20 +0200
2016-09-12 10:14:20 [app] [I] Processing by HostsController#edit as HTML
2016-09-12 10:14:20 [app] [I] Parameters: {"id"=>"pucrmde101.boulogne.boursorama.fr"}
2016-09-12 10:14:20 [app] [I] Rendered hosts/_progress.html.erb (0.3ms)
2016-09-12 10:14:21 [app] [I] Rendered config_groups/_config_group.html.erb (48.3ms)
2016-09-12 10:14:21 [app] [I] Rendered config_groups/_config_groups_selection.html.erb (63.7ms)
2016-09-12 10:14:21 [app] [I] Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
2016-09-12 10:14:21 [app] [I] Rendered puppetclasses/_classes_in_groups.html.erb (0.0ms)
2016-09-12 10:14:22 [app] [I] Rendered puppetclasses/_classes.html.erb (751.9ms)
2016-09-12 10:14:22 [app] [I] Rendered puppetclasses/_class_selection.html.erb (1128.6ms)
2016-09-12 10:14:22 [app] [I] Rendered nic/_base_form.html.erb (27.5ms)
2016-09-12 10:14:22 [app] [I] Rendered nic/_virtual_form.html.erb (2.3ms)
2016-09-12 10:14:22 [app] [I] Rendered compute_resources_vms/form/vmware/_network.html.erb (524.3ms)
2016-09-12 10:14:22 [app] [I] Rendered nic/_provider_specific_form.html.erb (530.4ms)
2016-09-12 10:14:22 [app] [I] Rendered nic/manageds/_managed.html.erb (563.3ms)
2016-09-12 10:14:22 [app] [I] Rendered hosts/_interfaces.html.erb (565.9ms)
2016-09-12 10:14:22 [app] [I] Rendered hosts/_form.html.erb (1766.0ms)
2016-09-12 10:14:22 [app] [I] Rendered hosts/edit.html.erb within layouts/application (1771.8ms)
2016-09-12 10:14:22 [app] [W] Action failed
| Fog::Compute::Vsphere::NotFound: Fog::Compute::Vsphere::NotFound
| /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.34.0/lib/fog/vsphere/requests/compute/get_datacenter.rb:7:in `get_datacenter'
| /opt/theforeman/tfm/root/usr/share/gems/gems/fog-1.34.0/lib/fog/vsphere/models/compute/datacenters.rb:15:in `get'
| /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb:431:in `dc'
| /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb:76:in `networks'
| /usr/share/foreman/app/views/compute_resources_vms/form/vmware/_network.html.erb:1:in `_app_views_compute_resources_vms_form_vmware__network_html_erb__3489032629212292611_81610780'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:27:in `render'
| /usr/share/foreman/app/views/nic/_provider_specific_form.html.erb:11:in `block in _app_views_nic__provider_specific_form_html_erb__2850111631295143032_81472100'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:607:in `fields_for'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:1317:in `fields_for'
| /usr/share/foreman/app/views/nic/_provider_specific_form.html.erb:10:in `_app_views_nic__provider_specific_form_html_erb__2850111631295143032_81472100'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:27:in `render'
| /usr/share/foreman/app/views/nic/manageds/_managed.html.erb:14:in `_app_views_nic_manageds__managed_html_erb__2082503955165207115_76777140'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:15:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:in `render'
| /usr/share/foreman/app/views/hosts/_interfaces.html.erb:50:in `block in _app_views_hosts__interfaces_html_erb__867383912852678722_70256447975820'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:607:in `fields_for'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:1467:in `fields_for_nested_model'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:1453:in `block in fields_for_with_nested_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `each'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:1452:in `fields_for_with_nested_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:1302:in `fields_for'
| /usr/share/foreman/app/views/hosts/_interfaces.html.erb:49:in `_app_views_hosts__interfaces_html_erb__867383912852678722_70256447975820'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:27:in `render'
| /usr/share/foreman/app/views/hosts/_form.html.erb:100:in `block (2 levels) in _app_views_hosts__form_html_erb___2993089244211080727_84773000'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `capture'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:607:in `fields_for'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:378:in `form_for'
| /usr/share/foreman/app/helpers/layout_helper.rb:400:in `form_for'
| /usr/share/foreman/app/views/hosts/_form.html.erb:8:in `block in _app_views_hosts__form_html_erb___2993089244211080727_84773000'
| /usr/share/foreman/app/models/taxonomy.rb:66:in `block (2 levels) in as_taxonomy'
| /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:147:in `as_location'
| /usr/share/foreman/app/models/taxonomy.rb:65:in `block in as_taxonomy'
| /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:112:in `as_org'
| /usr/share/foreman/app/models/taxonomy.rb:64:in `as_taxonomy'
| /usr/share/foreman/app/views/hosts/_form.html.erb:6:in `_app_views_hosts__form_html_erb___2993089244211080727_84773000'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:15:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:in `render'
| /usr/share/foreman/app/views/hosts/edit.html.erb:9:in `_app_views_hosts_edit_html_erb___923211136536740142_84835320'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:36:in `render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:17:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:110:in `_render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/streaming.rb:225:in `_render_template'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:103:in `render_to_body'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:88:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:16:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
| /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `ms'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:39:in `render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:660:in `block (4 levels) in _run__1616856748225776274__process_action__1595419252562132178__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7658'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_2494'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7658'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:in `block (3 levels) in _run__1616856748225776274__process_action__1595419252562132178__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7657'
| /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7657'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:in `block (2 levels) in _run__1616856748225776274__process_action__1595419252562132178__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7656'
| /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7656'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:in `block in _run__1616856748225776274__process_action__1595419252562132178__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7655'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7655'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__1616856748225776274__process_action__1595419252562132178__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
| /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
| /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
| /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__3758661850128260574__call__244124016314609327__callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
| /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
| /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
| /usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
| /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
| /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
| /usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
| /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-09-12 10:14:22 [app] [I] Rendered common/500.html.erb within layouts/application (4.7ms)
2016-09-12 10:14:22 [app] [I] Rendered layouts/base.html.erb (3.1ms)
2016-09-12 10:14:22 [app] [I] Completed 500 Internal Server Error in 1817ms (Views: 10.8ms | ActiveRecord: 40.9ms)
2016-09-12 10:14:36 [app] [I]
I don't think it's a route opening issue between the vCenter and foreman/puppet because the "puppet agent -t" works and I can see the reports.
Have you got an idea ?
Thanks.
Regards,
↧
Error add user in group
Hi, i want add user in group. I add in site.pp:> user { 'admin': groups => 'wheel'}
When run puppet agent --test i have it:
WS0000:~ root# puppet agent --test
Info: Using configured environment 'development'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for ws0000.local
Info: Applying configuration version '1472548837'
Error: Unknown failure comparing values _appserveradm,_appserverusr,_lpadmin,admin,com.apple.sharepoint.group.1,wheel and ["_appserveradm", "_appserverusr", "_lpadmin", "admin", "com.apple.sharepoint.group.1"] using insync? on type: User[admin] property: groups
Error: /Stage[main]/Main/User[admin]: Could not evaluate: Group names must be provided as an array, not a comma-separated list.
Notice: Applied catalog in 5.79 seconds
**I use OS X 10.11.6**
↧
Can I use puppet as an Intermediate CA?
I have installed an Internal-Root signed certificate on my Puppet Master under `$ssldir/ca/ca_crt.pem` in hopes that my Puppet managed nodes will have a certificate chain that can be resolved by following the chain back to a root CA.
In other words I want a chain of trust that looks like this: ROOT-CA ---> Puppet Master (Intermediate CA) ---> Agent Node
**Here** is the tricky part: My Puppet Master gives correctly signed certs to the Agents, *but* when the Agents run `puppet agent -t`, they have issues fetching the node definition. I get warnings like this one:
```
Warning: Unable to fetch my node definition, but the agent run will continue:
```
````
Warning: SSL_connect returned=1 errno=0 state=error: certificate verify failed: [unable to get issuer certificate for /CN=mypuppetmaster]
```
```
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=error: certificate verify failed: [unable to get issuer certificate for /CN=mypuppetmaster]
```
I was able to get this setup working using the deprecated `puppet master` daemon, but not with `puppetserver`.
I am using puppetserver 2.5.0 with puppet 4.6.1 on my master. My agent is running puppet 4.4.2.
↧
↧
Error with PuppetDB 4.1 (PE 2016.2) HTTP API with RBAC token authentication
I am trying to use RBAC token to access the PuppetDB HTTP API with the following command:
curl -X GET https://learning.puppetlabs.vm:8081/pdb/query/v4/nodes -H "X-Authentication: $TOKEN" --cacert /path_to/ca.pem --tlsv1 -v
However, I received this error. Output:
curl: (35) Unknown SSL protocol error in connection to learning.puppetlabs.vm:8081
I can use similar command on other services and it is working as expected:
curl -X GET https://learning.puppetlabs.vm:4433/status/v1/services -H "X-Authentication: $TOKEN" --cacert /path_to/ca.pem --tlsv1 -v
Output:
{"classifier-service":{"service_version":"1.7.10","service_status_version":1,"detail_level":"info","state":"running","status":{"db_up":true,"db_pool":{"state":"ready"},"rbac_up":true,"activity_up":true}},"activity-service":{"service_version":"0.5.3","service_status_version":1,"detail_level":"info","state":"running","status":{"db_up":true}},"rbac-service":{"service_version":"1.2.18","service_status_version":1,"detail_level":"info","state":"running","status":{"db_up":true,"activity_up":true}}}
Please advise
↧
Setting up SSH trust
Hi,
I was wondering if there is a way to set up SSH trust between two systems (from nodeA to nodeB) for a user.
I looked at https://forge.puppet.com/ghoneycutt/ssh
I have read the docs:
https://docs.puppet.com/puppet/latest/reference/type.html#sshauthorizedkey and https://docs.puppet.com/puppet/latest/reference/type.html#sshkey.
But I do not see where the private key gets generated. I am guessing I am suppose to generate my own private key with ssh-keygen and then use a File resource type to ensure contents match what was generated by ssh-keygen for the private key on nodeA and then use a `ssh_authorized_key` resource type that has the public key data on nodeB. How can I eliminate the manual step of getting the key pairs generated?
Thanks
↧
How to have 2 values for same key under same section in ini configuration file?
Hi,
I want to achieve something like below in nova.conf
scheduler_available_filters = nova.scheduler.filters.all_filters
scheduler_available_filters = myfilter.MyFilter
I have tried, `nova_config` and `ini_setting` resources, but both of them do not allow duplicates with different exception.
How to achieve the above with puppet in puppet way?
↧
Check fact (version) after package upgrade
We have syslog-ng running on our systems. Most have 3.x, but many have 2.x and the configuration files are not compatible. We don't want to stay on 2.x (features like @include are missing). If for some reason the Package[] resource is unable to ensure syslog-ng is at least 3.x, I need Puppet to bail out. I think. I'm open to suggestions of how to do this better.
Otherwise overwriting the config at that point will break a system running syslog-ng 2.x. We're trying to deploy Puppet to existing systems, so leaving them be until we can figure it out rather than breaking the system is preferred. The class I have looks like this:
class syslog_ng::package {
package { 'syslog-ng':
ensure => latest,
}
$minimum_version = '3.0.0'
unless versioncmp($::syslog_ng_version, $minimum_version) >= 0 {
fail("syslog_ng version (${::syslog_ng_version}) requirement not met. Must be at least this tall to ride: ${minimum_version}")
}
}
Is it possible to have the `unless ... fail` happen after the package[]? Otherwise, it bails early - the installed version is too old. The second half of the question is that I think the custom fact `syslog_ng_version` is computed at the start of the agent run. Obviously, if the package were upgraded, we can't compare the old value.
I know that the package[] ensure can be set to a specific value, but I can't do that because the packages we have for RHEL are 3.5.x but the packages I had to pull for SLES 11 (...) are 3.6.x, etc. I don't want to ensure a specific version, just a minimum version somewhat similar to PUP-1519[1].
[1] https://tickets.puppetlabs.com/browse/PUP-1519
↧
↧
ENV variables for .fixtures.yaml
Is it possible to use an ENV variable to define repositories in the .fixtures.yaml file for `puppetlabs_spec_helper` ? We have an environment where modules are shared/mirrored across different git repositories that exist on different servers in different networks, and we can't give them the same DNS name everywhere.
Is it possible to reference an ENV variable to use for the base git repository in a .fixtures.yaml file? If not, is my only option that we keep a constant 'patch' set that we rebase ontop of the copy/clone that modifies the .fixtures.yaml file? could I / should I 'generate' the .fixtures.yaml file as a task that must happen before any of the built in tasks that require the file to exist?
---EDIT---
As an update, it looks like the 'value' of the .fixtures.yaml symlink is done in an eval, so I was able to do something like the following..
fixtures:
symlinks:
stdlib: "#{ENV['VENDOR_LIB'] or './vendor'}/puppetlabs-stdlib-4.8.0"
This allows me to add my own task to populate a vendorlib directory for our vendored .tar.gz files for foss modules. I haven't looked to see if an eval is used for the repository portion or not.
↧
How to check a particular keyword in a line of a file using puppet manifests?
Hi , I would like to check the file /etc/password.
In that file i m going to check the home directory for root user.
I want a puppet manifest to check for two conditions.
1 . The home directory should be /root - root:x:0:0:root:/root:/bin/bash - need to check /root for the home directory parameter
2. The home directory can be anything but could not be "/" -root:x:0:0:root:/:/bin/bash - need to check the home directory should not be "/"
Thanks in advance.
Regards,
Sathya.
↧
Unable to install puppet
``I am new to puppet,Have tried to install puppet enterprise 2016.2 in my local machine(monolithic method)
*downloaded tar file and extracted it *gave the option as Guided install option *It popped out with message as Please go to https:/hostname/:3000 in your browser to continue installation *Opened the page and followed the instructions given in puppet labs and in final verfication steps it popped with error message , instructed me to check logs
While going through logs unfortunately my machine got crashed and rebooted
And I tried to open the console but it wasn't so i ran the script .puppet-enterprise-uninstaller to unistall . Then tried to install again using the script /puppet-enterprise-installer but it was stopped with below lines and not proceeding further (also unable to access the https:/hostname/:3000)
We're preparing the Web Installer...
./puppet-enterprise-installer: line 502: /opt/puppetlabs/puppet/bin/facter: No such file or directory
2016-09-14 10:58:50,887 Running command: mkdir -p /opt/puppetlabs/puppet/share/installer/installer
2016-09-14 10:58:50,890 Running command: cp -pR /tmp/puppet-enterprise-2016.2.1-el-6-x86_64/* /opt/puppetlabs/puppet/share/installer/installer/
Please go to https://:3000 in your browser to continue installation. Be sure to use 'https://' and that port 3000 is reachable through the firewall.
2016-09-14 10:58:51,101 Running command: RACK_ENV=production /opt/puppetlabs/puppet/bin/bundle exec thin start --debug -p 3000 -a 0.0.0.0 --ssl --ssl-disable-verify &> /dev/null
Please guide on this.
Complete log:
===========
root@appdynamics puppet-enterprise-2016.2.1-el-6-x86_64]# ./puppet-enterprise-installer
/tmp/puppet-enterprise-2016.2.1-el-6-x86_64 /tmp/puppet-enterprise-2016.2.1-el-6-x86_64
=============================================================
Puppet Enterprise Installer
=============================================================
Puppet Enterprise offers two different methods of installation.
[1] Guided install
Recommended for beginners. This method will install and configure a temporary
webserver to walk you through the various configuration options.
NOTE: This method requires you to be able to access port 3000 on this machine
from your desktop web browser.
[2] Text-mode
Recommended for advanced users. This method will open your $EDITOR (vi)
with a PE config file (pe.conf) for you to edit before you proceed with installation.
The pe.conf file is a HOCON formatted file that declares parameters and values needed to
install and configure PE.
We recommend that you review it carefully before proceeding.
=============================================================
How to proceed? [1]: 1
## We're installing the Puppet Agent...
2016-09-14 10:58:48,470 Running command: mkdir -p /opt/puppetlabs/server/data/packages/public/2016.2.1/el-6-x86_64-1.5.3
2016-09-14 10:58:48,475 Running command: cp -r -L /tmp/puppet-enterprise-2016.2.1-el-6-x86_64/packages/el-6-x86_64/* /opt/puppetlabs/server/data/packages/public/2016.2.1/el-6-x86_64-1.5.3
2016-09-14 10:58:48,679 Running command: cp -r -L /tmp/puppet-enterprise-2016.2.1-el-6-x86_64/packages/GPG-KEY-puppetlabs /opt/puppetlabs/server/data/packages/public
2016-09-14 10:58:48,683 Running command: mkdir -p /etc/yum.repos.d
2016-09-14 10:58:48,688 Running command: echo '[puppet_enterprise]' > /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,692 Running command: echo 'name=PuppetLabs PE Packages $releasever - $basearch' >> /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,695 Running command: echo 'baseurl=file:///opt/puppetlabs/server/data/packages/public/2016.2.1/el-6-x86_64-1.5.3' >> /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,697 Running command: echo 'enabled=1' >> /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,699 Running command: echo 'gpgcheck=1' >> /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,701 Running command: echo 'gpgkey=file:///opt/puppetlabs/server/data/packages/public/GPG-KEY-puppetlabs' >> /etc/yum.repos.d/puppet_enterprise.repo
2016-09-14 10:58:48,703 Running command: rpm --import /tmp/puppet-enterprise-2016.2.1-el-6-x86_64/packages/GPG-KEY-puppetlabs
2016-09-14 10:58:48,869 Running command: yum clean all --disablerepo='*' --enablerepo=puppet_enterprise
Loaded plugins: fastestmirror, refresh-packagekit, security
Repository pgdg94 is listed more than once in the configuration
Repository pgdg94-source is listed more than once in the configuration
Cleaning repos: puppet_enterprise
Cleaning up Everything
Cleaning up list of fastest mirrors
2016-09-14 10:58:49,039 Running command: yum install -y puppet-agent pe-bundler pe-installer
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Repository pgdg94 is listed more than once in the configuration
Repository pgdg94-source is listed more than once in the configuration
Determining fastest mirrors
* base: mirror.fibergrid.in
* epel: ftp.jaist.ac.jp
* extras: mirror.fibergrid.in
* rpmforge: ftp.colocall.net
* updates: centos-hcm.viettelidc.com.vn
Package puppet-agent-1.6.2-1.el6.x86_64 already installed and latest version
Package pe-bundler-1.8.2-3.pe.el6.noarch already installed and latest version
Package pe-installer-2016.1.0.47-1.el6.x86_64 already installed and latest version
Nothing to do
## We're preparing the Web Installer...
./puppet-enterprise-installer: line 502: /opt/puppetlabs/puppet/bin/facter: No such file or directory
2016-09-14 10:58:50,887 Running command: mkdir -p /opt/puppetlabs/puppet/share/installer/installer
2016-09-14 10:58:50,890 Running command: cp -pR /tmp/puppet-enterprise-2016.2.1-el-6-x86_64/* /opt/puppetlabs/puppet/share/installer/installer/
Please go to https://:3000 in your browser to continue installation. Be sure to use 'https://' and that port 3000 is reachable through the firewall.
2016-09-14 10:58:51,101 Running command: RACK_ENV=production /opt/puppetlabs/puppet/bin/bundle exec thin start --debug -p 3000 -a 0.0.0.0 --ssl --ssl-disable-verify &> /dev/null
↧
Should "puppet resource" commands load module/lib/facter?
I have a module that has ruby facts (.rb files) defined in /lib/facter.
These facts load and are available and work great when I run puppet apply.
However, when i try to run "puppet resource" none of those facts in lib/facter are loaded and executed.
It seems to me like they should load and execute, should they not?
"augeasversion": "1.4.0",
"facterversion": "3.1.6",
"puppetversion": "4.4.2",
"rubyversion": "2.1.8",
Note, I test/develop these by typically storing the modules in a specific place and pointing to them with a --modulepath flag.
↧
↧
How do you use a variable in a Puppet Manifest?
I am using the WSUS Module with Puppet Master on Centos 7.2. My Puppet Agent servers are running Windows Server 2012.
I want to use a manifest with a variable. However, when the Puppet Agent server has the puppet agent run, it displays "error 400, syntax error." I have tried re-writing the manifest and every variation I could think of. I keep getting some error.
Here is one example of a manifest:
class excellent {
class { 'wsus_client':
$cool = 'Saturday'
server_url => 'http://acme.com',
auto_update_option => 'Scheduled'
scheduled_install_day => $cool,
scheduled_install_hour => 1,
}
}
I've tried assigning the variable in braces {}. I tried to use $LOAD\_PATH, --custom-dir and FACTERLIB. But I could not figure out how to use any of these three.
I want to change the variable in one place and use it within the scope of its parent class. What should I do?
↧
How do I use the generate function?
I am new to puppet. I have a situation where I have to put a file under particular user's home directory on all servers. I know the user's UID, the home directory varies between the server (i.e. it is historic).
I am trying to accomplish this by using a following puppet code.
$myhome_dir = generate("/bin/bash", "-c", "/bin/grep 666 /etc/passwd | /bin/grep -i abc | /bin/awk -F':' '{print \$6}'")
But when I call, it is throwing the following errors
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Generators can only contain alphanumerics, file separators, and dashes at ...
Could someone help me to figure out what is causing this error or what I am doing wrong in my puppet code?
My advanced thanks to all.
Thanx,
Sam
↧
Puppet - powershel scripts execution
Hello All
With reference to: https://ask.puppet.com/question/3748/running-powershell-from-puppet-cmd-lets-not-recognised/
Is it possible that above issue also influence execution of scripts that loads assemblies - like: [Reflection.Assembly]::LoadWithPArtialName("System.Messaging") ?
Yes - due to env i am still on 3.6.2 :(
Michał
↧
Common code inclusion
What's the best approach to include code needed at multiple places? I hardly wanna copy 400 lines of code across a dozen files.
I've got a basis defined type `my_class::a`. I've got several other defined types `my_class::b`, `my_class:c`, `my_class::d`. `b`,`c` and `d` share all the same parameters of `a`. Their implementation differs by some values. `b`, `c` and `d` all have additional parameters.
define my_class::a (
# COMMON PARAMETER LIST
) {
$t = 'a'
$x = 42
# IMPLEMENTATION depending on $t and $x (and parameters, of course)
}
define my_class::b (
#INCLUDE COMMON PARAMETERS here
# additional parameters here
) {
$t = 'abc'
$x = 43
#INCLUDE COMMON THINGS IMPLEMENTATION
# …
# some additional things with the additional params (and common parameters)
}
Ideally the inclusion shall be automatically triggered before/while/during catalog compilation. Having to mind to trigger the common code inclusion each time something in it changed, is already bad.
PS: No [splat](https://docs.puppet.com/puppet/4.6/reference/lang_resources_advanced.html#setting-attributes-from-a-hash).
PPS: increased difficulty level, some parameter names (of the common parameters set) change across defined types [I really need something like a preprocessor, but it's gotta be triggered automatically]
↧
↧
Setting parameters in the roles & profiles pattern
TLDR: Is there a way to write reusable profiles, that roles can configure with sane defaults, only overriding using Hiera when required?
I'm following the roles & profiles pattern documented at https://docs.puppet.com/pe/2016.2/r_n_p_intro.html.
"[Rule 1](https://docs.puppet.com/pe/2016.2/r_n_p_full_example.html#step-2-write-a-profile)" states "*Make sure you can safely include any profile multiple times — don’t use resource-like declarations on them.*
Like the example, I'm setting up a Jenkins server (but this applies to anything) but I'd like to abstract out some configuration like java and the Apache reverse proxy so I can reuse it in elsewhere as well.
So I have:
class profiles::apache_reverse_proxy($context = "/") {
// use puppet::apache to configure reverse proxy on $context
}
class profiles::jenkins() {
// configure jenkins only (not apache)
}
class roles::jenkins_master() {
include profiles::base_server
include profiles::java8
include profiles::apache_reverse_proxy // <-- how to set reverse proxy $context as "/jenkins"
include profiles::jenkins
}
Obviously I could set the `$context` in Hiera, but I'd like the Jenkisn role to have a sane default configuration (e.g. "/jenkins") that hiera only overrides if needed (e.g. "/jenkins-dev").
Normally I would include the Apache class with
class {'apache_reverse_proxy:
context => '/jenkins'
}
instead of
include apache_reverse_proxy
But this breaks rule 1. So basically is there a way to write reusable profiles, that roles can configure with sane defaults?
↧
Puppet agent not logging
I have been running puppet master and agent in a same node. While master works correctly, it seems the agent is not logging. I checked the /var/log/puppet folder and rsyslog, but they have nothing about the agent. I am using the following configuration:
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server=name_of_the_server
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
I have other nodes with only the agent that are logging correctly. Any ideas of what could be causing this?
Thanks in advance!
↧
Beaker not able to SSH into Docker CentOS container while I can manually
Hi everyone,
Basically I'm trying to run some silly acceptance tests on Docker containers before I get my hands dirty with them (my only acceptance test as of now only contains a `notify`).
Using the official [Ubuntu images](https://hub.docker.com/_/ubuntu/) everything is fine, I can see the output of `notify` . However when I try the [CentOS](https://hub.docker.com/_/centos/) images Beaker is not able to configure the box using SSH.
My `default.yml` looks like the following (it's a very simple one):
HOSTS:
centos7-64:
platform: centos-7-x64
image: centos:7
hypervisor: docker
CONFIG:
type: foss
log_level: verbose
When executing `bundle exec rake acceptance`, I can see the following at the beginning:
Dockerfile is FROM centos:7
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients curl ntpdate
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN mkdir -p /var/run/sshd
RUN echo root:root | chpasswd
RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
EXPOSE 22
CMD ["sh", "-c", "service sshd start ; tail -f /dev/null"]
Which to me it seems that this is changing the `root` password to `root`. However some lines below I get all these timeouts, hence I won't be able to run any integration tests on CentOS 7 boxes.
Attempting ssh connection to 0.0.0.0, user: root, opts: {:password=>"root", :port=>"32769", :forward_agent=>false, :user=>"root"}
Warning: Try 7 -- Host 0.0.0.0 unreachable: Net::SSH::Disconnect - connection closed by remote host
Warning: Trying again in 55 seconds
If it's worth something, I executed `bash` manually on the container and verified that the root password is indeed `root`, so I don't really know what could be happening.
Did anyone experience anything similar?
↧