Skip to content

Instantly share code, notes, and snippets.

View gist:45be6a034073f3df5f808bbc10100cbe
#!/bin/bash
install_docker() {
apt-get install -y screen
screen -dmS dockerinstall sh -c 'curl https://get.docker.com/ | sh'
}
install_and_launch_finish_install_script() {
cat > /tmp/finish-install.sh <<EOF
#!/bin/sh -x
View upgrade.py
#!/usr/bin/env python
import re
import yaml
nodes = ['ct1', 'stmonleader1', 'stmon1', 'stmon2', 'st1', 'ocdb1', 'oc1', 'gcp1', 'haproxy1', 'bootstrap1'] + ['cp%d' % x for x in range(1,100)]
with open('upgrade.yaml', 'r') as fp:
data = yaml.load(fp)
groups = {}
@sorenh
sorenh / zmq_test.c
Created Jul 29, 2015
ZMQ_LINGER problem reproducer
View zmq_test.c
#include <zmq.h>
#include <malloc.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
void *ctx, *socket;
@sorenh
sorenh / gist:3d6681c46827bb6c95f2
Created Jul 29, 2015
Reproduce ZMQ_LINGER problem
View gist:3d6681c46827bb6c95f2
#include <zmq.h>
#include <malloc.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
void *ctx, *socket;
View gist:9b3a3863d8f662886fda
$ ifmap-view localhost 8443 visual visual
MAP server connection = localhost:8443
MAP server credentials = visual:visual
Start node = None
Skip List = ['id-perms']
Verbose = 0
View gist:f7529adf019c7e70d388
soren@stmonleader1-production:~$ sudo ceph pg 6.6fe query
{ "state": "active+undersized+degraded",
"snap_trimq": "[]",
"epoch": 2556,
"up": [
41,
56],
"acting": [
41,
56],
View gist:447fd72da30a4cc42708
soren@stmonleader1-production:~$ sudo ceph pg dump_stuck
ok
pg_stat objects mip degr misp unf bytes log disklog state state_stamp v reported up up_primary acting acting_primary last_scrub scrub_stamp last_deep_scrub deep_scrub_stamp
7.234 0 0 0 0 0 0 0 0 active+undersized+degraded 2015-02-26 16:12:58.612008 0'0 2556:1597 [61,34] 61 [61,34] 61 0'0 2015-02-26 16:08:00.540058 0'0 2015-02-23 13:51:32.925346
8.284 0 0 0 0 0 0 0 0 active+undersized+degraded 2015-02-26 16:12:58.612437 0'0 2556:1585 [65,51] 65 [65,51] 65 0'0 2015-02-26 16:07:56.296722 0'0 2015-02-22 19:57:15.735102
1.2b7 0 0 0 0 0 0 0 0 active+undersized+degraded 2015-02-26 16:12:58.598721 0'0 2556:2257 [37,74] 37 [37,74] 37 0'0 2015-02-26 15
View -
/usr/bin/ruby1.9.1 -I/home/soren/src/puppet-rjil/modules/contrail/vendor/gems/rspec-core-3.1.7/lib:/home/soren/src/puppet-rjil/modules/contrail/vendor/gems/rspec-support-3.1.2/lib /home/soren/src/puppet-rjil/modules/contrail/vendor/gems/rspec-core-3.1.7/exe/rspec --pattern spec/\{classes,defines,unit,functions,hosts,integration\}/\*\*/\*_spec.rb --color
...............F.....
Failures:
1) contrail::vrouter with defaults
Failure/Error: should_not contain_class('contrail::repo')
Puppet::Error:
Could not autoload puppet/type/network_config: Could not autoload puppet/provider/network_config/interfaces: cannot load such file -- puppetx/filemapper on node bulky
# ./spec/fixtures/modules/network/lib/puppet/provider/network_config/interfaces.rb:1:in `require'
View -
+--------------------------------------+-----------------------------------------------+--------+------------+-------------+------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------------------------------------------+--------+------------+-------------+------------------------------------------+
| e8543706-6acc-4a93-9593-61e4898ebba1 | cp1_test041214214724 | ACTIVE | - | Running | soren-network=10.0.0.120 |
| e17e4b44-8a8f-4c19-ae4b-4a118ecd34da | cp1_testjenkins-puppet-rjil-gate-308 | ACTIVE | - | Running | soren-network=10.0.0.98 |
| ae386931-e5fd-4097-88c1-d5caf3774c41 | cp2_test041214214724 | ACTIVE | - | Running | soren-network=10.0.0.121 |
| 9d299580-6e55-
View gist:2af38647d0140527ae63
description "Contrail Control Node"
author "OpenContrail developers <dev@lists.opencontrail.org>"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
limit core unlimited unlimited
chdir /var/run
respawn
You can’t perform that action at this time.