大數(shù)據(jù)中創(chuàng)建云硬盤失敗的解決過程是怎樣的

本篇文章為大家展示了大數(shù)據(jù)中創(chuàng)建云硬盤失敗的解決過程是怎樣的,內(nèi)容簡明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。

10年積累的成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有大余免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。

一、背景

登錄dashboard,點(diǎn)擊創(chuàng)建云硬盤失敗,而且是點(diǎn)擊完就直接報(bào)error錯(cuò)誤。

二、解決經(jīng)過

思路一:新上傳的image鏡像,是不是image的版本有問題

檢查完發(fā)現(xiàn)新的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

懷疑版本問題導(dǎo)致無法創(chuàng)建,嘗試版本轉(zhuǎn)換

# qemu-img amend -f qcow2 -o compat=0.10 test.qcow2

結(jié)果轉(zhuǎn)換也失??!

同時(shí)想到嘗試直接從鏡像 啟動(dòng)云主機(jī),發(fā)現(xiàn)云主機(jī)啟動(dòng)正常,于是否認(rèn)思路一。

思路二:從鏡像創(chuàng)建云硬盤失敗,檢查cinder的日志

一開始從日志中查找云硬盤的id,未發(fā)現(xiàn)有用信息。最后在scheduler.log 日志中發(fā)現(xiàn)了端倪。
 

# 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主機(jī)上的volume服務(wù)

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 ==

發(fā)現(xiàn) openstack-cinder-volume服務(wù)狀態(tài)為失敗,于是重啟 openstack-cinder-volume服務(wù)

# 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)

再次創(chuàng)建云硬盤,發(fā)現(xiàn)可以成功創(chuàng)建!

大數(shù)據(jù)中創(chuàng)建云硬盤失敗的解決過程是怎樣的

上述內(nèi)容就是大數(shù)據(jù)中創(chuàng)建云硬盤失敗的解決過程是怎樣的,你們學(xué)到知識(shí)或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識(shí)儲(chǔ)備,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

當(dāng)前文章:大數(shù)據(jù)中創(chuàng)建云硬盤失敗的解決過程是怎樣的
網(wǎng)頁鏈接:http://bm7419.com/article42/jjeoec.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗(yàn)、網(wǎng)站排名、、微信小程序、網(wǎng)站收錄、App開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)