Saturday, February 01, 2014

Surfing Internet & SSH connectoin on (to) cloud instance of Fedora 20 via Neutron GRE

When you meet the first time with GRE tunnelling you have to understand that GRE encapsulation requires 24 bytes and a lot of problems raise up , view http://www.cisco.com/en/US/tech/tk827/tk369/technologies_tech_note09186a0080093f1f.shtml  In particular,  Two Node (Controller+Compute) RDO Havana cluster on Fedora 20 hosts been built by myself per guidelines from http://kashyapc.wordpress.com/2013/11/23/neutron-configs-for-a-two-node-openstack-havana-setup-on-fedora-20/ was Neutron GRE  cluster. Hence, for any instance has been setup (Fedora or Ubuntu) problem with network communication raises up immediately. Apt-get update just refuse to work on Ubuntu Salamander Server instance (default MTU value for Ethernet interface is 1500). Light weight X windows environment also has been setup on Fedora 20 cloud instance (fluxbox) for quick Internet access.

Solution is simple set MTU to 1400 only on any cloud instance. Place in /etc/rd.d/rc.local (or /etc/rc.local for Ubuntu Server) :-

#!/bin/sh
ifconfig eth0 mtu 1454  up ;
exit 0

At least in meantime I don't see problems with LAN and Internet communicatons
on cloud instances F19,F20,Ubuntu 13.10 Server. For better understanding what is all about please view http://bderzhavets.blogspot.com/2014/01/setting-up-two-physical-node-openstack.html  [1].

Load instance via :

[root@dfw02 ~(keystone_admin)]$ nova boot --flavor 3  --user-data=./myfile.txt  --block_device_mapping vda=3cb671c2-06d8-4b3a-aca6-476b66fb309a:::0 VMF20RS

where

[root@dfw02 ~(keystone_admin)]$ cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| 3cb671c2-06d8-4b3a-aca6-476b66fb309a | available | Fedora20VOL   |  9   |     None    |   true   |                                                                                               |
| 49d5b872-3720-4915-ad1e-ec428e956558 | in-use |   VF20VOL    |  9   |     None    |   true   | 0e0b4f69-4cff-4423-ba9d-71c8eb53af16 |
| b4831720-941f-41a7-b747-1810df49b261 | in-use | UbuntuSALVG  |  7   |     None    |   true   | 5d750d44-0cad-4a02-8432-0ee10e988b2c |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
and


[root@dfw02 ~(keystone_admin)]$ cat myfile.txt
#cloud-config
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True

Then

[root@dfw02 ~(keystone_admin)]$ nova list
+--------------------------------------+---------------+-----------+------------+-------------+-----------------------------+
| ID                                   | Name          | Status    | Task State | Power State | Networks                    |
+--------------------------------------+---------------+-----------+------------+-------------+-----------------------------+
| 964fd0b0-b331-4b0c-a1d5-118bf8a40abf | CentOS6.5     | SUSPENDED | None       | Shutdown    | int=10.0.0.5, 192.168.1.105 |
| 3f2db906-567c-48b0-967e-799b2bffe277 | Cirros312     | SUSPENDED | None       | Shutdown    | int=10.0.0.2, 192.168.1.101 |
| 5d750d44-0cad-4a02-8432-0ee10e988b2c | UbuntuSaucySL | SUSPENDED | None       | Shutdown    | int=10.0.0.8, 192.168.1.112 |
| 0e0b4f69-4cff-4423-ba9d-71c8eb53af16 | VF20KVM       | SUSPENDED | None       | Shutdown    | int=10.0.0.7, 192.168.1.109 |
| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | ACTIVE  | None       | Running   | int=10.0.0.4                                  |
+--------------------------------------+---------------+-----------+------------+-------------+-----------------------------+

