Yay, backstab hit again

What a nice morning to get to work…one openstack cloud is unreachable via Horizon and monitoring systems. After quick check it seemed that keystone was not authenticating users at all, what the heck? Yesterday evening it was all good. Checking…

Linux performance tidbits

Netflix originated: Linux Performance Analysis in 60,000 Milliseconds Netflix at Velocity 2015: Linux Performance Tools Brendan Gregg’s Linux Performance Ubuntu: Disk performance Redhat: Red Hat Enterprise Linux 6 Performance Tuning Guide Red Hat Enterprise Linux 7 Performance Tuning Guide

Software inventory with facter

Getting hash of installed software with facter: #!/usr/bin/ruby # # File: /your/puppetdir/modules/yourmodule/lib/facter/sw_inventory.rb # # Description: Report versions of installed software # require ‘facter’ Facter.add(:sw_inv) do setcode do # OSX if Facter.value(:osfamily) == ‘Darwin’ require ‘facter/util/macosx’ sw_inv = {} # Lists…

Building Puppet 4.0 test environment with Vagrant

Puppet 4.0 RC is released Here’s some notes how to build CentOS/vagrant/puppet master and agent and some relevant links Release notes https://puppetlabs.com/blog/release-candidate-open-source-puppet-4.0 https://groups.google.com/forum/#!msg/puppet-announce/Wl9Ag2gRmXM/RpdggribgvwJ Prerequisities for test environment VirtualBox Grab and install VirtualBox https://www.virtualbox.org/wiki/Downloads Vagrant Grab and install Vagrant https://www.vagrantup.com/downloads.html CentOS Get minimal…

Python and MySQLdb quick note

Quick note for basic stuff in python: #import stuff import MySQLdb # connect try: db = MySQLdb.connect(host=”localhost”, user=”user”, passwd=”password”, db=”mydb”) except Exception, e: sys.exit(“Problem connecting to DB: %s” % e) # Cursor cur = db.cursor() # Defer warnings if needed,…

Failing node ids from puppet dashboard

mysql> select distinct(node_id) from reports where id = any (select report_id from report_logs where message like ‘%Could not evaluate: undefined method%each_line%’); Substitute %Could not evaluate: undefined method%each_line% with error you want to find out