[Openstack] Additional port is created when launch the 1st VM
Danny Choi (dannchoi)
dannchoi at cisco.com
Tue Oct 7 17:40:19 UTC 2014
Hi James,
Your answer is correct.
localadmin at qa4:~/devstack$ neutron port-show 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09
+-----------------------+---------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:vnic_type | normal |
| device_id | dhcp9953a6bb-077a-5393-b780-faf42361301a-0afb2bd6-38c7-401d-966e-857dd02ba322 |
| device_owner | network:dhcp |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} |
| id | 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 |
| mac_address | fa:16:3e:6e:d8:a2 |
| name | |
| network_id | 0afb2bd6-38c7-401d-966e-857dd02ba322 |
| security_groups | |
| status | ACTIVE |
| tenant_id | 8eba682471404f389ce727bcbaa41ed2 |
+-----------------------+---------------------------------------------------------------------------------+
Thanks,
Danny
From: James Denton <james.denton at rackspace.com<mailto:james.denton at rackspace.com>>
Date: Tuesday, October 7, 2014 at 1:26 PM
To: Danny Choi <dannchoi at cisco.com<mailto:dannchoi at cisco.com>>
Cc: "openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>" <openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>>
Subject: Re: [Openstack] Additional port is created when launch the 1st VM
Hi Danny,
If the subnet had DCHP enabled, then that 'extra' port likely belongs to the DHCP namespace. It gets created upon the first boot of an instance in that network. The port will then hang around until the network is deleted. A port-show should show you the owner of the port.
James Denton
Network Engineer
Rackspace Private Cloud
james.denton at rackspace.com<mailto:james.denton at rackspace.com>
Sent from my iPhone
On Oct 7, 2014, at 12:15 PM, Danny Choi (dannchoi) <dannchoi at cisco.com<mailto:dannchoi at cisco.com>> wrote:
Hi,
I used devstack to deploy Juno OpenStack.
By default, devstack created 2 users: admin (with role “admin”) and demo;
and 2 networks: public (tenant = admin) and private (tenant = demo)
In CLI as user demo, there is one port created (attached to the Neutron router):
localadmin at qa4:~/devstack$ source openrc demo demo
localadmin at qa4:~/devstack$
localadmin at qa4:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 | | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
Launch a VM and attach the private network.
localadmin at qa4:~/devstack$ nova net-list
+--------------------------------------+---------+------+
| ID | Label | CIDR |
+--------------------------------------+---------+------+
| 0afb2bd6-38c7-401d-966e-857dd02ba322 | private | None |
| bc6e1c7d-6eca-419a-af93-47bb894e8789 | public | None |
+--------------------------------------+---------+------+
localadmin at qa4:~/devstack$ nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=0afb2bd6-38c7-401d-966e-857dd02ba322 vm1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | BDLgcrfCLV9h |
| config_drive | |
| created | 2014-10-07T16:35:07Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | 38ed7d4c-26f9-4d27-8f50-8f85c680771b |
| image | cirros-0.3.2-x86_64-uec (0c56933c-1d35-41cc-8771-3c0aa4d7562f) |
| key_name | - |
| metadata | {} |
| name | vm1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 8eba682471404f389ce727bcbaa41ed2 |
| updated | 2014-10-07T16:35:07Z |
| user_id | 2a90bd89402945b2986f0ddd97c13303 |
+--------------------------------------+----------------------------------------------------------------+
localadmin at qa4:~/devstack$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 38ed7d4c-26f9-4d27-8f50-8f85c680771b | vm1 | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+—————————+
Note that port with fixed IP 10.0.0.2 is created for the VM.
However, an additional port with fixed IP 10.0.0.3 is also created.
localadmin at qa4:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 | | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} | <<<???
| 8324a907-2693-4f8f-9299-e57947f91cb6 | | fa:16:3e:8d:62:40 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.2"} |
| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 | | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
This port remains after deleting the VM.
localadmin at qa4:~/devstack$ nova delete vm1
Request to delete server vm1 has been accepted.
localadmin at qa4:~/devstack$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
localadmin at qa4:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 | | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} | <<<???
| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 | | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
Now create another VM. Note that there is only one new port created; no additional port is created as before during the first VM creation.
localadmin at qa4:~/devstack$ nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=0afb2bd6-38c7-401d-966e-857dd02ba322 vm2
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | sNAwwHE5AwMw |
| config_drive | |
| created | 2014-10-07T16:54:52Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | c699003a-c88e-48b0-a494-6759399e7fcc |
| image | cirros-0.3.2-x86_64-uec (0c56933c-1d35-41cc-8771-3c0aa4d7562f) |
| key_name | - |
| metadata | {} |
| name | vm2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 8eba682471404f389ce727bcbaa41ed2 |
| updated | 2014-10-07T16:54:52Z |
| user_id | 2a90bd89402945b2986f0ddd97c13303 |
+--------------------------------------+----------------------------------------------------------------+
localadmin at qa4:~/devstack$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| c699003a-c88e-48b0-a494-6759399e7fcc | vm2 | ACTIVE | - | Running | private=10.0.0.4 |
+--------------------------------------+------+--------+------------+-------------+------------------+
localadmin at qa4:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 | | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} | <<<???
| 1c00f2ee-43dd-4d47-9844-d40afa7e1e61 | | fa:16:3e:1c:79:6a | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.4"} |
| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 | | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
Is this expected behavior?
Thanks,
Danny
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141007/b3eba403/attachment.html>
More information about the Openstack
mailing list