Thursday, March 31, 2016

Switching running RDO Liberty DVR Two Node Cluster to Docker Hypersor (Snapshots)

After switching from libvirt to docker hypervisor on particular DVR Compute
Node openstack-nova-compute will report loosing connection to Libvirt
and get disabled with status "UP".  Then hack table services in nova database
setting field "disable" from "1" back to "0". It worked for me on RDO liberty
and brought back to life corresponding nova-compute service, it  became
enabled again still complaining loosing connection to Libvirt.
However, availability zone from blank will get back to "nova" and nova-compute
will become able launch Nova-Docker instances. I am not sure that this hack
will keep working on RDO Mitaka.

  Refreshing in memory similar problem with Nova-Docker Driver (Kilo)
with which I had same kind of problems (VXLAN connection Controller <==> Compute) on F22 (OVS 2.4.0) when the same driver worked
fine on CentOS 7.1 (OVS 2.3.1). I just guess that Nova-Docker driver has a problem with OVS 2.4.0 no matter of stable/kilo, stable/liberty, stable/mitaka branches been checked out for driver build.

  I have not run ovs-ofctl dump-flows at br-tun bridges ant etc,
because even having proved malfunctinality I cannot file it to BZ.
Nova-Docker Driver is not packaged for RDO so it's upstream stuff,
Upstream won't consider issue which involves build driver from source
on RDO Mitaka (RC1).

Thus as quick and efficient workaround I suggest DVR deployment setup,
to kill two birds with one stone. It will result South-North traffic
to be forwarded right away from host running Docker Hypervisor to Internet
and vice/versa due to basic "fg" functionality (outgoing interface of
fip-namespace,residing on Compute node having L3 agent running in "dvr"
agent_mode.

**************************************************************
Verfication data flow via "fg" verification
**************************************************************
MariaDB [(none)]> use nova ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [nova]> select disabled from services ;
+----------+
| disabled |
+----------+
|        0 |
|        0 |
|        0 |
|        0 |
|        0 |
|        0 |
+----------+
6 rows in set (0.00 sec)

Service nova-compute is enabled on Compute running Docker Hypervisor.

All 3 containers have been started on DVR Compute node

[root@ip-192-169-142-137 ~]# docker ps
CONTAINER ID        IMAGE                      COMMAND               CREATED             STATUS              PORTS               NAMES
da00493ef3ce        derby/docker-glassfish41   "/sbin/my_init"       11 hours ago        Up 8 minutes                            nova-8e61a6cc-ce8a-408d-874e-b483e86d3c29
253c4d023d83        tutum/tomcat               "/run.sh"             11 hours ago        Up 39 seconds                           nova-c4abe391-f04e-4688-a606-5447bf9366f2
3a39e0d70cd1        rastasheep/ubuntu-sshd     "/usr/sbin/sshd -D"   12 hours ago        Up 11 minutes                           nova-feb20e1b-9be5-40ab-99e4-0f09b76be8c5

[root@ip-192-169-142-137 ~]# ip netns
253c4d023d831e1d479a972d656b206a8396fc3d5f5bf84024ce14d43ad0e64c (id: 2)
da00493ef3ce324f7c8b32964e65e91d2aff3431c412a12ba7fdcbb449032011 (id: 1)
3a39e0d70cd1113f7a2a27d1d4ee017f4ed34e351e90b81f886c2b6010269129 (id: 0)

fip-a8a584ee-d973-49e7-8779-17c9b5127fd1
fip-7ae4cebd-29cd-4c84-a303-587e81516a73
qrouter-64b3f5cb-0073-4296-9d7a-dfc5da396504
qrouter-27e23c8d-58a2-41e9-9b4a-c339dcedc783


DVR VERIFICATION ON COMPUTE 192.169.142.137


  

  
  

************************
end verification
************************


[root@ip-192-169-142-127 ~(keystone_admin)]# nova-manage version
No handlers could be found for logger "oslo_config.cfg"
12.0.0-3.94d6b69git.el7

[root@ip-192-169-142-127 ~(keystone_admin)]# ip netns
snat-64b3f5cb-0073-4296-9d7a-dfc5da396504
snat-27e23c8d-58a2-41e9-9b4a-c339dcedc783
qrouter-64b3f5cb-0073-4296-9d7a-dfc5da396504
qrouter-27e23c8d-58a2-41e9-9b4a-c339dcedc783
qdhcp-d17d7c9d-ae83-454a-854b-ff8128a66bd9
qdhcp-c2832391-4e37-4732-aa11-572f83a6811f
qdhcp-62926c13-977b-4c70-9572-51da8a139937

[root@ip-192-169-142-127 ~(keystone_admin)]# ssh 192.169.142.137
Last login: Thu Mar 31 22:42:09 2016 from ip-192-169-142-127.ip.secureserver.net

[root@ip-192-169-142-137 ~]# ip netns
da00493ef3ce324f7c8b32964e65e91d2aff3431c412a12ba7fdcbb449032011 (id: 1)
3a39e0d70cd1113f7a2a27d1d4ee017f4ed34e351e90b81f886c2b6010269129 (id: 0)
fip-a8a584ee-d973-49e7-8779-17c9b5127fd1
fip-7ae4cebd-29cd-4c84-a303-587e81516a73
qrouter-27e23c8d-58a2-41e9-9b4a-c339dcedc783
qrouter-64b3f5cb-0073-4296-9d7a-dfc5da396504

[root@ip-192-169-142-137 ~]# docker ps
CONTAINER ID        IMAGE                      COMMAND               CREATED             STATUS              PORTS               NAMES
da00493ef3ce        derby/docker-glassfish41   "/sbin/my_init"       41 minutes ago      Up 41 minutes                           nova-8e61a6cc-ce8a-408d-874e-b483e86d3c29
3a39e0d70cd1        rastasheep/ubuntu-sshd     "/usr/sbin/sshd -D"   About an hour ago   Up About an hour                        nova-feb20e1b-9be5-40ab-99e4-0f09b76be8c5

[root@ip-192-169-142-137 ~]# . keystonerc_demo

[root@ip-192-169-142-137 ~(keystone_demo)]# nova list
+--------------------------------------+----------------+---------+------------+-------------+---------------------------------------+
| ID                                   | Name           | Status  | Task State | Power State | Networks                              |
+--------------------------------------+----------------+---------+------------+-------------+---------------------------------------+
| c4abe391-f04e-4688-a606-5447bf9366f2 | TomCat         | SHUTOFF | -          | Shutdown    | demo_network1=50.0.0.48, 10.10.10.131 |
| feb20e1b-9be5-40ab-99e4-0f09b76be8c5 | UbuntuSSH      | ACTIVE  | -          | Running     | demo_network2=70.0.0.18, 10.10.50.111 |
| 8e61a6cc-ce8a-408d-874e-b483e86d3c29 | derbyGlassfish | ACTIVE  | -          | Running     | demo_network1=50.0.0.49, 10.10.10.132 |
+--------------------------------------+----------------+---------+------------+-------------+---------------------------------------+