ironic驱动-IMPITool

概述

IMPITool驱动是通过ipmitool工具来管理部署节点的,目前主要有两个驱动:

  • agent_ipmitool
  • pxe_ipmitool

配置驱动

要修改ironic支持的驱动需要修改配置文件/etc/ironic/ironic.conf的ennabled_drivers字段。

如果没有配置,默认情况下,ironic使用的是pxe_ipmitool驱动。

[DEFAULT]
...
enabled_drivers = pxe_ipmitool,agent_ipmitool

修改完成之后需要重启conductor服务生效

 systemctl restart openstack-ironic-conductor.service

node节点注册驱动

一个完整的ironic node信息如下表所示。从表中driver字段可以看出使用的是pxe_ipmitool驱动。

从driver_info字段可以看出impi的地址,用户名,密码等信息(这里密码使用*号代替了,具体可以配置)。

[root@ctrl templates(keystone_admin)]# ironic node-show 94c2fce1-acc4-4e28-b9f9-0761ebd8be31
+------------------------+-------------------------------------------------------------------------+
| Property | Value |
+------------------------+-------------------------------------------------------------------------+
| chassis_uuid | |
| clean_step | {} |
| console_enabled | False |
| created_at | 2016-11-30T09:00:26+00:00 |
| driver | pxe_ipmitool |
| driver_info | {u'ipmi_address': u'192.168.1.2', u'ipmi_username': u'user', |
| | u'ipmi_password': u'******'} |
| driver_internal_info | {u'agent_erase_devices_iterations': 1} |
| extra | {} |
| inspection_finished_at | None |
| inspection_started_at | None |
| instance_info | {u'deploy_key': u'BK26BQPYH3PC024H321294L200TXGIUJ'} |
| instance_uuid | None |
| last_error | None |
| maintenance | True |
| maintenance_reason | Failed to prepare node 94c2fce1-acc4-4e28-b9f9-0761ebd8be31 for |
| | cleaning: Cannot validate PXE bootloader. Some parameters were missing |
| | in node's driver_info. Missing are: ['deploy_ramdisk', 'deploy_kernel'] |
| name | None |
| power_state | power off |
| properties | {u'memory_mb': u'562144', u'cpu_arch': u'x86_64', u'local_gb': u'1114', |
| | u'cpus': u'40'} |
| provision_state | clean failed |
| provision_updated_at | 2016-12-01T03:37:20+00:00 |
| raid_config | |
| reservation | None |
| target_power_state | None |
| target_provision_state | available |
| target_raid_config | |
| updated_at | 2016-12-01T03:37:20+00:00 |
| uuid | 94c2fce1-acc4-4e28-b9f9-0761ebd8be31 |
+------------------------+-------------------------------------------------------------------------+

ironic是在创建node的时候指定驱动的,具体步骤如下:

ironic node-create -d pxe_ipmitool -i ipmi_address=<address>
-i ipmi_username=<username> -i ipmi_password=<password>

-d指定使用的驱动, -i指定驱动的信息。

一般需要driver_info需要指定如下信息:

  1. ipmi_address
  2. ipmi_username
  3. ipmi_password
  4. ipmi_port # 远程IPMI RMCP端口,默认使用623端口

目前如果使用agent_ipmitool驱动要求配置Swift Temp URLs。这个问题已经有人在社区反应了,具体链接如下:

https://bugs.launchpad.net/openstack-ansible/+bug/1634299

使用agent_ipmitool配置如下:

[DEFAULT]
enabled_drivers=agent_pyghmi,agent_ipmitool # we're using the agent
debug=true # we believe in logging all the things
rpc_thread_pool_size=4 # we've found this to work best with high load conductors
rpc_conn_pool_size=20 # we've found this to work best with high load conductors [conductor]
force_power_state_during_sync=false # we don't want any surprises :) [glance] # these settings are required for using swift temp URLs
swift_temp_url_key=<lol>
swift_scheme=https
swift_endpoint_url=<swift-host>
swift_path=/v1/<rackspace_tenant>
swift_backend_container=<rackspace_container> [agent]
dhcp_provider=external
heartbeat_timeout=30 # relied on for deploys, shorter timeout means shorter deploys. We'll be fixing this in code soon.
provisioning_network_uuid=<network_id>
上一篇:SQL优化详解


下一篇:where过滤条件中的注意事项