Skip to content

Instantly share code, notes, and snippets.

View hub-cap's full-sized avatar

Michael Basnight hub-cap

View GitHub Profile
#first get the pid
sudo cat /var/run/mysqld/mysqld.pid
9036
#then make sure its in proc
-d /proc/9036/
# If we always do this, we can stop running the mysql ping's and just check /proc/PID to make sure its still running every X seconds when we do the pingcheck.
(py27)MF507ZDF8X:trove mbasnigh$ testr run
running=${PYTHON:-python} -m subunit.run discover ./trove/tests/unittests
/Users/mbasnigh/Documents/workspace/python/db/trove/trove/.tox/py27/lib/python2.7/site-packages/eventlet/hubs/__init__.py:8: UserWarning: Module argparse was already imported from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.pyc, but /Users/mbasnigh/Documents/workspace/python/db/trove/trove/.tox/py27/lib/python2.7/site-packages is being added to sys.path
import pkg_resources
No handlers could be found for logger "trove.guestagent.backup.backupagent"
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
58 ####key_buffer = 16M
59 key_buffer_size = {{ 50 * flavor_multiplier }}M
60 ####max_allowed_packet = 16M
61 max_allowed_packet = {{ 1 * flavor_multiplier }}M
62 thread_stack = 192K
63 ####thread_cache_size = 8
64 thread_cache_size = {{ 4 * flavor_multiplier }}
65 # This replaces the startup script and checks MyISAM tables if needed
66 # the first time they are touched
67 myisam-recover = BACKUP
2:02 <lifeless> Worse case, if you use pystache directly at least the templates will be in the same language.
2:03 <hub_cap> does pystache let me do things like {{ X*some_var}}
2:03 <hub_cap> sry using jinja template
2:03 <lifeless> What does that mean in jinja?
2:03 <hub_cap> so if i have a value in X itll multiply it
2:03 <hub_cap> so i dont have to put all that stuff into the code, cuz i know that the flavor will change a bunch of values
2:04 <hub_cap> i assume apply-config does this too?
2:04 <lifeless> Fairly sure not; it aims for complete separation of code and template.
2:04 <hub_cap> https://gist.github.com/hub-cap/5952484
2:05 <lifeless> os-apply-config takes one (today) or more (very soon) json files containing the data to render, and then renders all the templates in a template tree for you.
class SingleInstanceConfigTemplate(object):
- def __init__(self, config_location, flavor_multiplier):
+ def __init__(self, config_location, flavor_multiplier, disk_multiplier):
self.config_location = config_location
self.flavor_multiplier = flavor_multiplier
+ self.disk_multiplier = disk_multiplier
self.template = get_env().get_template("mysql.config.template")
def render(self):
1:00 <konetzed> imsplitbit: you could do it from your car
1:00 <konetzed> you could do it from a boat
1:00 <!> jrodom [email protected] has joined #openstack-trove
1:00 <!> jrodom [email protected] has quit Remote host closed the connection
1:00 <konetzed> even sitting with a goat
1:00 <hub_cap> oh god
1:01 <!> jrodom jrodom@nat/rackspace/x-odjcovnzqqhqzpxn has joined #openstack-trove
1:01 <konetzed> yes?
1:01 <imsplitbit> well I decided about 2:30 that I really needed to ice my knee cause it was really hurting
1:01 <hub_cap> hey jrodom
64 bytes from 74.125.239.40: icmp_seq=218 ttl=56 time=29.524 ms
64 bytes from 74.125.239.40: icmp_seq=219 ttl=56 time=27.183 ms
64 bytes from 74.125.239.40: icmp_seq=220 ttl=56 time=92.206 ms
64 bytes from 74.125.239.40: icmp_seq=221 ttl=56 time=71.290 ms
64 bytes from 74.125.239.40: icmp_seq=222 ttl=56 time=174.218 ms
64 bytes from 74.125.239.40: icmp_seq=223 ttl=56 time=31.484 ms
64 bytes from 74.125.239.40: icmp_seq=224 ttl=56 time=461.100 ms
64 bytes from 74.125.239.40: icmp_seq=225 ttl=56 time=144.892 ms
64 bytes from 74.125.239.40: icmp_seq=226 ttl=56 time=300.932 ms
64 bytes from 74.125.239.40: icmp_seq=227 ttl=56 time=761.950 ms
64 bytes from 74.125.239.40: icmp_seq=452 ttl=56 time=63.858 ms
64 bytes from 74.125.239.40: icmp_seq=453 ttl=56 time=344.689 ms
64 bytes from 74.125.239.40: icmp_seq=454 ttl=56 time=194.397 ms
ping: sendto: No route to host
ping: sendto: No route to host
Request timeout for icmp_seq 455
ping: sendto: No route to host
Request timeout for icmp_seq 456
ping: sendto: No route to host
Request timeout for icmp_seq 457
2013-07-16 12:28:08.908 19916 DEBUG trove.common.wsgi [req-8e9bd102-72f8-41b7-ac06-6eaa2b5526e4 radmin 2c7c28726dce420c8739a47ed68d04bb] Traceback (most recent call last):
File "/mnt/hgfs/mbasnigh/Documents/workspace/python/db/trove/trove/trove/common/wsgi.py", line 323, in execute_action
**action_args)
File "/mnt/hgfs/mbasnigh/Documents/workspace/python/db/trove/trove/trove/openstack/common/wsgi.py", line 395, in execute_action
return self.dispatch(self.controller, action, request, **action_args)
File "/mnt/hgfs/mbasnigh/Documents/workspace/python/db/trove/trove/trove/openstack/common/wsgi.py", line 404, in dispatch
return method(*args, **kwargs)
File "/mnt/hgfs/mbasnigh/Documents/workspace/python/db/trove/trove/trove/instance/service.py", line 207, in create
backup_id)
File "/mnt/hgfs/mbasnigh/Documents/workspace/python/db/trove/trove/trove/instance/models.py", line 426, in create
64 bytes from 74.125.239.103: icmp_seq=65060 ttl=56 time=2846.246 ms
64 bytes from 74.125.239.103: icmp_seq=65061 ttl=56 time=1886.393 ms
64 bytes from 74.125.239.103: icmp_seq=65062 ttl=56 time=981.436 ms
64 bytes from 74.125.239.103: icmp_seq=65063 ttl=56 time=427.501 ms
64 bytes from 74.125.239.103: icmp_seq=65064 ttl=56 time=571.285 ms
64 bytes from 74.125.239.103: icmp_seq=65065 ttl=56 time=1061.733 ms
64 bytes from 74.125.239.103: icmp_seq=65066 ttl=56 time=1043.610 ms
64 bytes from 74.125.239.103: icmp_seq=65067 ttl=56 time=879.301 ms
64 bytes from 74.125.239.103: icmp_seq=65068 ttl=56 time=273.653 ms
64 bytes from 74.125.239.103: icmp_seq=65069 ttl=56 time=40.953 ms