[openstack-dev] [octavia] haproxy fails to receive datagram

Yipei Niu newypei at gmail.com
Wed Sep 27 02:27:46 UTC 2017

Hi, Michael,

The instructions are listed as follows.

First, create a net1.
$ neutron net-create net1
$ neutron subnet-create net1 --name subnet1

Second, boot two vms in net1
$ nova boot --flavor 1 --image $image_id --nic net-id=$net1_id vm1
$ nova boot --flavor 1 --image $image_id --nic net-id=$net1_id vm2

Third, logon to the two vms, respectively. Here take vm1 as an example.
$ MYIP=$(ifconfig eth0|grep 'inet addr'|awk -F: '{print $2}'| awk '{print
$ while true; do echo -e "HTTP/1.0 200 OK\r\n\r\nWelcome to $MYIP" | sudo
nc -l -p 80 ; done&

Fourth, exit vms and update the default security group shared by the vms by
adding a rule of allowing traffic to port 80.
$ neutron security-group-rule-create --direction ingress --protocol tcp
--port-range-min 80 --port-range-max 80 --remote-ip-refix
Note: make sure "sudo ip netns exec $qdhcp-net1_id curl -v $vm_ip" works.
In other words, make sure the vms can accept HTTP requests and return its
IP, respectively.

Fifth, create a lb, a listener, and a pool. Then add the two vms to the
pool as members.
$ neutron lbaas-loadbalancer-create --name lb1 subnet1
$ neutron lbaas-listener-create --loadbalancer lb1 --protocol HTTP
--protocol-port 80 --name listener1
$ neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener1
--protocol HTTP --name pool1
$ neutron baas-member-create --subnet subnet1 --address $vm1_ip
--protocol-port 80 pool1
$ neutron baas-member-create --subnet subnet1 --address $vm2_ip
--protocol-port 80 pool1

Finally, try "sudo ip netns qdhcp-net1_id curl -v $VIP" to see whether
lbaas works.

Best regards,

On Wed, Sep 27, 2017 at 1:30 AM, Yipei Niu <newypei at gmail.com> wrote:

> Hi, Michael,
> I think the octavia is the latest, since I pull the up-to-date repo of
> octavia manually to my server before installation.
> Anyway, I run "sudo ip netns exec amphora-haproxy ip route show table 1"
> in the amphora, and find that the route table exists. The info is listed as
> follows.
> default via dev eth1 onlink
> I think it may not be the source.
> Best regards,
> Yipei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170927/c7379b45/attachment.html>

More information about the OpenStack-dev mailing list