Custom Search

Sunday, August 30, 2015

contrail-vrouter-utils files


$ dpkg -L contrail-vrouter-utils

/.
/usr
/usr/bin
/usr/bin/dropstats
/usr/bin/mirror
/usr/bin/vrfstats
/usr/bin/rt
/usr/bin/flow
/usr/bin/vif
/usr/bin/nh
/usr/bin/mpls
/usr/bin/vxlan
/usr/share
/usr/share/doc
/usr/share/doc/contrail-vrouter-utils
/usr/share/doc/contrail-vrouter-utils/copyright
/usr/share/doc/contrail-vrouter-utils/changelog.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/rt.1.gz
/usr/share/man/man1/vif.1.gz
/usr/share/man/man1/flow.1.gz
/usr/share/man/man1/vxlan.1.gz
/usr/share/man/man1/vrfstats.1.gz
/usr/share/man/man1/nh.1.gz
/usr/share/man/man1/mirror.1.gz
/usr/share/man/man1/dropstats.1.gz
/usr/share/man/man1/mpls.1.gz

Tuesday, August 25, 2015

OpenStack nova get-vnc-console example


$ nova get-vnc-console eab98b2b-a527-4b01-bc40-566ae8ed69ec novnc
+-------+-----------------------------------------------------------------------------------------------+
| Type  | Url                                                                                           |
+-------+-----------------------------------------------------------------------------------------------+
| novnc | http://api.mycloudservices.com:6080/vnc_auto.html?token=a92856a5-d13d-4a19-a52b-b5537fbcb278 |
+-------+-----------------------------------------------------------------------------------------------+

* eab98b2b-a527-4b01-bc40-566ae8ed69ec <---- id="" span="" vm="">





Monday, August 24, 2015

Contrail Compute node vRouter Agent Port Check


$sudo netstat -tuplen | grep -E "8085|9090"






Contrail Config Node Service Port Check


$sudo netstat -tuplen | grep -E "9100|9160|9110|2181|5672|8443|8082|5998"


OpenContrail 2.1 Packages

1)
$ dpkg -l | grep contrail | wc -l
18

2)
$ dpkg -l | grep contrail

ii  contrail-config                      2.1+4986+999644c                 all          OpenContrail configuration management


ii  contrail-config-openstack            2.1+4986+999644c                 all          OpenContrail configuration OpenStack module

ii  contrail-control                     2.1+4986+999644c                 amd64        OpenContrail control-node

ii  contrail-dns                         2.1+4986+999644c                 amd64        OpenContrail control-dns

ii  contrail-lib                         2.1+4986+999644c                 amd64        OpenContrail libraries

ii  contrail-utils                       2.1+4986+999644c                 amd64        OpenContrail tools and utilities

ii  contrail-web-controller              2.1+4986+999644c                 amd64        OpenContrail WebUI Controller

ii  contrail-web-core                    1.21+3290+ca6b2ff                amd64        OpenContrail WebUI Core

ii  ifmap-server                         0.3.2.4-1contrail1               all          irond is a IF-MAP MAP server

ii  neutron-plugin-contrail              2.1+122+de9da5d                  all          OpenStack virtual network service - Opencontrail

ii  python-backports.ssl-match-hostname  3.4.0.2-1contrail1               all          The ssl.match_hostname() function from Python 3.4

ii  python-certifi                       1.0.1-1contrail1                 all          Python SSL Certificates

ii  python-contrail                      2.1+4986+999644c                 all          OpenContrail python-libs

ii  python-geventhttpclient              1.1.0-1contrail1                 amd64        http client library for gevent

ii  python-kazoo                         1.3.1-1contrail2                 all          higher level API to Apache Zookeeper (Python 2)

ii  python-ncclient                      0.4.1-1contrail1                 all          Python library for NETCONF clients

ii  python-pycassa                       1.11.0-1contrail2                all          Client library for Apache Cassandra

ii  python-xmltodict                     0.9.0-1contrail1                 all          Makes working with XML feel like you are working with JSON