[root@dfw02 ~(keystone_admin)]$ neutron port-list --device-id 10306d33-9684-4dab-a017-266fb9ab496a
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                       |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| fa982101-e2d9-4d21-be9d-7d485c792ce1 |      | fa:16:3e:57:e2:67 | {"subnet_id": "fa930cea-3d51-4cbe-a305-579f12aa53c0", "ip_address": "10.0.0.4"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

[root@dfw02 ~(keystone_admin)]$ neutron floatingip-create ext
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 192.168.1.115                        |
| floating_network_id | 780ce2f3-2e6e-4881-bbac-857813f9a8e0 |
| id                  | d9f1b47d-c4b1-4865-92d2-c1d9964a35fb |
| port_id             |                                      |
| router_id           |                                      |
| tenant_id           | d0a0acfdb62b4cc8a2bfa8d6a08bb62f     |
+---------------------+--------------------------------------+

[root@dfw02 ~(keystone_admin)]$  neutron floatingip-associate d9f1b47d-c4b1-4865-92d2-c1d9964a35fb fa982101-e2d9-4d21-be9d-7d485c792ce1


[root@dfw02 ~(keystone_admin)]$ ping  192.168.1.115


  

  

   Connect via virt-manager to Compute from Controller and log into text mode console as "fedora" with known password "mysecret".  Set MTU , create new sudoer user, then reboot instance. Now ssh from Controller works in traditional way :

[root@dfw02 ~(keystone_admin)]$ nova list | grep VMF20RS
| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | SUSPENDED | resuming   | Shutdown    | int=10.0.0.4, 192.168.1.115 |

[root@dfw02 ~(keystone_admin)]$ nova list | grep VMF20RS
| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | ACTIVE    | None       | Running     | int=10.0.0.4, 192.168.1.115 |

[root@dfw02 ~(keystone_admin)]$ ssh root@192.168.1.115
root@192.168.1.115's password:
Last login: Sat Feb  1 12:32:12 2014 from 192.168.1.127

[root@vmf20rs ~]# uname -a

Linux vmf20rs.novalocal 3.12.8-300.fc20.x86_64 #1 SMP Thu Jan 16 01:07:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@vmf20rs ~]# ifconfig
eth0: flags=4163  mtu 1400
        inet 10.0.0.4  netmask 255.255.255.0  broadcast 10.0.0.255

        inet6 fe80::f816:3eff:fe57:e267  prefixlen 64  scopeid 0x20
        ether fa:16:3e:57:e2:67  txqueuelen 1000  (Ethernet)
        RX packets 591788  bytes 770176441 (734.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 196309  bytes 20105918 (19.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 0  (Local Loopback)
        RX packets 2  bytes 140 (140.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 140 (140.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



Setup Light Weight X Windows environment on F20 Cloud instance and running Fedora 20 cloud instance in Spice session via virt-manager ( Controller connects to Compute node via virt-manager ).  Spice console and QXL specified in virt-manager , then `nova reboot VF20WRT`.

# yum install xorg-x11-server-Xorg xorg-x11-xdm fluxbox \
xorg-x11-drv-ati xorg-x11-drv-evdev xorg-x11-drv-fbdev \
xorg-x11-drv-intel xorg-x11-drv-mga xorg-x11-drv-nouveau \
xorg-x11-drv-openchrome xorg-x11-drv-qxl xorg-x11-drv-synaptics \
xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware \
xorg-x11-drv-wacom xorg-x11-font-utils xorg-x11-drv-modesetting \
xorg-x11-glamor xorg-x11-utils xterm \

dejavu-fonts-common \
dejavu-sans-fonts \
dejavu-sans-mono-fonts \
dejavu-serif-fonts \
feh xcompmgr lxappearance xscreensaver dmenu -y

View for details http://blog.bodhizazen.net/linux/a-5-minute-guide-to-fluxbox/

$mkdir .fluxbox/backgrounds

Add to ~/.fluxbox/menu file

 [submenu] (Wallpapers)
      [wallpapers] (~/.fluxbox/backgrounds) {feh --bg-scale}
[end] 

to be able set wallpaper

# echo "exec fluxbox" > ~/.xinitrc
# startx

 

 

    
     Fedora 20 cloud instance running in Spice Session via virt-manager with QXL
      64 MB of VRAM  :-

   


   
  
 

    Shutting down fluxbox :-

  

    Done
   

   Now run `nova suspend VF20WRT`


   Fluxbox on Ubuntu 13.10 Server Cloud Instance:-

  

 References

1.http://bderzhavets.blogspot.com/2014/01/setting-up-two-physical-node-openstack.html