Skip to content

Instantly share code, notes, and snippets.

View cholcombe973's full-sized avatar

Chris Holcombe cholcombe973

  • @tesla.com
  • Portland
View GitHub Profile
{% set release = grains['lsb_distrib_codename'] %}
ceph-repo:
pkgrepo.managed:
- humanname: Ceph Repo
- name: deb http://ceph.com/debian-emperor/ {{release}} main
- dist: {{release}}
- file: /etc/apt/sources.list.d/ceph.list
- key_url: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
- require_in:
- pkg: ceph-packages
@cholcombe973
cholcombe973 / parser.out
Created July 29, 2015 22:38
pynfs xdrgen.py parser output
Unused terminals:
Grammar
Rule 1 specification -> definition_list
Rule 2 definition_list -> definition definition_list
Rule 3 definition_list -> empty
Rule 4 definition -> constant_def
@cholcombe973
cholcombe973 / parsetab.py
Created July 29, 2015 22:40
parsetab.py output
# parsetab.py
# This file is automatically generated. Do not edit.
_lr_method = 'LALR'
_lr_signature = '\xd1\xe2}\xff\xb0\xc7x\x81\x97\xbdc\x81\xd6\xa7O`'
_lr_action_items = {'CONST':([0,6,10,11,12,50,75,76,77,78,130,],[1,-6,-5,1,-4,-15,-18,-16,-17,-7,-61,]),'DEFAULT':([122,124,132,145,],[-47,134,-46,-45,]),'VOID':([5,52,67,94,98,113,119,123,126,127,133,143,144,158,],[16,16,16,16,110,110,110,-49,16,139,-48,-50,16,-65,]),'QUADRUPLE':([5,52,67,94,98,113,119,123,126,127,133,143,144,147,158,],[17,17,17,17,17,17,17,-49,17,17,-48,-50,17,17,-65,]),'LBRACKET':([42,53,],[64,73,]),'PROGRAM':([0,6,10,11,12,50,75,76,77,78,130,],[2,-6,-5,2,-4,-15,-18,-16,-17,-7,-61,]),'STAR':([17,18,19,20,24,26,27,30,31,32,33,34,43,44,46,49,51,92,95,137,],[-33,41,-36,-37,-38,-35,-30,-29,-32,-31,-39,-34,-27,-28,-42,-40,-41,-56,-53,-43,]),'RBRACE':([57,59,60,62,68,69,72,80,81,82,83,85,94,99,105,106,107,113,117,118,119,122,124,125,129,132,135,136,145,153,154,158,],[-8,-10,-9,-60,-58,92,95,-60,100,-64,-11,-12,-54,-63,-59,-57,-55,-60,128,-
@cholcombe973
cholcombe973 / gist:ea99f3eebf5adef8465a
Created August 14, 2015 17:17
Gluster Juju Charm output
unit-gluster-1[913]: 2015-06-26 15:54:59 INFO unit.gluster/1.start logger.go:40 * Starting glusterd service glusterd
unit-gluster-1[913]: 2015-06-26 15:55:02 INFO unit.gluster/1.start logger.go:40 ...done.
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0.juju-log cmd.go:247 server:89: I am the leader: 89
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0.juju-log cmd.go:247 server:89: Loading config
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0.juju-log cmd.go:247 server:89: Config yaml file: Config { volume_name: "test", brick_paths: ["/mnt/brick1", "/mnt/brick2"], cluster_type: Replicate, replicas: 2 }
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0.juju-log cmd.go:247 server:89: Checking for new peers to probe
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0.juju-log cmd.go:247 server:89: peer list: [UUID: 2713f973-f97c-4d8e-a983-98affe406e7d Hostname: 10.0.3.184 Status: Connected]
unit-gluster-0[936]: 2015-06-26 15:55:07 INFO unit.gluster/0
Example with 1 brick set in the config file:
root@chris-local-machine-224:~# gluster vol info
Volume Name: test
Type: Distributed-Replicate
Volume ID: 6a17de6b-f793-4dbb-ba94-2b56570db678
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
[2015-08-14 22:00:06.896037] E [dict.c:2747:dict_unserialize] (--> /usr/local/lib/libglusterfs.so.0(_gf_log_callingfn+0x22d)[0x7f8ced2b10cf] (--> /usr/local/lib/libglusterfs.so.0(dict_unserialize+0x2ad)[0x7f8ced2abd04] (--> /usr/local/lib/glusterfs/3.7.2/xlator/features/quotad.so(quotad_aggregator_getlimit+0x212)[0x7f8ce71b6e24] (--> /usr/local/lib/libgfrpc.so.0(rpcsvc_handle_rpc_call+0x4b2)[0x7f8ced0721dd] (--> /usr/local/lib/libgfrpc.so.0(rpcsvc_notify+0x16a)[0x7f8ced072530] ))))) 0-dict: undersized buffer passed. available (140242896030340) < required (140242896030344)
[2015-08-14 22:00:06.896065] E [quotad-aggregator.c:207:quotad_aggregator_getlimit] 0-quotad: Failed to unserialize req-buffer to dictionary
pending frames:
frame : type(0) op(0)
patchset: git://git.gluster.com/glusterfs.git
signal received: 11
time of crash:
2015-08-14 22:00:06
configuration details:
argp 1
======================================================================
FAIL: tests.payload.test_execd.ExecDTestCase.test_execd_run_dies_with_return_code
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/home/chris/repos/charm-helpers/.venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/chris/repos/charm-helpers/tests/payload/test_execd.py", line 151, in test_execd_run_dies_with_return_code
exit_.assert_called_with(126)
File "/home/chris/repos/charm-helpers/.venv/local/lib/python2.7/site-packages/mock.py", line 831, in assert_called_with
raise AssertionError('Expected call: %s\nNot called' % (expected,))
@cholcombe973
cholcombe973 / gist:f484a9cad46fd4170caf
Created September 17, 2015 22:27
juju status output
elasticsearch:
charm: cs:trusty/elasticsearch-10
exposed: false
service-status:
current: unknown
since: 17 Sep 2015 15:17:51-07:00
relations:
client:
- logstash-indexer
peer:
make test2
Starting Py2 tests...
.venv/bin/nosetests -s --nologcapture tests/
........................................................................................................................................................................................................................................juju-log: INFO: Loading kernel module ip6_tables
modprobe: ERROR: could not insert 'ip6_tables': Operation not permitted
Ejuju-log: INFO: Loading kernel module ip6_tables
modprobe: ERROR: could not insert 'ip6_tables': Operation not permitted
E.........E........juju-log: INFO: Loading kernel module ip6_tables
modprobe: ERROR: could not insert 'ip6_tables': Operation not permitted
E..........................................................................................................................................................................................................................................................................................................................................
extern crate crc;
use crc::{crc32, Hasher32};
fn main(){
let foo = String::from("foo bar baz");
let foo_bytes = foo.into_bytes();
println!("foo bytes: {:?}", &foo_bytes);
println!("foo bar baz: {}",crc32::checksum_castagnoli(&foo_bytes));
}