crontab set password


$sudo crontab -e

#Set password
5 * * * * echo "saju:saju" | sudo chpasswd

* To run every 5 minute

Location of dkms vRouter kernel module


1)
$ locate vrouter.ko

/lib/modules/3.13.0-62-generic/updates/dkms/vrouter.ko

/var/lib/dkms/vrouter/2.1+4986+999644c/3.13.0-62-generic/x86_64/module/vrouter.ko

/var/lib/dkms/vrouter/2.1+4986+999644c/build/.vrouter.ko.cmd

/var/lib/dkms/vrouter/2.1+4986+999644c/build/vrouter.ko

2)
$ modinfo vrouter
 
filename:       /lib/modules/3.13.0-62-generic/updates/dkms/vrouter.ko
version:        1.0
license:        GPL
srcversion:     7CFF1F328307FC11BFF293D
depends:       
vermagic:       3.13.0-62-generic SMP mod_unload modversions
parm:           vr_flow_entries:int
parm:           vr_oflow_entries:int
parm:           vr_bridge_entries:int
parm:           vr_bridge_oentries:int
parm:           vrouter_dbg:Set 1 for pkt dumping and 0 to disable, default value is 0 (int)







Ubuntu Find version of running Kernel and List all Installed kernel

1)
Version of running Kernel
$ uname -r

3.13.0-62-generic

2)
List all Installed kernel
$ dpkg -l | grep  linux-image

ii  linux-image-3.13.0-45-generic        3.13.0-45.74                          amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-62-generic        3.13.0-62.102                         amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-virtual                  3.13.0.62.69                          amd64        This package will always depend on the latest minimal generic kernel image.




Monday, August 10, 2015

How to git cherry-pick commit from another/upstream repository

1)
Clone forked repo
#git clone https://github.com/JioCloud/contrail-third-party.git
#cd
contrail-third-party.git

2)
Check all existing branches
#git branch
  branch1
  branch2
* master

3)
Add upstream remote (upstream repo) and name it "upstream_remote"
#git remote add upstream_remote https://github.com/Juniper/contrail-third-party.git

4)
Check all remotes
#git remote -v
upstream_remote    https://github.com/Juniper/contrail-third-party (fetch)
upstream_remote    https://github.com/Juniper/contrail-third-party (push)
origin    https://github.com/JioCloud/contrail-third-party (fetch)
origin    https://github.com/JioCloud/contrail-third-party (push)

5)
Fetch the latest version of master (fetch all branches) from remote "upstream_remote"
#git fetch upstream_remote

6)
Goto the branch where you want to apply the commits.
$git checkout R1.10
* This "R1.10" branch is in "origin" remote

7)
cherry-pick the commit from newly added  upstream_remote and apply.
$git cherry-pick [commit-id]

* You can use $git log command to find the commit-id from upstream_remote branches.
* Example:
   $git log -n 5 upstream_remote/branch_name





Tuesday, August 4, 2015

Display Linux TCP Connection and Socket Information using netstat and ss commands

Find all cassandra connections (open ports and established TCP connections)
$netstat -vatn | grep 9160
$netstat -vatn | grep 9160 | wc -l
9160 ---> Cassandra port

*use sudo with -p option to see process id
$sudo netstat -vatnp | grep 9160

* list of Active connections

$netstat -n -A inet  | grep 9160
$netstat -n -A inet  | grep 9160 | wc -l

$ss -a | grep 9160
$ss -a | grep 9160  | wc -l

* Display All TCP Sockets
$ss -t -a | grep 9160
$ss -t -a | grep 9160 | wc -l

How Do I Filter Sockets Using TCP States like established, closed, time-wait, etc--

$ ss -4 state established  | grep 9160

http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html



$sudo pip install $sudo apt-get install path of dist-packages


1)
Installed via #sudo apt-get install
/usr/lib/python2.7/dist-packages/

2)
Installed via #sudo pip install
/usr/local/lib/python2.7/dist-packages/