1. 程式人生 > >openstack 啟動winserver映象,需要在計算節點nova.conf中修改預設引數block_device_allocate_retries 的引數修改為180 秒

openstack 啟動winserver映象,需要在計算節點nova.conf中修改預設引數block_device_allocate_retries 的引數修改為180 秒

用winserver images 映象 建立虛擬機器時,總是報錯,一開始懷疑是映象做的有問題
後臺檢視報錯日誌"

2018-05-03 15:33:40.801 30313 ERROR nova.compute.manager [instance: e083334c-1655-40ee-858e-f55b2b90be24] BuildAbortException: Build of instance e083334c-1655-40ee-858e-f55b2b90be24 aborted: Volume a6c9b930-73e3-44cd-9cd3-73491c02b37e did not finish being created even after we waited 190 seconds or 61 attempts. And its status is downloading"

超時,volumes 無法現在完成
在nova.conf中有一個控制卷裝置重試的引數:block_device_allocate_retries,可以通過修改此引數延長等待時間。
該引數預設值為60,這個對應了之前例項建立失敗訊息裡的61 attempts。我們可以將此引數設定的大一點,例如:180。這樣Nova元件就不會等待卷建立超時,也即解決了此問題。
現在把 block_device_allocate_retries 設定成180 秒

重啟nova服務

systemctl restart openstack-nova-compute libvirtd

重新建立,檢視log  volumes 已經建立成功


"
c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.
2018-05-03 15:39:22.188 165192 INFO nova.compute.resource_tracker [req-7a030c86-84dd-4a6c-83c4-933e344b159a 58f26a895b2b46759ee052ca3d7c3fef 087e3a4d906e42ed843dc57f72778dab - default default] Final resource view: name=compute25 phys_ram=261922MB used_ram=8608MB phys_disk=46289GB used_disk=40GB total_vcpus=32 used_vcpus=8 pci_stats=[]
2018-05-03 15:40:20.375 165192 INFO nova.compute.manager [req-ba038446-7962-432b-b4fa-7c01e433c1dd 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] [instance: 9d34c5fb-1069-4d9d-b5fc-504345194abe] Get console output
2018-05-03 15:40:31.367 165192 INFO nova.compute.resource_tracker [req-3684efc2-ee51-4c1e-9410-3c4e7e5d759d 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Final resource view: name=compute25 phys_ram=261922MB used_ram=8608MB phys_disk=46289GB used_disk=40GB total_vcpus=32 used_vcpus=8 pci_stats=[]
2018-05-03 15:41:03.502 165192 WARNING oslo.service.loopingcall [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 9.20 sec
2018-05-03 15:41:34.579 165192 WARNING oslo.service.loopingcall [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 11.07 sec
2018-05-03 15:41:35.260 165192 INFO nova.compute.resource_tracker [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Final resource view: name=compute25 phys_ram=261922MB used_ram=8608MB phys_disk=46289GB used_disk=40GB total_vcpus=32 used_vcpus=8 pci_stats=[]
2018-05-03 15:42:11.448 165192 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Running privsep helper: ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'privsep-helper', '--config-file', '/usr/share/nova/nova-dist.conf', '--config-file', '/etc/nova/nova.conf', '--privsep_context', 'os_brick.privileged.default', '--privsep_sock_path', '/tmp/tmp4khq0j/privsep.sock']
2018-05-03 15:42:12.186 165192 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Spawned new privsep daemon via rootwrap
2018-05-03 15:42:12.127 165574 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep daemon starting
2018-05-03 15:42:12.131 165574 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep process running with uid/gid: 0/0
2018-05-03 15:42:12.135 165574 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep process running with capabilities (eff/prm/inh): CAP_SYS_ADMIN/CAP_SYS_ADMIN/none
2018-05-03 15:42:12.135 165574 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep daemon running as pid 165574
2018-05-03 15:42:13.979 165192 INFO nova.virt.libvirt.driver [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] [instance: 9d34c5fb-1069-4d9d-b5fc-504345194abe] Creating image
2018-05-03 15:42:14.062 165192 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Running privsep helper: ['sudo', 'nova-rootwrap', '/etc/nova/rootwrap.conf', 'privsep-helper', '--config-file', '/usr/share/nova/nova-dist.conf', '--config-file', '/etc/nova/nova.conf', '--privsep_context', 'vif_plug_linux_bridge.privsep.vif_plug', '--privsep_sock_path', '/tmp/tmpjXKgdR/privsep.sock']
2018-05-03 15:42:14.830 165192 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] Spawned new privsep daemon via rootwrap
2018-05-03 15:42:14.771 165587 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep daemon starting
2018-05-03 15:42:14.775 165587 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep process running with uid/gid: 0/0
2018-05-03 15:42:14.779 165587 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep process running with capabilities (eff/prm/inh): CAP_NET_ADMIN/CAP_NET_ADMIN/none
2018-05-03 15:42:14.779 165587 INFO oslo.privsep.daemon [req-c44b8098-791b-4725-85da-3a6b2e43e58f 7f643d2a3b5f4216ad6c5c8794aaaaf3 06db51af786d48f88a36d11ac096d51b - default default] privsep daemon running as pid 165587
"

陸續把其他計算節點的nova.conf 關於
block_device_allocate_retries 的引數修改為180 秒 且重啟服務