Skip to content

Instantly share code, notes, and snippets.

@xavpaice
xavpaice / support.yaml
Created June 8, 2023 06:10
Basic preflight and support-bundle specs
# This is the support bundle config secret that will be used to generate the support bundle
apiVersion: v1
kind: Secret
metadata:
labels:
troubleshoot.sh/kind: support-bundle
name: {{ .Release.Name }}-support-bundle
namespace: {{ .Release.Namespace }}
type: Opaque
stringData:
@xavpaice
xavpaice / main.go
Last active August 31, 2022 00:58
Example of testing if an interface is implemented
package main
import (
"fmt"
)
type Collector interface {
Merge() string
}

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@xavpaice
xavpaice / gist:10888a2743b1db7d5e8c
Created November 20, 2014 06:33
puppet-neutron rake spec output
Failures:
1) Puppet::Type.type(:nova_admin_tenant_id_setter) when url is correct should create a resource
Failure/Error: expect(provider.exists?).to be_false
expected false to respond to `false?`
# ./spec/unit/provider/nova_admin_tenant_id_setter/neutron_spec.rb:77:in `block (3 levels) in <top (required)>'
2) Puppet::Type.type(:nova_admin_tenant_id_setter) when tenant cannot be found should receive an api error
Failure/Error: expect(provider.exists?).to be_false
expected false to respond to `false?`
@xavpaice
xavpaice / gist:165f195fb472224fc28e
Last active August 29, 2015 14:02
Don't know how to build task 'spec:system'
Ubuntu Trusty, default install.
Installed rspec-system gem 5 mins ago
puppetlabs-mongodb cloned from master
no changes made (yet)
Gems relevant:
rspec (2.14.1)
rspec-core (2.99.0, 2.14.8, 2.14.7)
rspec-expectations (2.99.0, 2.14.5, 2.14.2)
rspec-mocks (2.99.0, 2.14.6, 2.14.3)
@xavpaice
xavpaice / gist:55d1503d4f2f7dc17140
Created May 5, 2014 19:56
puppet recursion for directories
xav@xav-lappie:~/tmpdump$ puppet apply test.pp
Notice: Compiled catalog for xav-lappie.orcon in environment production in 0.08 seconds
Error: Cannot create /home/xav/tmpdump/freddie/jane/mary; parent directory /home/xav/tmpdump/freddie/jane does not exist
Error: /Stage[main]//File[/home/xav/tmpdump/freddie/jane/mary]/ensure: change from absent to directory failed: Cannot create /home/xav/tmpdump/freddie/jane/mary; parent directory /home/xav/tmpdump/freddie/jane does not exist
Notice: Finished catalog run in 0.14 seconds
xav@xav-lappie:~/tmpdump$ cat test.pp
file {'/home/xav/tmpdump/freddie/jane/mary':
ensure => directory,
recurse => true,
@xavpaice
xavpaice / gist:8570959
Created January 23, 2014 01:17
output from installation of vagrant-openstack-plugin
vagrant plugin install vagrant-openstack-plugin
Installing the 'vagrant-openstack-plugin' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/vagrant/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-linux-gnu/ports/libxml2/2.8.0/compile.log' to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of