Skip to content

Instantly share code, notes, and snippets.

5 instances of following output each 2 seconds apart,
“ifconfig –a”
Vif –b
Dropstats
Vrfstats —get <vrf-id> , where vrf-id is Vrf for tap-interface of interest
First page of “flow –l | more” output
http://<compute>:8085/Snh_SandeshTaskRequest?
@dsundarraj
dsundarraj / haaudit.py
Created March 15, 2016 21:04
HA Audit script
import os
old_contrail_vip = '10.64.0.10'
contrail_vip = '10.64.37.25'
analytics_api_dest_port = '9081'
contrail_api_dest_port = '9100'
old_contrail_webui_port = '8143'
new_contrail_webui_port = '9143'
conf_file = '/root/contrail.backup/contrail-analytics-api.conf'
@dsundarraj
dsundarraj / mx-config.txt
Created March 15, 2016 20:28
MX Configuration Steps for Floating IP
Step 1: Enable tunnel services
for example: for an mx480 with two fpcs for redundant logical tunnels
fpc 1 {
pic 0 {
tunnel-services;
inline-services {
bandwidth 10g;
}
}
pic 1 {
@dsundarraj
dsundarraj / contrail-upgrade.txt
Created March 15, 2016 18:42
Contrail Upgrade with minimal downtime
Contrail Upgrade procedure – Minimal downtime
Upgrade procedure to minimize downtime in the production network. Upgrade controller and compute separately. The procedure is based on fab upgrade_contrail.
1. Workaround for the bug (https://bugs.launchpad.net/juniperopenstack/+bug/1506634 )
Create policy to deny stop/start of services during upgrade
fab -R control -- 'echo "#! /bin/sh" > /usr/sbin/policy-rc.d'
@dsundarraj
dsundarraj / contrail-backup-restore.txt
Created March 15, 2016 18:41
Contrail backup and restore
Contrail database backup/restore procedure
This procedure can be used to backup contrail database (except the ContrailAnalytics keyspace) during upgrade from R2.20#64 to R2.22.1#5. Incase of database corruption during the upgrade process, the backed up database can be restored on the cluster. The below procedure can be used to backup/restore contrail database except the ContrailAnalytics keyspace.
1.1 Dropping ContrailAnalytics keyspace before upgrade
If the user prefers to drop the ContrailAnalytics data before upgrading the cluster, then the following can be done:
From FAB_NODE, execute “fab stop_collector”
@dsundarraj
dsundarraj / snat.txt
Created March 15, 2016 18:40
SNAT in Opencontrail
Workflow:
- Assuming that you have a public network already setup
- Enable that network to be External
- neutron net-update public —router:external=True
- Create a test network
- neutron net-create test
@dsundarraj
dsundarraj / lbaas.txt
Created March 15, 2016 18:39
LBaaS in OpenContrail
Check for package installation:
root@oblocknode04:/etc/contrail# dpkg -l | grep haproxy
ii haproxy 1.5.4-1ppa1~precise amd64 fast and reliable load balancing reverse proxy
root@oblocknode04:/etc/contrail# dpkg -l | grep iproute
ii iproute 1:3.12.0-2 all transitional dummy package for iproute2
ii iproute2 3.12.0-2 amd64 networking and traffic control tools
root@oblocknode04:/etc/contrail# dpkg -l | grep netns
ii python-opencontrail-vrouter-netns 2.21.2-28 amd64 OpenContrail vrouter network namespace package