目前時間:2019年10月16日
對應的版本:Pike
使用的作業系統:Ubuntu 16.04.6 amd64
問題1:
先前使用過CentOS7來部署,但是遇到問題沒解決,是以改成了Ubuntu,但是後來是遇到了同樣的問題,是以和作業系統無關。
問題2:
在執行./stack.sh時,報錯:
Die 'The deploy driver agent_ipmitool is not in the list of enabled hardware types ipmi,fake-hardware'
解決方法:
在local.conf中修改$IRONIC_DEPLOY_DRIVER為:impi,添加後為:
# Change this to alter the default driver for nodes created by devstack.
# This driver should be in the enabled list above.
IRONIC_DEPLOY_DRIVER=ipmi
然後執行./unstack.sh進行清理,再執行./stack.sh
分析:
當我使用CentOS的時候也一樣遇到這個問題,當我在Ubuntu也同樣遇到時,我曉得這跟系統無關。
原因:
A.在stack/devstack/local.conf中,定義了
IRONIC_DEPLOY_DRIVER=agent_ipmitool
B.在/devstack/lib/ironic(8 Aug 2019, 109146 Bytes)檔案裡面規定了一個參數如下:
160 IRONIC_ENABLED_HARDWARE_TYPES=${IRONIC_ENABLED_HARDWARE_TYPES:-"ipmi,fake-hardware"}
而在同樣在後面做了IF判斷
293 # If the requested driver is not yet enable, enable it, if it is not it will fail anyway
294 if [[ -z "$(echo ${IRONIC_ENABLED_HARDWARE_TYPES} | grep -w ${IRONIC_DEPLOY_DRIVER})" ]]; then
295 die "The deploy driver $IRONIC_DEPLOY_DRIVER is not in the list of enabled \
296 hardware types $IRONIC_ENABLED_HARDWARE_TYPES"
297 fi
也就是說,local.conf中定義的$IRONIC_DEPLOY_DRIVER參數并不在IRONIC_ENABLED_HARDWARE_TYPES裡面,是以必然報錯。
我嘗試在local.conf中修改$IRONIC_DEPLOY_DRIVER為:impi,添加後為:
# Change this to alter the default driver for nodes created by devstack.
# This driver should be in the enabled list above.
IRONIC_DEPLOY_DRIVER=ipmi
然後執行./unstack.sh進行清理,再執行./stack.sh
沒有報錯。
用CentOS7 也一樣解決~
*如果将agent_ipmitoo加入IRONIC_ENABLED_HARDWARE_TYPES,在程式方面确實可以執行,但是後面還會遇到提示:找不到agent_ipmitoo driver 的情況,是以幹脆直接改為ipmi。主要安裝成功,後面有接口可以修改這些參數。