sudo apt-get –y install curl
echo "127.0.0.1 $(hostname)" >> /etc/hosts
=== Find count of number of objects in config db obj_uuid_table === | |
cat << EOF | pycassaShell -H 10.84.25.206 -k config_db_uuid -f /dev/stdinprint "Number of rows in obj_uuid_table: %s" %(len(list(OBJ_UUID_TABLE.get_range(column_count=1)))) | |
exit() | |
EOF | |
=== Find count of objects of different types in config db === | |
echo "for r,c in OBJ_FQ_NAME_TABLE.get_range(): print r; print OBJ_FQ_NAME_TABLE.get_count(r)" | pycassaShell -H 10.84.11.2 -k config_db_uuid -f /dev/stdin | |
=== Execute a command for certain duration only === | |
grep -e api -e schema -e snmp <(timeout 20s tcpdump -ni any port 9100 -A -s 1500 | grep "X-Contrail-Useragent") | sort | uniq -c |
1. timeout when publishing to ifmap-server (mapclient.call()) | |
when timeout happens keep retrying | |
2. ifmap-server code needs to inspect healthcheck object publish and if it misses n of them, exit() OR | |
config-nodemgr keeps reading healthcheck object from ifmap-server and if it can't read in n secs or value is stale, kill ifmap-server | |
3. control-node keeps reading healthcheck object from ifmap and it sees stale, move to a new ifmap-server | |
4. ifmap-publish-greenlet enqueue finds q-full, no change from current |
[Cleanup-Steps] | |
0. Deleted all service-instances, VMs, networks. | |
1. service supervisor-webui stop on all contrail controllers | |
2. service supervisor-analytics stop on all contrail controllers | |
3. service supervisor-config stop on all contrail controllers | |
4. service supervisor-control stop on all contrail controllers | |
5. service supervisor-database stop on all contrail controllers | |
6. service zookeeper stop on all contrail controllers | |
7. mv /var/lib/cassandra /var/lib/cassandra.old | |
8. mv /var/lib/zookeeper/version-2 /var/lib/zookeeper/version-2.old |
root@a5s8:~# neutron net-create test-net-1 | |
Created a new network: | |
+-------------------------+--------------------------------------+ | |
| Field | Value | | |
+-------------------------+--------------------------------------+ | |
| admin_state_up | True | | |
| contrail:fq_name | default-domain | | |
| | admin | | |
| | test-net-1 | | |
| contrail:instance_count | 0 | |
in vnc_api/__init__.py | |
``` | |
import sys | |
import imp | |
class MyImportFinder(object): | |
def find_module(self, fullname, path=None): | |
print fullname |
#!/bin/bash | |
sudo echo "deb http://repo.aptly.info/ squeeze main" > /etc/apt/sources.list.d/aptly.list | |
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install aptly |
== net-create == | |
2015-02-03 14:28:14.149 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] get_network_count(): {u'count': 3} | |
2015-02-03 14:28:14.150 INFO [neutron.quota] Loaded quota_driver: <neutron_plugin_contrail.plugins.opencontrail.quota.driver.QuotaDriver object at 0x3831e50>. | |
2015-02-03 14:28:14.560 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] create_network(): {u'status': u'ACTIVE', u'router:external': False, u'subnets': [], u'name': u'n10', u'admin_state_up': True, u'tenant_id': u'7acd1c8574a9441e9363e112b58a1f02', u'shared': False, u'contrail:instance_count': 0, u'id': u'cc70388a-515a-4c9c-aae8-5d50faf60b53', u'contrail:fq_name': [u'default-domain', u'admin', u'n10']} | |
== subnet-create == | |
2015-02-03 14:29:51.324 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] get_network(): filters: {u'name': [u'n10']} data: [{u'shared': False, u'router:external': False, u'id': u'cc70388a-515a-4c9c-aae8-5d50faf60b53', u'tenant_id': u'7acd1 |
# e.g pycassaShell -H <db-node-ip> -f db_in_json.py | sed -e '1,/contents:/d' | python -m json.tool | |
from pprint import pprint | |
import json | |
import kazoo.client | |
db_contents = {'cassandra': {}, | |
'zookeeper': {}} | |
cassandra_contents = db_contents['cassandra'] | |
for ks_name in ['config_db_uuid', |