Skip to content

Instantly share code, notes, and snippets.

View portante's full-sized avatar

Peter Portante portante

View GitHub Profile
@portante
portante / rsyslog-build-v8.15.master-stacksizes.log
Created December 5, 2015 13:19
Log output from a build of rsyslog using -Wstack-usage=4096, where warnings were issued for any routine using more than 4K of stack. There are not many, but there are two using 128K+ of stack.
$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/pportant/rsyslog/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make all-recursive
make[1]: Entering directory '/home/pportant/rsyslog'
Making all in compat
@portante
portante / scatter.js.diff
Created January 9, 2015 06:51
A set of changes to only draw "active" scatter points.
diff --git a/src/models/scatter.js b/src/models/scatter.js
index 03f2637..4143419 100644
--- a/src/models/scatter.js
+++ b/src/models/scatter.js
@@ -49,6 +49,7 @@ nv.models.scatter = function() {
, timeoutID
, needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
, renderWatch = nv.utils.renderWatch(dispatch, duration)
+ , _sizeRange_def = [16, 256]
;
{
"timestamp" : 1417816715652,
"cluster_name" : "elasticsearch.patriots",
"status" : "red",
"indices" : {
"count" : 79,
"shards" : {
"total" : 79,
"primaries" : 79,
"replication" : 0.0,
@portante
portante / sar.mapping.json
Created December 3, 2014 22:23
A proposed mapping of sar data to ElasticSearch
{
"sar": {
"_timestamp": {
"enabled": true,
"store": true,
"fielddata": {
"format": "doc_values"
}
},
"properties": {
@portante
portante / gist:402288a8b54f0d63ac7c
Created September 18, 2014 18:03
Kubernetes unit tests failures on master (a4912d7)
$ ./hack/test-go.sh
ok github.com/GoogleCloudPlatform/kubernetes/examples 1.170s coverage: 0.0% of statements
panic: test timed out after 30s
goroutine 8 [running]:
runtime.panic(0x744b20, 0xc210037770)
/usr/lib/golang/src/pkg/runtime/panic.c:266 +0xb6
testing.func·007()
/usr/lib/golang/src/pkg/testing/testing.go:596 +0x120
created by time.goFunc
@portante
portante / keystone-v3-setup-for-python-swiftclient-functional-tests.sh
Created August 15, 2014 20:57
A simple script to setup the "account" (project) and username required by the python-swiftclient functional tests using the defaults in its sample.conf file.
#!/bin/bash
# usage: <prog> <identity endpoint> [os-token]
# e.g. <prog> http://hostname:5000/v3 ADMIN
# hostname could be standalone keystone service or devstack keystone service
# sets up a project p1 and user u1 with admin role in domain d1
set -x
@portante
portante / keystonev3_suggested.diff
Created July 17, 2014 14:56
A simple suggestion for formatting long lines.
diff --git a/swiftclient/client.py b/swiftclient/client.py
index 8bb1ded..1807526 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -309,25 +309,21 @@ version 1.0 which requires ST_AUTH, ST_USER, and ST_KEY environment
variables to be set or overridden with -A, -U, or -K.''')
try:
- _ksclient = ksclient.Client(username=user,
- password=key,
@portante
portante / skip-on-no-container-reconciler.diff
Created June 17, 2014 03:24
A simple patch to skip a set of probe tests when there is no container-reconciler.conf file present.
diff --git a/test/probe/test_container_merge_policy_index.py b/test/probe/test_container_merge_policy_index.py
index 5a5054c..b44ecc3 100644
--- a/test/probe/test_container_merge_policy_index.py
+++ b/test/probe/test_container_merge_policy_index.py
@@ -175,7 +175,11 @@ class TestContainerMergePolicyIndex(unittest.TestCase):
def setUp(self):
if len(POLICIES) < 2:
- raise SkipTest()
+ raise SkipTest("Multiple storage policies not present")
@portante
portante / 0001-Bring-storage-policy-module-coverage-to-100.patch
Created June 16, 2014 20:12
A patch to bring test coverage of storage policies module to 100% from just running it's test module only.
From 981b623a5f0f08a6840437fb0015dd668855ec95 Mon Sep 17 00:00:00 2001
From: Peter Portante <peter.portante@redhat.com>
Date: Mon, 16 Jun 2014 16:07:20 -0400
Subject: [PATCH] Bring storage policy module coverage to 100%
A simple set of additional tests to ensure coverage of the storage policy
module is 100% from just running it's module test.
Change-Id: Id5773438c297678bcfe53e959bc9eb132170d30b
---
@portante
portante / sp-obj-srv-stack-trace.txt
Created June 12, 2014 21:32
Stack trace with storage policies from a probe test run where the object servers are returning 503s.
Jun 12 17:21:25 dhcp31-105 object-server: ERROR __call__ error with PUT /sdb1/617/AUTH_test/container-1824d0bb-f90d-42c4-8517-de7f8632bf25/object-b40d90d1-222c-4a91-83fc-445c5c66be35 :
Traceback (most recent call last):
File "/home/pportant/swift/swift/obj/server.py", line 678, in __call__
res = method(req)
File "/home/pportant/swift/swift/common/utils.py", line 2366, in wrapped
return func(*a, **kw)
File "/home/pportant/swift/swift/common/utils.py", line 970, in _timing_stats
resp = func(ctrl, *args, **kwargs)
File "/home/pportant/swift/swift/obj/server.py", line 459, in PUT
device)