Skip to content

Instantly share code, notes, and snippets.

View breu's full-sized avatar

Joe Breu breu

  • PlanetLabs
  • San Antonio, TX
View GitHub Profile
@breu
breu / gist:9051554
Last active August 29, 2015 13:56
swift disk prep
#
# setup the drives
#
wget breu.org/filedrop/MegaCli_Linux.zip
apt-get -y install unzip
unzip -L MegaCli_Linux.zip
dpkg -i megacli_linux/megacli_8.07.08-1_all.deb
# Get count of adapters
/opt/MegaRAID/MegaCli/MegaCli64 -adpCount
@breu
breu / gist:9219114
Last active August 29, 2015 13:56
chef attribute precedence
Attribute Precedence
Attributes are always applied by the chef-client in the following order:
1. A default attribute located in a cookbook attribute file
2. A default attribute located in a recipe
3. A default attribute located in an environment
4. A default attribute located in role
5. A force_default attribute located in a cookbook attribute file
6. A force_default attribute located in a recipe
7. A normal attribute located in a cookbook attribute file
@breu
breu / gist:9920058
Created April 1, 2014 18:27
cinder fix
diff --git a/attributes/default.rb b/attributes/default.rb
index 06bae01..fb943ff 100644
--- a/attributes/default.rb
+++ b/attributes/default.rb
@@ -60,6 +60,7 @@ default["cinder"]["storage"]["lvm"]["mirrors"] = 0
default["cinder"]["storage"]["lvm"]["config"] = "/etc/lvm/lvm.conf" # Path of LVM config file
default["cinder"]["storage"]["lvm"]["pool_size"] = "None"
default["cinder"]["storage"]["lvm"]["volume_driver"] = "cinder.volume.drivers.lvm.LVMISCSIDriver"
+default["cinder"]["storage"]["lvm"]["volume_backend_name"] = "cinder"
@breu
breu / ring-tester.py
Last active August 29, 2015 14:01
swift ring-tester.py
#!/usr/bin/env python
from swift.common.ring import Ring
from swift.common.utils import hash_path
import random
import locale
locale.setlocale(locale.LC_ALL, '')
ring_file = "/home/rack/object.ring.gz"
(nova.rpc.amqp): TRACE: Traceback (most recent call last):
(nova.rpc.amqp): TRACE: File "/opt/stack/nova/nova/rpc/amqp.py", line 252, in _process_data
(nova.rpc.amqp): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc.amqp): TRACE: File "/opt/stack/nova/nova/compute/manager.py", line 1972, in live_migration
(nova.rpc.amqp): TRACE: block_migration)
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
(nova.rpc.amqp): TRACE: self.gen.next()
(nova.rpc.amqp): TRACE: File "/opt/stack/nova/nova/compute/manager.py", line 1964, in live_migration
(nova.rpc.amqp): TRACE: 'disk': disk}})
(nova.rpc.amqp): TRACE: File "/opt/stack/nova/nova/rpc/__init__.py", line 68, in call
@breu
breu / gist:3946303
Created October 24, 2012 14:16
rhel folsom package list (so far)
acl
alsa-lib
alsa-utils
at
atk
attr
audit
audit-libs
augeas-libs
authconfig
@breu
breu / gist:5678238
Last active December 17, 2015 21:59
bad rabbit
########################
# VRRP configuration: #
# API : 10.127.54.13 #
# DB : 10.127.54.11 #
# RABBIT: 10.127.54.16 #
########################
[2013-05-30T14:25:02+00:00] INFO: [template[keepalived.conf]] sending restart action to service[keepalived] (delayed)
@breu
breu / gist:5731542
Created June 7, 2013 18:57
for wilk
select anon_1.instances_created_at AS anon_1_instances_created_at, anon_1.instances_updated_at AS anon_1_instances_updated_at, anon_1.instances_deleted_at AS anon_1_instances_deleted_at, anon_1.instances_deleted AS anon_1_instances_deleted, anon_1.instances_id AS anon_1_instances_id, anon_1.instances_user_id AS anon_1_instances_user_id, anon_1.instances_project_id AS anon_1_instances_project_id, anon_1.instances_image_ref AS anon_1_instances_image_ref, anon_1.instances_kernel_id AS anon_1_instances_kernel_id, anon_1.instances_ramdisk_id AS anon_1_instances_ramdisk_id, anon_1.instances_hostname AS anon_1_instances_hostname, anon_1.instances_launch_index AS anon_1_instances_launch_index, anon_1.instances_key_name AS anon_1_instances_key_name, anon_1.instances_key_data AS anon_1_instances_key_data, anon_1.instances_power_state AS anon_1_instances_power_state, anon_1.instances_vm_state AS anon_1_instances_vm_state, anon_1.instances_task_state AS anon_1_instances_task_state, anon_1.instances_memory_mb AS anon_1_in
@breu
breu / gist:6432327
Created September 4, 2013 03:02
amazon review
We'll see if this gets published
http://www.amazon.com/Sims-Starter-Pack-Online-Game/dp/B00CQOG8MM/ref=dsvrt_myd_asin_block
There is a TL;DR way down at the bottom. Read that first then come back for the rest.
I purchased this for my daughter without reading any of the reviews because who, of course not me, reads reviews before they purchase something that can only be returned with a credit card dispute? I had purchased the Sims3 as a digital download for a PC way back in 2011 and the technology sure has gone downhill since. I mean we can launch a rocket and put a man on the moon with the computing power of an abacus but we can't reliably provide a method for downloading a digital item in the digital era with digital computers. If we keep this up we may as well turn our computers in for sticks and cave wall drawings.
So, after downloading the cheesy "Installer", opening it like I do any other .DMG file, and finding the Amazon Installer I am thinking that I have somehow bested the others that have tri
@breu
breu / gist:6810149
Created October 3, 2013 13:51
rabbit_hosts chef search gem
osops_search(search_string="rabbitmq-server",one_or_all=:all,include_me=true,order=[:role]).sort_by{|ip| IPAddr.new ip.rabbitmq.address}.map {|k| "#{k.rabbitmq.address}:#{k.rabbitmq.port}"}.join(",")