Skip to content

Instantly share code, notes, and snippets.

=CRASH REPORT==== 12-Sep-2013::15:17:03 ===
crasher:
initial call: ssl_connection:init/1
pid: <0.329.0>
registered_name: []
exception exit: {{badmatch,
{error,
{asn1,
{'Type not compatible with table constraint',
{{component,'Type'},
Notice: /Stage[main]/Mcollective::Server::Config::Factsource::Yaml/File[/etc/mcollective/facts.yaml]/content: content changed '{md5}292f1e8013b60c66035da5a48a1aa0d8' to '{md5}f9a216b7aafb1544a4c4848e1b5f14e2'
Error: Execution of '/usr/local/bin/rabbitmqadmin declare exchange --vhost=/mcollective name=mcollective_directed type=direct' returned 1: *** Access refused: /api/exchanges/%2Fmcollective/mcollective_directed
Error: /Stage[main]/Mcollective::Middleware::Rabbitmq/Rabbitmq_exchange[mcollective_directed@/mcollective]/ensure: change from absent to present failed: Execution of '/usr/local/bin/rabbitmqadmin declare exchange --vhost=/mcollective name=mcollective_directed type=direct' returned 1: *** Access refused: /api/exchanges/%2Fmcollective/mcollective_directed
Error: Execution of '/usr/local/bin/rabbitmqadmin declare exchange --vhost=/mcollective name=mcollective_broadcast type=topic' returned 1: *** Access refused: /api/exchanges/%2Fmcollective/mcollective_broadcast
Error: /Stage[main]/Mcollective::M
#
# concat.rb
#
module Puppet::Parser::Functions
newfunction(:append, :type => :lvalue, :doc => <<-EOS
Appends the contents of array 2 onto array 1.
*Example:*
# dev_env.pp
node ns38 {
nagios::service { "BPL_ping":
service_block => {
hostgroup_name => "bpl-servers",
check_command => "check_ping!100.0,20%!500.0,60%",
},
}
nagios::service { "BPL_load":
define just::oneuser {
$user = {}
$user[$name] = hiera($name)
create_resources('user', $user)
}

datacat implementation of nagios configuration

These are exported resources for great justice. The intent here is that you can multiply declare the same service and just generate one service definition - this is a usecase of the #puppet user watchman_.

http://richardc.unixbeard.net/2013/02/puppet-concat-patterns/ for more context

2) java select Oracle JRE for Debian Wheezy
Failure/Error: it { should contain_file('/tmp/test').with_content('Using package: oracle-j2re1.7, alterntative j2re1.7-oracle, alt_path /usr/lib/jvm/j2re1.7-oracle/bin/java') }
expected that the catalogue would contain File[/tmp/test] with content set to `"Using package: oracle-j2re1.7, alterntative j2re1.7-oracle, alt_path /usr/lib/jvm/j2re1.7-oracle/bin/java"` but it is set to `"Using package: oracle-j2re1.7, alterntative , alt_path "` in the catalogue
# ./spec/classes/java_spec.rb:41:in `block (3 levels) in <top (required)>'
$ tar tvzf ~/Downloads/haraldsk-nfs-1.1.1.tar.gz
drwxr-xr-x 0 haraldsk staff 0 18 Nov 2012 haraldsk-nfs-1.1.1/
-rw-r--r-- 0 haraldsk staff 239 18 Nov 2012 haraldsk-nfs-1.1.1/Gemfile
drwxr-xr-x 0 haraldsk staff 0 18 Nov 2012 haraldsk-nfs-1.1.1/manifests/
-rw-r--r-- 0 haraldsk staff 22853 18 Nov 2012 haraldsk-nfs-1.1.1/metadata.json
-rw-r--r-- 0 haraldsk staff 399 18 Nov 2012 haraldsk-nfs-1.1.1/Modulefile
-rw-r--r-- 0 haraldsk staff 237 18 Nov 2012 haraldsk-nfs-1.1.1/Rakefile
-rw-r--r-- 0 haraldsk staff 171 18 Nov 2012 haraldsk-nfs-1.1.1/README
-rw-r--r-- 0 haraldsk staff 7226 18 Nov 2012 haraldsk-nfs-1.1.1/README.md
drwxr-xr-x 0 haraldsk staff 0 18 Nov 2012 haraldsk-nfs-1.1.1/spec/
# == Class: mongodb::install
#
#
class mongodb::install {
include $::mongodb::params::repo_class
anchor { 'mongodb::install::begin': } ->
package { 'mongodb-stable':
name => $::mongodb::params::old_server_pkg_name,
ensure => absent,
$ ruby-1.8.7-p371 -e 'a = ["a"]; b = *a; puts b.inspect'
"a"
$ ruby-1.9.3-p429 -e 'a = ["a"]; b = *a; puts b.inspect'
["a"]