您好,登錄后才能下訂單哦!
本篇文章為大家展示了大數據中創建云硬盤失敗的解決過程是怎樣的,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
登錄dashboard,點擊創建云硬盤失敗,而且是點擊完就直接報error錯誤。
思路一:新上傳的image鏡像,是不是image的版本有問題
檢查完發現新的image鏡像是新版本的qcow2格式 QEMU QCOW Image (v3),
# qemu-img info cloudera-quickstart-vm-5.7.0-0-kvm.qcow2 image: cloudera-quickstart-vm-5.7.0-0-kvm.qcow2 file format: qcow2 virtual size: 64G (68719476736 bytes) disk size: 8.3G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false
而舊版本的鏡像的compat是0.10
懷疑版本問題導致無法創建,嘗試版本轉換
# qemu-img amend -f qcow2 -o compat=0.10 test.qcow2
結果轉換也失敗!
同時想到嘗試直接從鏡像 啟動云主機,發現云主機啟動正常,于是否認思路一。
思路二:從鏡像創建云硬盤失敗,檢查cinder的日志
一開始從日志中查找云硬盤的id,未發現有用信息。最后在scheduler.log 日志中發現了端倪。
# cd /var/log/cinder # view scheduler.log 2016-07-16 15:09:02.307 12684 WARNING cinder.scheduler.host_manager [req-42961a34-f2ae-4595-bb01-f4b862edfa49 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] volume service is down. (host: bdc212) 2016-07-16 15:09:02.308 12684 WARNING cinder.scheduler.filter_scheduler [req-42961a34-f2ae-4595-bb01-f4b862edfa49 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] No weighed hosts found for volume with properties : {} 2016-07-16 15:09:02.310 12684 ERROR cinder.scheduler.flows.create_volume [req-42961a34-f2ae-4595-bb01-f4b862edfa49 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] Failed to run task cinder.scheduler.flows.create _volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available 2016-07-16 15:09:30.887 12684 WARNING cinder.scheduler.host_manager [req-230ee887-c621-457d-979b-c0a7f2e477f9 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] volume service is down. (host: bdc212) 2016-07-16 15:09:30.888 12684 WARNING cinder.scheduler.filter_scheduler [req-230ee887-c621-457d-979b-c0a7f2e477f9 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] No weighed hosts found for volume with properties : {} 2016-07-16 15:09:30.890 12684 ERROR cinder.scheduler.flows.create_volume [req-230ee887-c621-457d-979b-c0a7f2e477f9 3d8b93c202a94046be24e4eee5d16fb8 c05f2d7996144cb69921e64391db4512 - - -] Failed to run task cinder.scheduler.flows.create _volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available
日志中的 volume service is down. (host: bdc212)說明了問題,檢查bdc212主機上的volume服務
bdc212
Warning keystonerc not sourced
== Nova services ==
openstack-nova-api: active
openstack-nova-cert: active
openstack-nova-compute: active
openstack-nova-scheduler: active
openstack-nova-conductor: active
== Glance services ==
openstack-glance-api: active
openstack-glance-registry: active
== Keystone service ==
== Horizon service ==
openstack-dashboard: active
== neutron services ==
neutron-server: active
neutron-openvswitch-agent: active
== Cinder services ==
openstack-cinder-api: active
openstack-cinder-scheduler: active
openstack-cinder-volume: failed
== Support services ==
openvswitch: active
dbus: active
target: active
rabbitmq-server: active
memcached: active
== Keystone users ==
發現 openstack-cinder-volume 服務狀態為失敗,于是重啟 openstack-cinder-volume 服務
# systemctl status openstack-cinder-volume ● openstack-cinder-volume.service - OpenStack Cinder Volume Server Loaded: loaded (/usr/lib/systemd/system/openstack-cinder-volume.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2016-07-13 08:18:36 CST; 3 days ago Main PID: 1775 (code=exited, status=1/FAILURE) Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 413, in create_engine Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder _test_connection(engine, max_retries, retry_interval) Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 591, in _test_connection Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder six.reraise(type(de_ref), de_ref) Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder File "<string>", line 2, in reraise Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder DBConnectionError: (_mysql_exceptions.OperationalError) (2003, "Can't connect to MySQL server on '192.168.8.212' (111)") Jul 13 08:18:36 bdc212 cinder-volume[1775]: 2016-07-13 08:18:36.002 1775 TRACE cinder Jul 13 08:18:36 bdc212 systemd[1]: openstack-cinder-volume.service: main process exited, code=exited, status=1/FAILURE Jul 13 08:18:36 bdc212 systemd[1]: Unit openstack-cinder-volume.service entered failed state. Jul 13 08:18:36 bdc212 systemd[1]: openstack-cinder-volume.service failed. [root@bdc212 scripts]# systemctl restart openstack-cinder-volume [root@bdc212 scripts]# systemctl status openstack-cinder-volume ● openstack-cinder-volume.service - OpenStack Cinder Volume Server Loaded: loaded (/usr/lib/systemd/system/openstack-cinder-volume.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2016-07-16 15:13:25 CST; 1s ago Main PID: 552481 (cinder-volume) CGroup: /system.slice/openstack-cinder-volume.service ├─552481 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log └─552488 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log Jul 16 15:13:25 bdc212 systemd[1]: Started OpenStack Cinder Volume Server. Jul 16 15:13:25 bdc212 systemd[1]: Starting OpenStack Cinder Volume Server... Jul 16 15:13:25 bdc212 cinder-volume[552481]: /usr/lib/python2.7/site-packages/cinder/openstack/common/service.py:38: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead. Jul 16 15:13:25 bdc212 cinder-volume[552481]: from oslo.config import cfg Jul 16 15:13:25 bdc212 cinder-volume[552481]: No handlers could be found for logger "oslo_config.cfg" Jul 16 15:13:26 bdc212 cinder-volume[552481]: 2016-07-16 15:13:26.162 552481 INFO cinder.volume.manager [req-8fa3b983-e73d-4ec8-9186-6cb0a9ca7c95 - - - - -] Determined volume DB was not empty at startup. Jul 16 15:13:26 bdc212 cinder-volume[552481]: 2016-07-16 15:13:26.223 552481 INFO cinder.openstack.common.service [req-8fa3b983-e73d-4ec8-9186-6cb0a9ca7c95 - - - - -] Starting 1 workers Jul 16 15:13:26 bdc212 cinder-volume[552481]: 2016-07-16 15:13:26.228 552481 INFO cinder.openstack.common.service [req-8fa3b983-e73d-4ec8-9186-6cb0a9ca7c95 - - - - -] Started child 552488 Jul 16 15:13:26 bdc212 cinder-volume[552481]: 2016-07-16 15:13:26.229 552488 INFO cinder.service [-] Starting cinder-volume node (version 2015.1.2) Jul 16 15:13:26 bdc212 cinder-volume[552481]: 2016-07-16 15:13:26.232 552488 INFO cinder.volume.manager [req-ee43f1f7-7c1b-4cda-9583-b8f40b188a5f - - - - -] Starting volume driver RBDDriver (1.1.0)
再次創建云硬盤,發現可以成功創建!
上述內容就是大數據中創建云硬盤失敗的解決過程是怎樣的,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。