[Openstack] Quantum DHCP support.

Gary Kotton gkotton at redhat.com
Tue Sep 4 11:16:56 UTC 2012


On 09/04/2012 12:56 PM, Takaaki Suzuki wrote:
>> Can you also please provide sudo ovs-vsctl show?
> sure.

It looks like a bug. I'll investigate further and let you know.

Thanks
Gary

>
> midokura16:~/devstack# ovs-vsctl show
> d699f1f2-792c-4eb9-8306-32a622316389
>      Bridge br-tun
>          Port br-tun
>              Interface br-tun
>                  type: internal
>          Port patch-int
>              Interface patch-int
>                  type: patch
>                  options: {peer=patch-tun}
>      Bridge br-int
>          Port "tapee78cf13-65"
>              tag: 4
>              Interface "tapee78cf13-65"
>                  type: internal
>          Port "tap0e74b599-a1"
>              tag: 3
>              Interface "tap0e74b599-a1"
>          Port "tapc2df9bdf-da"
>              tag: 1
>              Interface "tapc2df9bdf-da"
>                  type: internal
>          Port "tapda44c6f5-b4"
>              tag: 3
>              Interface "tapda44c6f5-b4"
>                  type: internal
>          Port br-int
>              Interface br-int
>                  type: internal
>          Port patch-tun
>              Interface patch-tun
>                  type: patch
>                  options: {peer=patch-int}
>          Port "tap0fb10fc2-62"
>              tag: 2
>              Interface "tap0fb10fc2-62"
>          Port "tap0118eb34-42"
>              tag: 2
>              Interface "tap0118eb34-42"
>          Port "tapbd10a19b-a6"
>              tag: 2
>              Interface "tapbd10a19b-a6"
>                  type: internal
>          Port "tap38bea316-b0"
>              tag: 3
>              Interface "tap38bea316-b0"
>      ovs_version: "1.6.1"
>
> Thanks!
> Suzuki
>
> On Tue, Sep 4, 2012 at 6:52 PM, Gary Kotton<gkotton at redhat.com>  wrote:
>> On 09/04/2012 12:48 PM, Takaaki Suzuki wrote:
>>> Hi Gary
>>>
>>> Thank you for your support.
>>> I share with you information.
>>
>> Can you also please provide sudo ovs-vsctl show?
>>
>> Thanks
>> Gary
>>
>>>> 1. can you please do quantum port-list?
>>> quantum --os_token f095d7163a564456b60bf47b078537a7 --os_url
>>> http://localhost:9696/ port-list
>>>
>>> - VM port
>>> admin_state_up : True
>>> device_id          : d6f9eb16-fb54-4c6c-8c1f-dd7859696910
>>> device_owner    :
>>> fixed_ips           :{"subnet_id":
>>> "2c6e941e-cf21-40c9-8f1a-37db0e2e9a46", "ip_address": "192.168.30.3"}
>>> id                     : 0118eb34-424f-460e-8e12-42ecffb2dad8
>>> mac_address    : fa:16:3e:0d:e6:31
>>> name                :
>>> network_id        : 069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>> status               : ACTIVE
>>> tenant_id           :cf67ba5e70e346b9a080fb349b5e1125
>>>
>>> - DHCP agent port
>>> admin_state_up : True
>>> device_id          :
>>>
>>> dhcp72aca792-f411-52a0-a641-defa1b398574-069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>> device_owner    : network:dhcp
>>> fixed_ips           : {"subnet_id":
>>> "bf07d0cd-7abb-4bf0-83a2-dfc1f3c21f8e", "ip_address": "192.168.10.2"},
>>> {"subnet_id": "2c6e941e-cf21-40c9-8f1a-37db0e2e9a46", "ip_address":
>>> "192.168.30.2"}
>>> id                     : bd10a19b-a679-4b65-b36b-7beffcdae1ba
>>> mac_address    : fa:16:3e:6c:f0:b5
>>> name                : DHCP Agent
>>> network_id        : 069f4cfc-3f97-4018-b08e-4a4868f3ca94
>>> status               : ACTIVE
>>> tenant_id           :cf67ba5e70e346b9a080fb349b5e1125
>>>
>>>
>>>> 2. Is the DHCP agent running (q-dhcp in stackrc)?
>>> Yes, DHCP agent running. I added "enable_service q-dhcp".
>>>
>>>> 3. How did you launch the VM's? Did you use nova boot --nic
>>>> net-id=quantum
>>>> network ID?
>>> I use Horizon for Quantum V2 (https://github.com/amotoki/horizon).
>>>
>>>> 4. Can you please check that the host files has the MAC address and IP
>>>> address of your VM - this is under /opt/stack/data/dhcp/<network id>/..
>>> midokura16:/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94# cat
>>> host
>>> fa:16:3e:0d:e6:31,192-168-30-3.openstacklocal,192.168.30.3
>>> fa:16:3e:6c:f0:b5,192-168-10-2.openstacklocal,192.168.10.2
>>> fa:16:3e:6c:f0:b5,192-168-30-2.openstacklocal,192.168.30.2
>>>
>>> - dnsmasq syslog when launch VM.
>>> dnsmasq-dhcp[12592]: DHCPDISCOVER(tapbd10a19b-a6) fa:16:3e:0d:e6:31 no
>>> address available
>>> dnsmasq-dhcp[12592]: last message repeated 2 times
>>> dnsmasq-dhcp[12592]: DHCPDISCOVER(tapbd10a19b-a6) fa:16:3e:15:62:6a no
>>> address available
>>> dnsmasq-dhcp[12592]: last message repeated 2 times
>>>
>>> - sudo ip netns exec 069f4cfc-3f97-4018-b08e-4a4868f3ca94 ip link
>>> 104: tapbd10a19b-a6:<BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP>   mtu
>>> 1500 qdisc noqueue state UNKNOWN
>>>       link/ether fa:16:3e:6c:f0:b5 brd ff:ff:ff:ff:ff:ff
>>>
>>> - sudo ip netns exec 069f4cfc-3f97-4018-b08e-4a4868f3ca94 ip route
>>> 192.168.10.0/24 dev tapbd10a19b-a6  proto kernel  scope link  src
>>> 192.168.10.2
>>> 192.168.30.0/24 dev tapbd10a19b-a6  proto kernel  scope link  src
>>> 192.168.30.2
>>>
>>> - quantum-dhcp agent spawn dnsmasq for test04 network
>>> dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces
>>> --interface=tapbd10a19b-a6 --except-interface=lo
>>> --domain=openstacklocal
>>> --pid-file=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/pid
>>>
>>> --dhcp-hostsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/host
>>>
>>> --dhcp-optsfile=/opt/stack/data/dhcp/069f4cfc-3f97-4018-b08e-4a4868f3ca94/opts
>>> --leasefile-ro --dhcp-range=set:tag0,192.168.10.0,static,120s
>>>
>>> Hope that helped.
>>> Thanks!
>>>
>>> Suzuki
>>>
>>> On Tue, Sep 4, 2012 at 6:13 PM, Gary Kotton<gkotton at redhat.com>   wrote:
>>>> On 09/04/2012 12:03 PM, Takaaki Suzuki wrote:
>>>>> Hi
>>>>>
>>>>> Currently, I see that DHCP instance is created per network, at least
>>>>> from looking at the Dnsmasq implementation.
>>>>>
>>>>> I'm curious to know how a DHCP instance can provide services to a VM
>>>>> attached to a port on a network that has multiple subnets.
>>>>>
>>>>> It doesn't seem possible to me that a VM can get two IP addresses on
>>>>> an interface from this DHCP server. Is this feature supported in
>>>>> Quantum?
>>>>>
>>>>> I ran a quick test using Devstack + QuantumV2 + OVS plugin.  I created
>>>>> one network called "test04", and two subnets for tor the network,
>>>>> 192.168.10.0/24 and 192.168.30.0/24.
>>>> When a Quantum port is allocated an IP address is selected from one of
>>>> the
>>>> subnets configured on the network (unless the user has requested more
>>>> than
>>>> one IP address). The DHCP agent will learn this IP address and update the
>>>> hosts file.
>>>>
>>>> Can you please provide the following information:
>>>> 1. can you please do quantum port-list?
>>>> 2. Is the DHCP agent running (q-dhcp in stackrc)?
>>>> 3. How did you launch the VM's? Did you use nova boot --nic
>>>> net-id=quantum
>>>> network ID?
>>>> 4. Can you please check that the host files has the MAC address and IP
>>>> address of your VM - this is under /opt/stack/data/dhcp/<network id>/..
>>>>
>>>> Thanks
>>>> Gary
>>>>> With Dnsmasq running as the DHCP server, I launched a VM, and as
>>>>> suspected, it did not receive any IP address.  I checked the Dnsmasq
>>>>> log and it looked like it did receive DHCPDISCOVER message but it did
>>>>> not offer anything back.
>>>>>
>>>>> I would love to know there is actually a way to get this to work, or
>>>>> if I'm missing some critical steps here.
>>>>>
>>>>> Thanks!
>>>>> Suzuki
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~openstack
>>>>> Post to     : openstack at lists.launchpad.net
>>>>> Unsubscribe : https://launchpad.net/~openstack
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~openstack
>>>> Post to     : openstack at lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~openstack
>>>> More help   : https://help.launchpad.net/ListHelp
>>





More information about the Openstack mailing list