zoukankan      html  css  js  c++  java
  • openstack ironic vif & physical ports

    binding_host_id  binding_profile binding_vif_type binding_vnic_type   mac地址在bind的时候会更新

    [root@localhost ~]# neutron port-list
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | id                                   | name              | tenant_id                        | mac_address       | fixed_ips                                                                             |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | 10dcfcba-4430-4ff0-8e44-0ea3bd0538fd |                   | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:4a:3c:59 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.100"} |
    | 2a01e6a4-be3d-4718-8748-355bcee5cf4c | baremetal-0-extra | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:52:ec:f4 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.109"} |
    | 5b6382c6-a947-4890-b4d2-55d0b2d1346b |                   | 46cc02c6fab04f7095c4bc687d397610 | 48:57:02:64:e7:ad | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"} |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    [root@localhost ~]# nova list
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | ID                                   | Name             | Status | Task State | Power State | Networks            |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | kunpeng82        | ACTIVE | -          | Running     | net1=172.16.100.117 |
    | 288ee26a-9038-4999-9e56-b2819066f3da | private-instance | BUILD  | scheduling | NOSTATE     |                     |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+

    [root@localhost ~]# neutron port-show 5b6382c6-a947-4890-b4d2-55d0b2d1346b
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | Field | Value |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | admin_state_up | True |
    | allowed_address_pairs | |
    | binding:host_id | dc7cd2f5-4380-4e64-8980-8545b2e3d5af |
    | binding:profile | {"local_link_information": [{"switch_info": "localhost.localdomain", "port_id": "tapd46ec11c-01", "switch_id": "48:57:02:64:ea:1b"}]} |
    | binding:vif_details | {} |
    | binding:vif_type | binding_failed |
    | binding:vnic_type | baremetal |
    | created_at | 2020-04-02T07:18:46Z |
    | description | |
    | device_id | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 |
    | device_owner | compute:nova |
    | extra_dhcp_opts | |
    | fixed_ips | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"} |
    | id | 5b6382c6-a947-4890-b4d2-55d0b2d1346b |
    | mac_address | 48:57:02:64:e7:ad |
    | name | |
    | network_id | e00c4e3a-3634-4c59-8ce9-c09221cf684b |
    | port_security_enabled | True |
    | project_id | 46cc02c6fab04f7095c4bc687d397610 |
    | revision_number | 16 |
    | security_groups | e70c2156-a68d-4343-a167-4caffee8c643 |
    | status | DOWN |
    | tags | |
    | tenant_id | 46cc02c6fab04f7095c4bc687d397610 |
    | updated_at | 2020-04-02T07:25:19Z |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    [root@localhost ~]# ironic node-show dc7cd2f5-4380-4e64-8980-8545b2e3d5af
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +------------------------+--------------------------------------------------------------------------+
    | Property | Value |
    +------------------------+--------------------------------------------------------------------------+
    | boot_interface | pxe |
    | chassis_uuid | None |
    | clean_step | {} |
    | console_enabled | False |
    | console_interface | no-console |
    | created_at | 2020-04-01T07:05:53+00:00 |
    | deploy_interface | iscsi |
    | driver | ipmi |
    | driver_info | {u'ipmi_username': u'root', u'deploy_kernel': u'34fb179c-54b1-4e3e-b63c- |
    | | 5b7ee35174b7', u'ipmi_protocol_version': 1.5, u'deploy_ramdisk': |
    | | u'14dc5e08-bbe2-4c30-aff1-6efe9c2a60f4', u'ipmi_password': u'******', |
    | | u'ipmi_address': u'10.10.17.82'} |
    | driver_internal_info | {u'agent_url': u'http://172.16.100.106:9999', u'root_uuid_or_disk_id': |
    | | u'0x00000000', u'is_whole_disk_image': True, u'agent_version': |
    | | u'4.0.1.dev4'} |
    | extra | {} |
    | inspect_interface | no-inspect |
    | inspection_finished_at | None |
    | inspection_started_at | None |
    | instance_info | {u'root_gb': u'24', u'display_name': u'kunpeng82', u'image_source': u |
    | | '61d7484a-3ced-4258-a1e4-cbcb4ad33848', u'capabilities': u'{"boot_mode": |
    | | "uefi"}', u'memory_mb': u'252814', u'vcpus': u'64', u'local_gb': u'34', |
    | | u'swap_mb': u'0', u'nova_host_id': u'localhost.localdomain'} |
    | instance_uuid | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 |
    | last_error | None |
    | maintenance | False |
    | maintenance_reason | None |
    | management_interface | ipmitool |
    | name | node82 |
    | network_interface | neutron |
    | power_interface | ipmitool |
    | power_state | power on |
    | properties | {u'cpu_arch': u'aarch64', u'root_device': {u'name': u'/dev/sdc'}, |
    | | u'cpus': 64, u'capabilities': u'profile:compute,boot_mode:uefi', |
    | | u'memory_mb': 256910, u'local_gb': 34} |
    | provision_state | active |
    | provision_updated_at | 2020-04-02T07:25:31+00:00 |
    | raid_config | {} |
    | raid_interface | no-raid |
    | reservation | None |
    | resource_class | None |
    | storage_interface | noop |
    | target_power_state | None |
    | target_provision_state | None |
    | target_raid_config | {} |
    | traits | |
    | updated_at | 2020-04-02T07:25:31+00:00 |
    | uuid | dc7cd2f5-4380-4e64-8980-8545b2e3d5af |
    | vendor_interface | ipmitool |
    +------------------------+--------------------------------------------------------------------------+
    [root@localhost ~]#

    [root@localhost ~]# openstack baremetal node vif list  dc7cd2f5-4380-4e64-8980-8545b2e3d5af
    +--------------------------------------+
    | ID                                   |
    +--------------------------------------+
    | 5b6382c6-a947-4890-b4d2-55d0b2d1346b |
    +--------------------------------------+

     新建一个节点

    3bc00f80-896a-4f6e-9a52-9d711eb66a7c
    [root@localhost ~]# ironic node-list
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+
    | UUID                                 | Name    | Instance UUID                        | Power State | Provisioning State | Maintenance |
    +--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+
    | dc7cd2f5-4380-4e64-8980-8545b2e3d5af | node82  | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | power on    | active             | False       |
    | 3bc00f80-896a-4f6e-9a52-9d711eb66a7c | node187 | f18c4719-b7b7-4434-a08b-53c54e5d1248 | power on    | wait call-back     | False       |
    +--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+
    [root@localhost ~]# openstack baremetal node vif list  3bc00f80-896a-4f6e-9a52-9d711eb66a7c
    
    [root@localhost ~]# 
    3bc00f80-896a-4f6e-9a52-9d711eb66a7c node添加一个port

    
    
    [root@localhost ~]# openstack baremetal node vif list  3bc00f80-896a-4f6e-9a52-9d711eb66a7c
     没有vif

    [root@localhost ~]# ironic port-list
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +--------------------------------------+-------------------+
    | UUID | Address |
    +--------------------------------------+-------------------+
    | 2432d370-17bb-43cf-8bb3-d6f94b212d34 | 48:57:02:64:e7:ad |
    | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 | 10:81:84:00:31:e6 |
    +--------------------------------------+-------------------+
    [root@localhost ~]# ironic port-show 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +-----------------------+-----------------------------------------------------------------------+
    | Property | Value |
    +-----------------------+-----------------------------------------------------------------------+
    | address | 10:81:84:00:31:e6 |
    | created_at | 2020-04-13T07:10:50+00:00 |
    | extra | {} |
    | internal_info | {u'tenant_vif_port_id': u'd76c5a1d-9134-471b-acd1-1075a35ce09b', |
    | | u'provisioning_vif_port_id': u'ab92d7ad-a6d4-4b4d-8132-7438ad5761ec'} |
    | local_link_connection | {u'switch_info': u'localhost.localdomain', u'port_id': |
    | | u'tapd46ec11c-01', u'switch_id': u'48:57:02:64:ea:1b'} |
    | node_uuid | 3bc00f80-896a-4f6e-9a52-9d711eb66a7c |
    | physical_network | None |
    | portgroup_uuid | None |
    | pxe_enabled | True |
    | updated_at | 2020-04-13T07:23:27+00:00 |
    | uuid | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 |
    +-----------------------+-----------------------------------------------------------------------+
    [root@localhost ~]#

     
    [root@localhost ~]# nova list
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | ID                                   | Name             | Status | Task State | Power State | Networks            |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | kunpeng82        | ACTIVE | -          | Running     | net1=172.16.100.117 |
    | 288ee26a-9038-4999-9e56-b2819066f3da | private-instance | BUILD  | scheduling | NOSTATE     |                     |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    给ironic node3bc00f80-896a-4f6e-9a52-9d711eb66a7c创建一台裸金属服务器

    [root@localhost ~]# bash start_vm.sh
    +--------------------------------------+---------------------------------------------------------------------+
    | Property | Value |
    +--------------------------------------+---------------------------------------------------------------------+
    | OS-DCF:diskConfig | MANUAL |
    | OS-EXT-AZ:availability_zone | |
    | OS-EXT-SRV-ATTR:host | - |
    | OS-EXT-SRV-ATTR:hostname | feiteng187 |
    | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
    | OS-EXT-SRV-ATTR:instance_name | |
    | OS-EXT-SRV-ATTR:kernel_id | |
    | OS-EXT-SRV-ATTR:launch_index | 0 |
    | OS-EXT-SRV-ATTR:ramdisk_id | |
    | OS-EXT-SRV-ATTR:reservation_id | r-utg2enrs |
    | OS-EXT-SRV-ATTR:root_device_name | - |
    | OS-EXT-SRV-ATTR:user_data | - |
    | 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 | HEbReaeoKZ6G |
    | config_drive | |
    | created | 2020-04-13T07:22:36Z |
    | description | - |
    | flavor:disk | 24 |
    | flavor:ephemeral | 0 |
    | flavor:extra_specs | {"capabilities:boot_mode": "uefi"} |
    | flavor:original_name | test_baremetal_flavor |
    | flavor:ram | 252814 |
    | flavor:swap | 0 |
    | flavor:vcpus | 64 |
    | hostId | |   //空的
    | host_status | |
    | id | f18c4719-b7b7-4434-a08b-53c54e5d1248 |
    | image | centos8-baremetal-2019.11.28 (d3868d9f-d897-4df4-af68-1e98466f326e) |
    | key_name | ssh_key |
    | locked | False |
    | metadata | {} |
    | name | feiteng187 |
    | os-extended-volumes:volumes_attached | [] |
    | progress | 0 |
    | security_groups | default |
    | status | BUILD |
    | tags | [] |
    | tenant_id | 46cc02c6fab04f7095c4bc687d397610 |
    | updated | 2020-04-13T07:22:36Z |
    | user_id | 45ff9b841e9540af939b8572176bf572 |
    +--------------------------------------+---------------------------------------------------------------------+

    [root@localhost ~]# nova list
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | ID | Name | Status | Task State | Power State | Networks |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | f18c4719-b7b7-4434-a08b-53c54e5d1248 | feiteng187 | BUILD | spawning | NOSTATE | net1=172.16.100.103 |
    | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | kunpeng82 | ACTIVE | - | Running | net1=172.16.100.117 |
    | 288ee26a-9038-4999-9e56-b2819066f3da | private-instance | BUILD | scheduling | NOSTATE | |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+

    有vif了

    [root@localhost ~]# openstack baremetal node vif list 3bc00f80-896a-4f6e-9a52-9d711eb66a7c
    +--------------------------------------+
    | ID |
    +--------------------------------------+
    | d76c5a1d-9134-471b-acd1-1075a35ce09b |
    +--------------------------------------+

    [root@localhost ~]# openstack baremetal port show d76c5a1d-9134-471b-acd1-1075a35ce09b
    Port d76c5a1d-9134-471b-acd1-1075a35ce09b could not be found. (HTTP 404) //neutron能看到


    [root@localhost ~]#

    [root@localhost ~]# neutron port-show d76c5a1d-9134-471b-acd1-1075a35ce09b
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +-----------------------+---------------------------------------------------------------------------------------+
    | Field | Value |
    +-----------------------+---------------------------------------------------------------------------------------+
    | admin_state_up | True |
    | allowed_address_pairs | |
    | binding:host_id | |
    | binding:profile | {} |
    | binding:vif_details | {} |
    | binding:vif_type | unbound |
    | binding:vnic_type | normal |
    | created_at | 2020-04-13T07:22:40Z |
    | description | |
    | device_id | f18c4719-b7b7-4434-a08b-53c54e5d1248 |
    | device_owner | compute:nova |
    | extra_dhcp_opts | |
    | fixed_ips | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.103"} |
    | id | d76c5a1d-9134-471b-acd1-1075a35ce09b |
    | mac_address | fa:16:3e:ea:39:ee |  //随机产生
    | name | |
    | network_id | e00c4e3a-3634-4c59-8ce9-c09221cf684b |
    | port_security_enabled | True |
    | project_id | 46cc02c6fab04f7095c4bc687d397610 |
    | revision_number | 13 |
    | security_groups | e70c2156-a68d-4343-a167-4caffee8c643 |
    | status | DOWN |
    | tags | |
    | tenant_id | 46cc02c6fab04f7095c4bc687d397610 |
    | updated_at | 2020-04-13T07:23:20Z |
    +-----------------------+---------------------------------------------------------------------------------------+
    [root@localhost ~]# nova list
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | ID | Name | Status | Task State | Power State | Networks |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | f18c4719-b7b7-4434-a08b-53c54e5d1248 | feiteng187 | BUILD | spawning | NOSTATE | net1=172.16.100.103 |
    | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | kunpeng82 | ACTIVE | - | Running | net1=172.16.100.117 |
    | 288ee26a-9038-4999-9e56-b2819066f3da | private-instance | BUILD | scheduling | NOSTATE | |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    [root@localhost ~]#

    [root@localhost ~]# neutron port-list
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | id | name | tenant_id | mac_address | fixed_ips |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | 10dcfcba-4430-4ff0-8e44-0ea3bd0538fd | | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:4a:3c:59 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.100"} |
    | 2a01e6a4-be3d-4718-8748-355bcee5cf4c | baremetal-0-extra | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:52:ec:f4 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.109"} |
    | 5b6382c6-a947-4890-b4d2-55d0b2d1346b | | 46cc02c6fab04f7095c4bc687d397610 | 48:57:02:64:e7:ad | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"} |
    | ab92d7ad-a6d4-4b4d-8132-7438ad5761ec | | 42272601916748e2ba64d8a1c5413ba4 | 10:81:84:00:31:e6 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.127"} |
    | d76c5a1d-9134-471b-acd1-1075a35ce09b | | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:ea:39:ee | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.103"} |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+

                                                              没看到mac : 10:81:84:00:31:e6

    [root@localhost ~]# ironic port-list
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +--------------------------------------+-------------------+
    | UUID | Address |
    +--------------------------------------+-------------------+
    | 2432d370-17bb-43cf-8bb3-d6f94b212d34 | 48:57:02:64:e7:ad |
    | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 | 10:81:84:00:31:e6 |
    +--------------------------------------+-------------------+
    [root@localhost ~]# ironic port-show 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +-----------------------+-----------------------------------------------------------------------+
    | Property | Value |
    +-----------------------+-----------------------------------------------------------------------+
    | address | 10:81:84:00:31:e6 |
    | created_at | 2020-04-13T07:10:50+00:00 |
    | extra | {} |
    | internal_info | {u'tenant_vif_port_id': u'd76c5a1d-9134-471b-acd1-1075a35ce09b', |
    | | u'provisioning_vif_port_id': u'ab92d7ad-a6d4-4b4d-8132-7438ad5761ec'} |
    | local_link_connection | {u'switch_info': u'localhost.localdomain', u'port_id': |
    | | u'tapd46ec11c-01', u'switch_id': u'48:57:02:64:ea:1b'} |
    | node_uuid | 3bc00f80-896a-4f6e-9a52-9d711eb66a7c |
    | physical_network | None |
    | portgroup_uuid | None |
    | pxe_enabled | True |
    | updated_at | 2020-04-13T07:23:27+00:00 |
    | uuid | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 |
    +-----------------------+-----------------------------------------------------------------------+
    [root@localhost ~]#

    虚拟机创建失败

    [root@localhost ~]# nova list
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | ID | Name | Status | Task State | Power State | Networks |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+
    | f18c4719-b7b7-4434-a08b-53c54e5d1248 | feiteng187 | ERROR | - | NOSTATE | |
    | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 | kunpeng82 | ACTIVE | - | Running | net1=172.16.100.117 |
    | 288ee26a-9038-4999-9e56-b2819066f3da | private-instance | BUILD | scheduling | NOSTATE | |
    +--------------------------------------+------------------+--------+------------+-------------+---------------------+

    创建失败后,vrf被删掉

    [root@localhost ~]# neutron port-show d76c5a1d-9134-471b-acd1-1075a35ce09b
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    Unable to find port with name or id 'd76c5a1d-9134-471b-acd1-1075a35ce09b'
    [root@localhost ~]# openstack baremetal node vif list 3bc00f80-896a-4f6e-9a52-9d711eb66a7c

    [root@localhost ~]#

    [root@localhost ~]# ironic port-list
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +--------------------------------------+-------------------+
    | UUID                                 | Address           |
    +--------------------------------------+-------------------+
    | 2432d370-17bb-43cf-8bb3-d6f94b212d34 | 48:57:02:64:e7:ad |
    | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 | 10:81:84:00:31:e6 |
    +--------------------------------------+-------------------+
    [root@localhost ~]# ironic port-show 2432d370-17bb-43cf-8bb3-d6f94b212d34 
    The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
    +-----------------------+------------------------------------------------------------------+
    | Property              | Value                                                            |
    +-----------------------+------------------------------------------------------------------+
    | address               | 48:57:02:64:e7:ad                                                |
    | created_at            | 2020-04-01T07:07:31+00:00                                        |
    | extra                 | {}                                                               |
    | internal_info         | {u'tenant_vif_port_id': u'5b6382c6-a947-4890-b4d2-55d0b2d1346b'} |
    | local_link_connection | {u'switch_info': u'localhost.localdomain', u'port_id':           |
    |                       | u'tapd46ec11c-01', u'switch_id': u'48:57:02:64:ea:1b'}           |
    | node_uuid             | dc7cd2f5-4380-4e64-8980-8545b2e3d5af                             |
    | physical_network      | None                                                             |
    | portgroup_uuid        | None                                                             |
    | pxe_enabled           | True                                                             |
    | updated_at            | 2020-04-02T07:25:17+00:00                                        |
    | uuid                  | 2432d370-17bb-43cf-8bb3-d6f94b212d34                             |
    +-----------------------+------------------------------------------------------------------+
    部署成功的ironic node的ironic port含有tenant_vif_port_id信息
    
    

    [root@localhost ~]# neutron port-show 5b6382c6-a947-4890-b4d2-55d0b2d1346b
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | Field | Value |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | admin_state_up | True |
    | allowed_address_pairs | |
    | binding:host_id | dc7cd2f5-4380-4e64-8980-8545b2e3d5af |
    | binding:profile | {"local_link_information": [{"switch_info": "localhost.localdomain", "port_id": "tapd46ec11c-01", "switch_id": "48:57:02:64:ea:1b"}]} |
    | binding:vif_details | {} |
    | binding:vif_type | binding_failed |
    | binding:vnic_type | baremetal |
    | created_at | 2020-04-02T07:18:46Z |
    | description | |
    | device_id | 812b09e7-ef5c-4c19-87cb-ee8c60e90070 |
    | device_owner | compute:nova |
    | extra_dhcp_opts | |
    | fixed_ips | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"} |
    | id | 5b6382c6-a947-4890-b4d2-55d0b2d1346b |
    | mac_address | 48:57:02:64:e7:ad |
    | name | |
    | network_id | e00c4e3a-3634-4c59-8ce9-c09221cf684b |
    | port_security_enabled | True |
    | project_id | 46cc02c6fab04f7095c4bc687d397610 |
    | revision_number | 16 |
    | security_groups | e70c2156-a68d-4343-a167-4caffee8c643 |
    | status | DOWN |
    | tags | |
    | tenant_id | 46cc02c6fab04f7095c4bc687d397610 |
    | updated_at | 2020-04-02T07:25:19Z |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    [root@localhost ~]#


    [root@localhost
    ~]# ironic port-show 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead. +-----------------------+--------------------------------------------------------+ | Property | Value | +-----------------------+--------------------------------------------------------+ | address | 10:81:84:00:31:e6 | | created_at | 2020-04-13T07:10:50+00:00 | | extra | {} | | internal_info | {} | | local_link_connection | {u'switch_info': u'localhost.localdomain', u'port_id': | | | u'tapd46ec11c-01', u'switch_id': u'48:57:02:64:ea:1b'} | | node_uuid | 3bc00f80-896a-4f6e-9a52-9d711eb66a7c | | physical_network | None | | portgroup_uuid | None | | pxe_enabled | True | | updated_at | 2020-04-13T07:55:33+00:00 | | uuid | 612ed38f-b1a9-4e5b-a8ab-9e5ea0bc4c02 | +-----------------------+--------------------------------------------------------+ [root@localhost ~]#
    ironic port没有tenant_vif_port_id信息

    部署成功的nova server实例

    [root@localhost workspace]# nova show kunpeng82
    +--------------------------------------+-------------------------------------------------------------+
    | Property                             | Value                                                       |
    +--------------------------------------+-------------------------------------------------------------+
    | OS-DCF:diskConfig                    | MANUAL                                                      |
    | OS-EXT-AZ:availability_zone          | nova                                                        |
    | OS-EXT-SRV-ATTR:host                 | localhost.localdomain                                       |
    | OS-EXT-SRV-ATTR:hostname             | kunpeng82                                                   |
    | OS-EXT-SRV-ATTR:hypervisor_hostname  | dc7cd2f5-4380-4e64-8980-8545b2e3d5af      ironic node uuid                  |
    | OS-EXT-SRV-ATTR:instance_name        | instance-0000012f                                           |
    | OS-EXT-SRV-ATTR:kernel_id            |                                                             |
    | OS-EXT-SRV-ATTR:launch_index         | 0                                                           |
    | OS-EXT-SRV-ATTR:ramdisk_id           |                                                             |
    | OS-EXT-SRV-ATTR:reservation_id       | r-54t820tt                                                  |
    | OS-EXT-SRV-ATTR:root_device_name     | /dev/sda                                                    |
    | OS-EXT-SRV-ATTR:user_data            | -                                                           |
    | OS-EXT-STS:power_state               | 1                                                           |
    | OS-EXT-STS:task_state                | -                                                           |
    | OS-EXT-STS:vm_state                  | active                                                      |
    | OS-SRV-USG:launched_at               | 2020-04-02T07:25:31.000000                                  |
    | OS-SRV-USG:terminated_at             | -                                                           |
    | accessIPv4                           |                                                             |
    | accessIPv6                           |                                                             |
    | config_drive                         |                                                             |
    | created                              | 2020-04-02T07:18:41Z                                        |
    | description                          | -                                                           |
    | flavor:disk                          | 24                                                          |
    | flavor:ephemeral                     | 0                                                           |
    | flavor:extra_specs                   | {"capabilities:boot_mode": "uefi"}                          |
    | flavor:original_name                 | test_baremetal_flavor                                       |
    | flavor:ram                           | 252814                                                      |
    | flavor:swap                          | 0                                                           |
    | flavor:vcpus                         | 64                                                          |
    | hostId                               | 756791a7c229491a9d6a2773e1e4e2690d9a9db47d143e6e3885710f    |
    | host_status                          | UP                                                          |
    | id                                   | 812b09e7-ef5c-4c19-87cb-ee8c60e90070                        |
    | image                                | centos7-server-arm64 (61d7484a-3ced-4258-a1e4-cbcb4ad33848) |
    | key_name                             | ssh_key                                                     |
    | locked                               | False                                                       |
    | metadata                             | {}                                                          |
    | name                                 | kunpeng82                                                   |
    | net1 network                         | 172.16.100.117                                              |
    | os-extended-volumes:volumes_attached | []                                                          |
    | progress                             | 0                                                           |
    | security_groups                      | default                                                     |
    | status                               | ACTIVE                                                      |
    | tags                                 | []                                                          |
    | tenant_id                            | 46cc02c6fab04f7095c4bc687d397610                            |
    | updated                              | 2020-04-02T07:25:32Z                                        |
    | user_id                              | 45ff9b841e9540af939b8572176bf572                            |
    +--------------------------------------+-------------------------------------------------------------+
    [root@localhost workspace]# 

    Port binding 的属性

    Port binding 扩展定义的属性主要包括 vnic_type、vif_type、vif_details、host_id、profile ,这些属性都可以在创建 port 的 REST API接口中可以直接指定。

    一个创建 port 的 REST API body 实例如下:

    POST      /v2.0/ports

    {
        "port": {
            "binding:host_id": "4df8d9ff-6f6f-438f-90a1-ef660d4586ad",
            "binding:profile": {
                "local_link_information": [
                    {
                        "port_id": "Ethernet3/1",
                        "switch_id": "0a:1b:2c:3d:4e:5f",
                        "switch_info": "switch1"
                    }
                ]
            },
            "binding:vnic_type": "baremetal",
            "device_id": "d90a13da-be41-461f-9f99-1dbcf438fdf2",
            "device_owner": "baremetal:none",
            "dns_domain": "my-domain.org.",
            "dns_name": "myport",
            "qos_policy_id": "29d5e02e-d5ab-4929-bee4-4a9fc12e22ae"
        }
    }

     关于每个属性的具体含义、类型与取值范围如下表:

    Port binding 属性及说明
    属性名称类型含义与取值
    binding:host_id string 该端口位于的实际计算节点的 uuid。
    binding:profile object 这是一个字典,该字典赋予特定计算节点上应用能够传递或者接受vif port信息的能力,该信息专用于该计算节点上的网络后端实现,该字段的格式由对应的后端驱动决定,API 不作规定。
    binding:vif_details object 这是一个字典,记载关于该端口的一些附加信息 。至今为止这个字段包含以下key: port_filter 和 ovs_hybrid_plug 。 port_filter 是一个布尔值用来表示当前系统的网络服务是否提供端口过滤的功能,比如安全组和/或防IP/MAC地址仿冒。 ovs_hybrid_plug 是一个布尔值的标志用来通知一个网络 API 消费者(比如 nova )是否对OVS使用混合插入(hybrid plugging)策略。
    binding:vif_type string 用来处理该端口的机制类型。一个网络 API 消费者例如 nova 根据此属性可以选择一个合适的设备(比如一台虚拟机的网络接口)关联到该端口上 。当前可用的值包括: ovsbridgemacvtaphw_vebhostdev_physicalvhostuserdistributed 以及 other。还有一些特殊的值: unbound 和binding_failed 。 unbound 没有被任何网络后端所实现绑定。 binding_failed 则代表当一个网络后端在试图对该端口进行绑定时发生了错误。
    binding:vnic_type string 该端口应该隶属的vNIC的类型 。 该选项被Neutron用来决定使用哪种 mechanism driver 来处理该端口的绑定工作。可用的值包括: normalmacvtapdirect, baremetal, direct-physical 和 virtio-forwarder.。至于哪一种vNIC才是实际可用,这取决于当前部署的实际环境。
    [root@localhost ~]# neutron port-list
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | id                                   | name              | tenant_id                        | mac_address       | fixed_ips                                                                             |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    | 10dcfcba-4430-4ff0-8e44-0ea3bd0538fd |                   | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:4a:3c:59 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.100"} |
    | 2a01e6a4-be3d-4718-8748-355bcee5cf4c | baremetal-0-extra | 46cc02c6fab04f7095c4bc687d397610 | fa:16:3e:52:ec:f4 | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.109"} |
    | 5b6382c6-a947-4890-b4d2-55d0b2d1346b |                   | 46cc02c6fab04f7095c4bc687d397610 | 48:57:02:64:e7:ad | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"} |
    +--------------------------------------+-------------------+----------------------------------+-------------------+---------------------------------------------------------------------------------------+
    [root@localhost ~]# neutron port-show  5b6382c6-a947-4890-b4d2-55d0b2d1346b
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | Field                 | Value                                                                                                                                 |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    | admin_state_up        | True                                                                                                                                  |
    | allowed_address_pairs |                                                                                                                                       |
    | binding:host_id       | dc7cd2f5-4380-4e64-8980-8545b2e3d5af                                                                                                  |
    | binding:profile       | {"local_link_information": [{"switch_info": "localhost.localdomain", "port_id": "tapd46ec11c-01", "switch_id": "48:57:02:64:ea:1b"}]} |
    | binding:vif_details   | {}                                                                                                                                    |
    | binding:vif_type      | binding_failed                                                                                                                        |
    | binding:vnic_type     | baremetal                                                                                                                             |
    | created_at            | 2020-04-02T07:18:46Z                                                                                                                  |
    | description           |                                                                                                                                       |
    | device_id             | 812b09e7-ef5c-4c19-87cb-ee8c60e90070                                                                                                  |
    | device_owner          | compute:nova                                                                                                                          |
    | extra_dhcp_opts       |                                                                                                                                       |
    | fixed_ips             | {"subnet_id": "6e6628cf-58e1-4452-8364-9b5f95287a1d", "ip_address": "172.16.100.117"}                                                 |
    | id                    | 5b6382c6-a947-4890-b4d2-55d0b2d1346b                                                                                                  |
    | mac_address           | 48:57:02:64:e7:ad                                                                                                                     |
    | name                  |                                                                                                                                       |
    | network_id            | e00c4e3a-3634-4c59-8ce9-c09221cf684b                                                                                                  |
    | port_security_enabled | True                                                                                                                                  |
    | project_id            | 46cc02c6fab04f7095c4bc687d397610                                                                                                      |
    | revision_number       | 16                                                                                                                                    |
    | security_groups       | e70c2156-a68d-4343-a167-4caffee8c643                                                                                                  |
    | status                | DOWN                                                                                                                                  |
    | tags                  |                                                                                                                                       |
    | tenant_id             | 46cc02c6fab04f7095c4bc687d397610                                                                                                      |
    | updated_at            | 2020-04-02T07:25:19Z                                                                                                                  |
    +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+
    [root@localhost ~]# 

    http://www.jeepxie.net/article/24690.html

  • 相关阅读:
    第5章 JDBC/ODBC服务器
    第4章 SparkSQL数据源
    第3章 SparkSQL解析
    第2章 执行SparkSQL查询
    第1章 Spark SQL概述
    Ubutun重启网卡
    Java面试通关要点汇总整理
    40道Java基础常见面试题及详细答案
    ListView
    数据库表及字段命名规范
  • 原文地址:https://www.cnblogs.com/dream397/p/12106603.html
Copyright © 2011-2022 走看看