vijava

Have been using vijava for one of my projects recently.  It’s a fairly decent Java wrapper over Vmware’s web services API. However there are some very basic Java bugs with the library, for example the VirtualEthernetCard class does not override the equals methods (really!!!). This has been causing me a pain while comparing two Sets of VirtualEthernetCard objects. I wish the author had followed the rules mentioned in the awesome book “Effective Java“.

Advertisements

Virsh + MAAS + Juju

Was able to get MAAS (Metal AS A Service) working Virsh by following this guide. Following are some of the important points to note about this setup is that  Also it’s important to

  1. The router ip and the upstream DNS need to be set to the MAAS network gateway ip (e.g. 192.168.100.1)
  2. Set the default gateway field empty.
  3. In /etc/bind/named.conf.options set dnssec-validation no and remove any_ipv6

Got RDO packstack working

After struggling a bit, I finally got RDO packstack working with a RHEL7 qcow2 image. I was able to get it working with three nodes, one controller and two compute nodes. I was able to boot a VM on each of the compute nodes and was able to ping between them. This was achieved via a Vxlan tunnel created between the two nodes.

One important thing about RDO is that I found it quite stable once I could get it working.

packstack

I have been trying to get openstack working with packstack on RHEL7 and it has not being an easy. I thought that packstack on RHEL7 would just work but it doesn’t.

Memory requirements

Make sure the controller node has at least 4GB of memory.

Disable/Enable services

systemctl disable firewalld
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
systemctl enable network.service
systemctl start network.service

Network Service

I am using RHEL7 qcow2 image on KVM and one of the annoying problems that bugged me that network.service use to always fail

systemctl start network.service

The reason for this failure was that my ethernet interface was ens3 on the VM but there no corresponding ifcfg file in /etc/sysconfig/network-scripts for it. Once I edit ifcfg-eth0 to ifcfg-ens3, I came over this issue.

Stale mysql database

Every time before you run the packstack command make sure that the mysql database has been cleaned up. This can be done with “rm -rf /var/lib/mysql”

Change passwords

perl -p -i -e "s/_PW=(\S)+/_PW=simple/g" answer.file

 

Installing vim-flake8

I use vim for writing most of my C and Python code. For python I tend to use vim-flake8 for automated PEP8 checking. However I always forget how to install vim-flake8 and hence am writing this post

First install pathogen

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Then install the vim-flake8 plugin

cd ~/.vim/bundle
git clone https://github.com/nvie/vim-flake8.git

Finally add the following lines to .vimrc

execute pathogen#infect()
filetype off 
syntax on
filetype plugin indent on
autocmd BufWritePost *.py call Flake8()