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"