Hi, I misunderstood. dnsmasq process was created when VM port, not a network, was added.
Thanks, Kaneko 2013/9/20 Yoshihiro Kaneko <[email protected]>: > Hello, > > I tried latest devstack (master branch). > And I created a network, but dnsmasq process for the network wasn't created. > > localrc I used is as follows: > ---------- > HOST_NAME=$(hostname) > SERVICE_HOST=192.168.1.10 > > disable_service n-net > enable_service q-svc q-agt q-dhcp q-l3 q-meta neutron > > Q_HOST=$SERVICE_HOST > MYSQL_HOST=$SERVICE_HOST > RABBIT_HOST=$SERVICE_HOST > GLANCE_HOSTPORT=$SERVICE_HOST:9292 > KEYSTONE_AUTH_HOST=$SERVICE_HOST > KEYSTONE_SERVICE_HOST=$SERVICE_HOST > > MYSQL_PASSWORD=mysql > RABBIT_PASSWORD=rabbit > SERVICE_TOKEN=service > SERVICE_PASSWORD=admin > SERVICE_TENANT_NAME=service > ADMIN_PASSWORD=admin > > RECLONE=yes > ---------- > > There is dnsmasq process for initial network (private) after stack.sh started. > ---------- > $ neutron net-list > +--------------------------------------+---------+------------------------------------------------------+ > | id | name | subnets > | > +--------------------------------------+---------+------------------------------------------------------+ > | b2c2cc34-d349-4a2d-b153-f4cd0d357d3d | public | > 0aad0524-12b3-4ec9-9c4b-c592570a5711 172.24.4.224/28 | > | c2b46689-d1a4-40d0-b0d5-103582980eea | private | > 09aa0f86-eeeb-4324-91b0-233d336a29d0 10.0.0.0/24 | > +--------------------------------------+---------+------------------------------------------------------+ > $ neutron subnet-list > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > | id | name | cidr > | allocation_pools | > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > | 09aa0f86-eeeb-4324-91b0-233d336a29d0 | private-subnet | 10.0.0.0/24 > | {"start": "10.0.0.2", "end": "10.0.0.254"} | > | 0aad0524-12b3-4ec9-9c4b-c592570a5711 | public-subnet | > 172.24.4.224/28 | {"start": "172.24.4.226", "end": "172.24.4.238"} | > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > $ neutron port-list -c fixed_ips -c device_owner > +-------------------------------------------------------------------------------------+--------------------------+ > | fixed_ips > | device_owner | > +-------------------------------------------------------------------------------------+--------------------------+ > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.2"} | network:dhcp | > | {"subnet_id": "0aad0524-12b3-4ec9-9c4b-c592570a5711", "ip_address": > "172.24.4.226"} | network:router_gateway | > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.1"} | network:router_interface | > +-------------------------------------------------------------------------------------+--------------------------+ > $ ps ax | grep dnsmasq > 5864 ? S 0:00 dnsmasq --no-hosts --no-resolv > --strict-order --bind-interfaces --interface=tap7d7f5c08-61 > --except-interface=lo > --pid-file=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/pid > --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/host > --dhcp-optsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/opts > --leasefile-ro --dhcp-range=set:tag0,10.0.0.0,static,86400s > --dhcp-lease-max=256 --conf-file= --domain=openstacklocal > ---------- > > Then, I added a new network, subnet and router, but dnsmasq process > wasn't added. > ---------- > $ neutron net-create private2 > Created a new network: > +---------------------------+--------------------------------------+ > | Field | Value | > +---------------------------+--------------------------------------+ > | admin_state_up | True | > | id | 99341220-b12d-4dd0-af96-19a4915e3a03 | > | name | private2 | > | provider:network_type | local | > | provider:physical_network | | > | provider:segmentation_id | | > | shared | False | > | status | ACTIVE | > | subnets | | > | tenant_id | 818d0e9c0ae94f43bd6d65a69b6f2e17 | > +---------------------------+--------------------------------------+ > $ neutron subnet-create --ip-version 4 --gateway 11.0.0.1 private2 11.0.0.0/24 > Created a new subnet: > +------------------+--------------------------------------------+ > | Field | Value | > +------------------+--------------------------------------------+ > | allocation_pools | {"start": "11.0.0.2", "end": "11.0.0.254"} | > | cidr | 11.0.0.0/24 | > | dns_nameservers | | > | enable_dhcp | True | > | gateway_ip | 11.0.0.1 | > | host_routes | | > | id | ce09e211-1e4a-486f-b3c1-323e4919907a | > | ip_version | 4 | > | name | | > | network_id | 99341220-b12d-4dd0-af96-19a4915e3a03 | > | tenant_id | 818d0e9c0ae94f43bd6d65a69b6f2e17 | > +------------------+--------------------------------------------+ > $ neutron router-create router2 > Created a new router: > +-----------------------+--------------------------------------+ > | Field | Value | > +-----------------------+--------------------------------------+ > | admin_state_up | True | > | external_gateway_info | | > | id | 3838589a-5513-48f0-a297-8df1fa6166a4 | > | name | router2 | > | status | ACTIVE | > | tenant_id | 818d0e9c0ae94f43bd6d65a69b6f2e17 | > +-----------------------+--------------------------------------+ > $ neutron router-interface-add 3838589a-5513-48f0-a297-8df1fa6166a4 > ce09e211-1e4a-486f-b3c1-323e4919907a > Added interface e8281ce7-272e-46db-9b60-b9d2e7bcd248 to router > 3838589a-5513-48f0-a297-8df1fa6166a4. > $ neutron router-gateway-set 3838589a-5513-48f0-a297-8df1fa6166a4 > b2c2cc34-d349-4a2d-b153-f4cd0d357d3d > Set gateway for router 3838589a-5513-48f0-a297-8df1fa6166a4 > $ neutron port-list -c fixed_ips -c device_owner > +-------------------------------------------------------------------------------------+--------------------------+ > | fixed_ips > | device_owner | > +-------------------------------------------------------------------------------------+--------------------------+ > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.2"} | network:dhcp | > | {"subnet_id": "0aad0524-12b3-4ec9-9c4b-c592570a5711", "ip_address": > "172.24.4.226"} | network:router_gateway | > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.1"} | network:router_interface | > | {"subnet_id": "ce09e211-1e4a-486f-b3c1-323e4919907a", "ip_address": > "11.0.0.1"} | network:router_interface | > | {"subnet_id": "0aad0524-12b3-4ec9-9c4b-c592570a5711", "ip_address": > "172.24.4.227"} | network:router_gateway | > +-------------------------------------------------------------------------------------+--------------------------+ > $ ps ax|grep dnsmasq > 5864 ? S 0:00 dnsmasq --no-hosts --no-resolv > --strict-order --bind-interfaces --interface=tap7d7f5c08-61 > --except-interface=lo > --pid-file=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/pid > --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/host > --dhcp-optsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/opts > --leasefile-ro --dhcp-range=set:tag0,10.0.0.0,static,86400s > --dhcp-lease-max=256 --conf-file= --domain=openstacklocal > $ ip netns > qrouter-3838589a-5513-48f0-a297-8df1fa6166a4 > qrouter-25711cb3-bb19-4888-a64d-410d53386bae > qdhcp-c2b46689-d1a4-40d0-b0d5-103582980eea > ---------- > > I restart dhcp-agent for trial, then dnsmasq for new network was added > (2 processes in total). > ---------- > $ neutron port-list -c fixed_ips -c device_owner > +-------------------------------------------------------------------------------------+--------------------------+ > | fixed_ips > | device_owner | > +-------------------------------------------------------------------------------------+--------------------------+ > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.2"} | network:dhcp | > | {"subnet_id": "0aad0524-12b3-4ec9-9c4b-c592570a5711", "ip_address": > "172.24.4.226"} | network:router_gateway | > | {"subnet_id": "09aa0f86-eeeb-4324-91b0-233d336a29d0", "ip_address": > "10.0.0.1"} | network:router_interface | > | {"subnet_id": "ce09e211-1e4a-486f-b3c1-323e4919907a", "ip_address": > "11.0.0.2"} | network:dhcp | > | {"subnet_id": "ce09e211-1e4a-486f-b3c1-323e4919907a", "ip_address": > "11.0.0.1"} | network:router_interface | > | {"subnet_id": "0aad0524-12b3-4ec9-9c4b-c592570a5711", "ip_address": > "172.24.4.227"} | network:router_gateway | > +-------------------------------------------------------------------------------------+--------------------------+ > $ ps ax|grep dnsmasq > 30668 ? S 0:00 dnsmasq --no-hosts --no-resolv > --strict-order --bind-interfaces --interface=tap7d7f5c08-61 > --except-interface=lo > --pid-file=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/pid > --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/host > --dhcp-optsfile=/opt/stack/data/neutron/dhcp/c2b46689-d1a4-40d0-b0d5-103582980eea/opts > --leasefile-ro --dhcp-range=set:tag0,10.0.0.0,static,86400s > --dhcp-lease-max=256 --conf-file= --domain=openstacklocal > 31222 ? S 0:00 dnsmasq --no-hosts --no-resolv > --strict-order --bind-interfaces --interface=tapd6f7cb89-97 > --except-interface=lo > --pid-file=/opt/stack/data/neutron/dhcp/99341220-b12d-4dd0-af96-19a4915e3a03/pid > --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/99341220-b12d-4dd0-af96-19a4915e3a03/host > --dhcp-optsfile=/opt/stack/data/neutron/dhcp/99341220-b12d-4dd0-af96-19a4915e3a03/opts > --leasefile-ro --dhcp-range=set:tag0,11.0.0.0,static,86400s > --dhcp-lease-max=256 --conf-file= --domain=openstacklocal > $ ip netns > qdhcp-99341220-b12d-4dd0-af96-19a4915e3a03 > qrouter-3838589a-5513-48f0-a297-8df1fa6166a4 > qrouter-25711cb3-bb19-4888-a64d-410d53386bae > qdhcp-c2b46689-d1a4-40d0-b0d5-103582980eea > ---------- > > I changed stack.sh to create initial network after having started dhcp-agent. > ---------- > diff --git a/stack.sh b/stack.sh > index 71e7317..6de6f7c 100755 > --- a/stack.sh > +++ b/stack.sh > @@ -1203,7 +1203,7 @@ if is_service_enabled q-svc; then > echo_summary "Starting Neutron" > > start_neutron_service_and_check > - create_neutron_initial_network > + #create_neutron_initial_network > setup_neutron_debug > elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then > NM_CONF=${NOVA_CONF} > @@ -1223,6 +1223,7 @@ fi > > if is_service_enabled neutron; then > start_neutron_agents > + create_neutron_initial_network > fi > if is_service_enabled nova; then > echo_summary "Starting Nova" > ---------- > > As a result, dnsmasq process for initial network was not created. > ---------- > $ neutron net-list > +--------------------------------------+---------+------------------------------------------------------+ > | id | name | subnets > | > +--------------------------------------+---------+------------------------------------------------------+ > | 0e5e5d57-4d93-461d-a382-cb9d099496c0 | public | > 0825d3e6-48b8-4de5-975d-b63282a628c4 172.24.4.224/28 | > | fc6c9e5f-5435-4450-bae9-8455e9f198ca | private | > bb68d0d8-548a-4ce5-9107-d30ca15d172b 10.0.0.0/24 | > +--------------------------------------+---------+------------------------------------------------------+ > $ neutron subnet-list > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > | id | name | cidr > | allocation_pools | > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > | 0825d3e6-48b8-4de5-975d-b63282a628c4 | public-subnet | > 172.24.4.224/28 | {"start": "172.24.4.226", "end": "172.24.4.238"} | > | bb68d0d8-548a-4ce5-9107-d30ca15d172b | private-subnet | 10.0.0.0/24 > | {"start": "10.0.0.2", "end": "10.0.0.254"} | > +--------------------------------------+----------------+-----------------+--------------------------------------------------+ > $ neutron port-list -c fixed_ips -c device_owner > +-------------------------------------------------------------------------------------+--------------------------+ > | fixed_ips > | device_owner | > +-------------------------------------------------------------------------------------+--------------------------+ > | {"subnet_id": "0825d3e6-48b8-4de5-975d-b63282a628c4", "ip_address": > "172.24.4.226"} | network:router_gateway | > | {"subnet_id": "bb68d0d8-548a-4ce5-9107-d30ca15d172b", "ip_address": > "10.0.0.1"} | network:router_interface | > +-------------------------------------------------------------------------------------+--------------------------+ > $ ps ax|grep dnsmasq > $ ip netns > qrouter-6ce35c23-fece-43cd-8735-4ec5ec5be98e > ---------- > > Why doesn't dhcp-agent create dnsmasq process when a network was > added? Is this a bug? > Possibly this may be caused by my configuration and/or environment, > but I don't know what is wrong. > Please give me advice. > > Thanks, > Kaneko _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
