Skip to content

Instantly share code, notes, and snippets.

View j-griffith's full-sized avatar

John Griffith j-griffith

  • Bozeman, Montana
View GitHub Profile
@mattsmithdatera
mattsmithdatera / iscsi-rpc.proto
Last active November 9, 2018 22:16
Iscsi in a container, communicating via RPC
syntax = "proto3";
package iscsi_rpc;
service Iscsiadm {
rpc SendArgs(SendArgsRequest) returns (SendArgsReply) {}
rpc GetInitiatorName(GetInitiatorNameRequest) returns (GetInitiatorNameReply) {}
}
message SendArgsRequest {
@ioggstream
ioggstream / system-sleep-xhci.sh
Created November 7, 2017 13:08
Disable broken xhci device before suspend and avoid freeze.
#!/bin/sh
#
# This script should prevent the following suspend errors
# which freezes the Dell Inspiron laptop.
#
# Put it in /usr/lib/systemd/system-sleep/xhci.sh
#
# The PCI 00:14.0 device is the usb xhci controller.
#
# kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
@j-griffith
j-griffith / configure_docker0.sh
Created September 2, 2016 03:36 — forked from kamermans/configure_docker0.sh
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# You can run this script directly from github as root like this:
# curl -sS https://gist.githubusercontent.com/kamermans/94b1c41086de0204750b/raw/configure_docker0.sh | sudo bash -s - 192.168.254.1/24
#
# * Make sure you replace "192.168.254.0/24" with the network that you want to use
#
# NOTE: This script is intended for Debian / Ubuntu only!
if [ $# -lt 1 ]; then
Use "nova network-add" after your'e up and running
nova network-create data-net --bridge br200 --multi-host T --fixed-range-v4 10.10.0.0/18 --share-address T --bridge-interface p2p1
The above command SHOULD move the IP from p2p1 to br200, but this never seems to work for me. So I manually moved it:
ip addr del 10.10.60.23/255.255.192.0
ip addr del 10.10.60.23/255.255.192.0 dev p2p1
ip addr del 10.10.60.1/255.255.255.0 dev br200
ip addr add 10.10.60.23/255.255.192.0 dev br200
#[lvmdriver1]
#volume_group=lvm-group-1
#volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
#volume_backend_name=LVM_iSCSI_cab1
#[lvmdriver2]
#volume_group=lvm-group-2
#volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
#volume_backend_name=LVM_iSCSI_cab2
#[lvmdriver3]
#volume_group=lvm-group-3
# Define the names of the groups for multiple volume backends
#enabled_backends=fakedriver,lvmdriver
# Define the groups as above
#[lvmdriver]
#volume_group=lvm-group-1
#volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
#backend_volume_type=lvm
#[fakedriver]
#volume_driver=cinder.volume.driver.FakeISCSIDriver
@vishvananda
vishvananda / bp.sh
Last active October 2, 2015 07:58
Script for backporting OpenStack branches
#!/usr/bin/env bash
# This little script is to make backporting patches easier.
# Instructions
# ------------
# Make sure that <btranch> exists:
# git branch -D <branch>
# git checkout -b <branch> origin/<branch>
# Grab the file and stick it in your <project> directory:
# curl -OL https://raw.github.com/gist/2206428/bp.sh
# Make sure the script is runnable: