root@a2s41:/var/log/contrail# contrail-status
== Contrail Control ==
supervisor-control: active
contrail-control active
contrail-control-nodemgr active
contrail-dns active
contrail-named active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) sed -i 's/ net_obj = VirtualNetwork(net_name, project_obj, id_perms=id_perms)/&\n net_obj.uuid = str(uuid.uuid4())/' /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py | |
Repeat the same for SG neutron_to_vnc() | |
2) In contrail-api.conf add these to DEFAULT section | |
subnet_allocator_write=cassandra | |
subnet_allocator_read=cassandra | |
list_optimization_enabled=True | |
3) Increase the FD limits in /etc/contrail/supervisor_openstack.conf (min_fds) and /etc/default/neutron-server (ulimit -n ), | |
for rabbitmq-server: /etc/default/rabbitmq-server (ulimit -n) | |
4) other sysctl tweaks | |
net.netfilter.nf_conntrack_max = 256000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ubuntu-tsn:~# vrouter --info | |
vRouter module version 2.20 (Built by ddivakar@ubuntu-build02 on 2015-05-22 14:44:19.328782) | |
Interfaces limit 4352 | |
VRF tables limit 65536 | |
NextHops limit 132096 | |
MPLS Labels limit 132096 | |
Bridge Table limit 262144 | |
Bridge Table Overflow limit 4096 | |
Flow Table limit 524288 | |
Flow Table overflow limit 8192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@Host1-CN1:~# pycassaShell -H 15.15.15.3 -k config_db_uuid | |
import readline | |
deleted_ids=['3de7d45a-9cd5-416f-a7e4-337fddb1b7ef', '8dbfb05c-e6ee-4266-988b-9e199b075f02', 'a09fc11e-7e85-42d2-80ee-03ccad58e357'] | |
def test(): | |
for k,v in OBJ_UUID_TABLE.get_range(column_count=10000000): | |
if k in deleted_ids: | |
print v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.x | |
python -m SimpleHTTPServer 8000 | |
Python 3.x | |
python -m http.server 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To generate certs: | |
apt-get install openvswitch-common | |
ovs-pki init | |
ovs-pki req+sign vtep | |
scp vtep-cert.pem root@<tor>:/var/db/certs | |
scp vtep-privkey.pem root@<tor>:/var/db/certs | |
QFX Config: | |
set protocols ovsdb controller <ha proxy vip> protocol ssl port <port> | |
(remove the passive option) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Check http://<compute-ip>:8085/Snh_ItfReq?name=<tap_name> | |
a. If vif status is not active then it’s a known corner case issue with agent and afaik vrouter-agent restart is the only way to recover. | |
b. if vrf_name/vn_name or other config shows -error- then the configs weren’t downloaded from control-node | |
i. get the active control node via http://<compute-ip>:8085/Snh_AgentXmppConnectionStatusReq? With cfg_controller ‘yes’ | |
ii. Check whether vmi has vmi-ri,vn,instance-ip as neighbor under ifmap in control http://<control-ip>:8083/Snh_IFMapTableShowReq?table_name=virtual-machine-interface | |
iii. If not found, do ‘netstat -antp | grep <control-process-id> | grep 8443’ and find the connected ifmap server | |
iv. On the ifmap-server do ‘curl -uadmin:contrail123 http://127.0.0.1:8095/virtual-machine-interface/<vmi-id> | python -m json.tool’ and check for vn, ri refs | |
v. If refs not found, check for schema.err on the active schema node around the vmi create timestamp. | |
vi. If no errors, check the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Accidental git amend on top of the Head | |
# Move the current head so that it's pointing at the old commit | |
# Leave the index intact for redoing the commit | |
git reset --soft HEAD@{1} | |
# commit the current tree using the commit details of the previous | |
# HEAD commit. (Note that HEAD@{1} is pointing somewhere different from the | |
# previous command. It's now pointing at the erroneously amended commit.) | |
git commit -C HEAD@{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit __get__ of APIParamsCall() Class /usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py | |
The self.function will be the actual neutron client api function | |
if 'format' in kwargs: | |
instance.format = kwargs['format'] | |
print self.function | |
ret = self.function(instance, *args, **kwargs) | |
instance.format = _format | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
neutron: | |
1) To allow long URI | |
root@b5s29:/usr/lib/python2.7/dist-packages# git diff | |
diff --git a/neutron/wsgi.py b/neutron/wsgi.py | |
index bd4b5e6..bf084a0 100644 | |
--- a/neutron/wsgi.py | |
+++ b/neutron/wsgi.py | |
@@ -262,7 +262,8 @@ class Server(object): | |
max_size=self.num_threads, | |
log=loggers.WritableLogger(LOG), |
OlderNewer