Skip to content

Instantly share code, notes, and snippets.

View kapilt's full-sized avatar
🌩️
🌩 📦 🔭 📻 🚀 🛰

Kapil Thangavelu kapilt

🌩️
🌩 📦 🔭 📻 🚀 🛰
View GitHub Profile
@kapilt
kapilt / gist:41552afa0eef5730c686
Last active August 29, 2015 14:08
kubernetes failure on first attempt to register minion
2014-10-26 02:33:12 INFO network-relation-changed Registering machine
2014-10-26 02:33:12 INFO network-relation-changed registration request
{'kind': 'Minion', 'id': u'10.132.218.156',
'resources': {'capacity': {'mem': '2049988 K', 'cpu': 2}}, 'hostIP': u'10.132.218.156'}
2014-10-26 02:33:12 INFO network-relation-changed registration result
{"kind":"Status","creationTimestamp":null,"selfLink":"/api/v1beta1/minions",
"apiVersion":"v1beta1","status":"Failure",
"message":"The requested resource does not exist.",
"code":500}
import os
import subprocess
import yaml
from charmhelpers.core import hookenv
LATEST = "latest"
class Service(dict):
/*
ideal for a data format agnostic, schema consuming component
*/
var MySchema = new Y.DataSchema.JSON({'metaFields':{jobId: "jobId", totalRecords:"totalRecords"}})
var new Y.SchemaConsumer({schema:MySchema})
Y.SchemaConsumer.process( data );
Y.SchemaConsumer.process = function(data) {
bzr merge ../trunk
bzr: ERROR: exceptions.AssertionError: Unknown kind 'absent'
Traceback (most recent call last):
File "/Users/kapil/software/pytools/lib/python2.5/site-packages/bzr-2.0.2-py2.5-macosx-10.5-i386.egg/bzrlib/commands.py", line 842, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/Users/kapil/software/pytools/lib/python2.5/site-packages/bzr-2.0.2-py2.5-macosx-10.5-i386.egg/bzrlib/commands.py", line 1037, in run_bzr
ret = run(*run_argv)
File "/Users/kapil/software/pytools/lib/python2.5/site-packages/bzr-2.0.2-py2.5-macosx-10.5-i386.egg/bzrlib/commands.py", line 654, in run_argv_aliases
return self.run(**all_cmd_args)
#!/bin/bash
rm -rf a b
mkdir a
# do some work
cd a
bzr init
# make a branch
[Wed Feb 10 19:50:09 2010][001687][EUCAINFO ] walrus_request(): saved image in /var/lib/eucalyptus/instances/admin/i-4C300941/disk-digest
[Wed Feb 10 19:50:09 2010][001687][EUCAFATAL ] error: insufficient disk capacity remaining (2043MB) in VM Type of instance i-4C300941 for component disk
[Wed Feb 10 19:50:09 2010][001687][EUCAERROR ] get_cached_file() failed (errno=0)
[Wed Feb 10 19:50:09 2010][001687][EUCAFATAL ] Failed to prepare images for instance i-4C300941 (error=1)
[Wed Feb 10 19:50:10 2010][001687][EUCAERROR ] libvirt: Domain not found: no domain with matching name 'i-4C300941' (code=42)
[Wed Feb 10 19:50:10 2010][001687][EUCAINFO ] vrun(): [rm -rf /var/lib/eucalyptus/instances/admin/i-4C300941/]
[Wed Feb 10 19:50:10 2010][001687][EUCAINFO ] stopping the network (vlan=10)
[Wed Feb 10 19:50:12 2010][001687][EUCADEBUG ] doDescribeResource() invoked
[Wed Feb 10 19:50:12 2010][001687][EUCADEBUG ] doDescribeInstances() invoked
[Wed Feb 10 19:50:17 2010][001687][EUCADEBUG ] doDescribeResource() invoked
from msgpack import packs, unpacks
from simplejson import dumps, loads
d = {'x':range(100), 'y':{'abc':'def'}, 'zero':None}
d['x'].append('a')
import time
def time_msgpack():
stime = time.time()
kapil@kapil-laptop:~/tools$ ls python/lib/python2.5/site-packages/pida/ui/
besttextview buttons.pyc gtkforms.pyc icons.pyc interfaces.pyc objectlist.py popupwindow.py splash.py uimanager.py widgets.py
books.py dropdownmenutoolbutton.py htmltextview.py __init__.py languages.py objectlist.pyc popupwindow.pyc splash.pyc uimanager.pyc widgets.pyc
books.pyc dropdownmenutoolbutton.pyc htmltextview.pyc __init__.pyc languages.pyc paneds.py prioritywindow.py terminal.py views.py window.py
buttons.py gtkforms.py icons.py interfaces.py moo_stub.so paneds.pyc prioritywindow.pyc terminal.pyc views.pyc window.pyc
kapil@kapil-laptop:~/tools$ . python/bin/activate
(python)kapil@kapil-laptop:~/tools$ python
Python 2.5.4 (r254:67916, Sep 20 2009, 10:05:43)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other
# stuff too? No support for SuperColumns, but that should be easy enough to add.
import bisect
import copy
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn
class SSTable(object):
(dj)kapil@kapil-laptop:~/services/messaging/zookeeper_dashboard$ python manage.py runserver
Validating models...
/home/kapil/services/messaging/dj/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/utils/hashcompat.py:13: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Unhandled exception in thread started by <function inner_run at 0x96f5b54>
Traceback (most recent call last):
File "/home/kapil/services/messaging/dj/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/commands/runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
File "/home/kapil/services/messaging/dj/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/management/base.py", line 249, in validate
num_errors = get_validation_errors(s, app)