Skip to content

Instantly share code, notes, and snippets.

View diff.diff
diff --git a/src/shaping/shaping_linux.go b/src/shaping/shaping_linux.go
index 9ed8dc5..c48306e 100644
--- a/src/shaping/shaping_linux.go
+++ b/src/shaping/shaping_linux.go
@@ -330,17 +330,6 @@ func lookupInterfaces() (wan, lan netlink.Link, err error) {
}
func setupRootQdisc(link netlink.Link) error {
- // Clean out old qdiscs
- qdiscs, err := netlink.QdiscList(link)
View testrun.txt
root@2822036df305:/usr/src/myapp# /usr/local/go/bin/go test -v github.com/facebook/augmented-traffic-control/src/api
=== RUN TestIndex
2015/12/03 17:17:41 http: panic serving [::1]:43043: runtime error: invalid memory address or nil pointer dereference
goroutine 12 [running]:
net/http.(*conn).serve.func1(0xc82012e160, 0x7fb1561c2020, 0xc820024280)
/usr/local/go/src/net/http/server.go:1287 +0xb5
github.com/facebook/augmented-traffic-control/src/api.getProxiedClientAddr(0x0, 0xc8200fac40, 0x0, 0x0, 0x0, 0x0)
/usr/src/myapp/.gopath/src/github.com/facebook/augmented-traffic-control/src/api/utils.go:151 +0x7b1
github.com/facebook/augmented-traffic-control/src/api.GetClientAddr(0xc8200fac40, 0x0, 0x0)
/usr/src/myapp/.gopath/src/github.com/facebook/augmented-traffic-control/src/api/utils.go:146 +0x45
View crash.txt
goroutine 25 [running]:
net/http.(*conn).serve.func1(0xc8201493f0, 0x7f0ff586ba10, 0xc820024468)
/usr/local/go/src/net/http/server.go:1287 +0xb5
github.com/facebook/augmented-traffic-control/src/api.getProxiedClientAddr(0x0,
0xc8203a4a80, 0x0, 0x0, 0x0, 0x0)
/usr/src/myapp/.gopath/src/github.com/facebook/augmented-traffic-control/src/api/utils.go:156
+0x7b1
github.com/facebook/augmented-traffic-control/src/api.GetClientAddr(0xc8203a4a80,
0x0, 0x0)
/usr/src/myapp/.gopath/src/github.com/facebook/augmented-traffic-control/src/api/utils.go:151
View pip_freeze.txt
atc-thrift==0.1.3
atcd==0.1.3
daemonize==2.4.1
Django==1.7
django-atc-api==0.1.3
django-atc-demo-ui==0.1.3
django-atc-profile-storage==0.1.3
django-bootstrap-themes==3.1.2
django-static-jquery==1.11.1
djangorestframework==3.3.1
View -
commit 683203e2271a5ba1f5d0e921ea3897fc85eeff64
Author: chantra <chantr4@gmail.com>
Date: Fri Dec 25 23:19:37 2015 -0800
Make htb class work on older kernels (2.6)
diff --git a/class.go b/class.go
index 35bdb33..06dac6a 100644
--- a/class.go
+++ b/class.go
View htb.diff
commit 683203e2271a5ba1f5d0e921ea3897fc85eeff64
Author: chantra <chantr4@gmail.com>
Date: Fri Dec 25 23:19:37 2015 -0800
Make htb class work on older kernels (2.6)
diff --git a/class.go b/class.go
index 35bdb33..06dac6a 100644
--- a/class.go
+++ b/class.go
View gist:36b73aabbe70b28a69a856f24d1274af
diff --git a/demo/producer_consumer.py b/demo/producer_consumer.py
index 8d4a236..e80bf39 100644
--- a/demo/producer_consumer.py
+++ b/demo/producer_consumer.py
@@ -5,6 +5,7 @@
# of patent rights can be found in the PATENTS file in the same directory.
#
from six.moves import xrange
+from sparts.sparts import option
from sparts.tasks.periodic import PeriodicTask
View producer_consumer.diff
diff --git a/demo/producer_consumer.py b/demo/producer_consumer.py
index 8d4a236..e80bf39 100644
--- a/demo/producer_consumer.py
+++ b/demo/producer_consumer.py
@@ -5,6 +5,7 @@
# of patent rights can be found in the PATENTS file in the same directory.
#
from six.moves import xrange
+from sparts.sparts import option
from sparts.tasks.periodic import PeriodicTask
View gist:ae127acf799d6b6fa25a8b6ec4bc18f1
chantra  sparts   master ✹  PYTHONPATH=. python demo/producer_consumer.py --Producer-foobar a b [ruby-2.2.1] 10:08:53
INFO:ProducerConsumer.Producer:Producer put 0.883608399041 into queue
DEBUG:ProducerConsumer:All tasks started
INFO:ProducerConsumer.Producer:option foobar type: <type 'str'> value: ['a', 'b']
DEBUG:ProducerConsumer:VService Active. Awaiting graceful shutdown.
INFO:ProducerConsumer.Producer:Producer put 0.504389502792 into queue
INFO:ProducerConsumer.Producer:option foobar type: <type 'str'> value: ['a', 'b']
INFO:ProducerConsumer.Producer:Producer put 0.341550019729 into queue
INFO:ProducerConsumer.Producer:option foobar type: <type 'str'> value: ['a', 'b']
INFO:ProducerConsumer.Producer:Producer put 0.674296821862 into queue
View gist:a1a69b4b3601f712712aa7b64b91b3ac
2016/05/19 19:08:52 panic: runtime error: invalid memory address or nil pointer dereference
goroutine 114 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
/usr/lib/go-1.6/src/runtime/debug/stack.go:24 +0x80
runtime/debug.PrintStack()
/usr/lib/go-1.6/src/runtime/debug/stack.go:16 +0x18
github.com/facebook/augmented-traffic-control/src/api.ErrorHandler.func1.1(0x7f1ef08f3ed0, 0xc8203d8750)
/home/chantra/augmented-traffic-control/.gopath/src/github.com/facebook/augmented-traffic-control/src/api/utils.go:89 +0xc5
panic(0x9df200, 0xc82000e150)
/usr/lib/go-1.6/src/runtime/panic.go:426 +0x4e9
You can’t perform that action at this time.