這篇文章主要介紹了kilo版openstack如何調(diào)整云主機(jī)大小,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
未央網(wǎng)站制作公司哪家好,找成都創(chuàng)新互聯(lián)公司!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、APP開(kāi)發(fā)、響應(yīng)式網(wǎng)站設(shè)計(jì)等網(wǎng)站項(xiàng)目制作,到程序開(kāi)發(fā),運(yùn)營(yíng)維護(hù)。成都創(chuàng)新互聯(lián)公司于2013年成立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選成都創(chuàng)新互聯(lián)公司。
kilo版本,dashboard頁(yè)面在線調(diào)整云主機(jī)大小,點(diǎn)擊后無(wú)變化,需要修改配置。
所有節(jié)點(diǎn)修改nova配置文件/etc/nova/nova.conf
# vi /etc/nova/nova.conf [DEFAULT] ... scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter allow_resize_to_same_host=true
控制節(jié)點(diǎn)
# systemctl restart openstack-nova-api openstack-nova-cert openstack-nova-compute openstack-nova-scheduler openstack-nova-conductor
計(jì)算節(jié)點(diǎn)
# systemctl restart openstack-nova-compute
按照官方文檔安裝的kilo版本openstack的nova用戶并不是自己手動(dòng)創(chuàng)建的,需要修改nova用戶的配置才可以配置互信
配置互信是為了避免出現(xiàn)調(diào)整云主機(jī)大小時(shí)出現(xiàn)以下類似報(bào)錯(cuò)
2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last): 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher executor_callback)) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher executor_callback) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6890, in resize_instance 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher clean_shutdown=clean_shutdown) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher payload) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__ 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher return f(self, context, *args, **kw) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 333, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher LOG.warning(msg, e, instance_uuid=instance_uuid) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__ 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 304, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 383, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 292, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher migration.instance_uuid, exc_info=True) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__ 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 269, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 361, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher kwargs['instance'], e, sys.exc_info()) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__ 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 349, in decorated_function 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4078, in resize_instance 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher self.instance_events.clear_events_for_instance(instance) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__ 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher self.gen.throw(type, value, traceback) 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6479, in _error_out_instance_on_exception 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher raise error.inner_exception 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher ResizeError: Resize error: not able to execute ssh command: Unexpected error while running command. 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher Command: ssh 192.168.8.218 mkdir -p /var/lib/nova/instances/2907c778-3e30-4012-ab2c-ab43dcca1ea0 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher Exit code: 255 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher Stdout: u'' 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher Stderr: u'Host key verification failed.\r\n' 2016-07-29 14:03:13.933 33877 TRACE oslo_messaging.rpc.dispatcher
# passwd nova Changing password for user nova. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
# vi /etc/passwd 將 nova:x:162:162:OpenStack Nova Daemons:/var/lib/nova:/sbin/nologin 修改為 nova:x:162:162:OpenStack Nova Daemons:/var/lib/nova:/bin/bash
此時(shí)可以切換至nova用戶,bdc217上操作
nova之間不僅僅是要無(wú)密碼,還必須得是不需要驗(yàn)證,節(jié)點(diǎn)少的情況下所以最好手動(dòng)節(jié)點(diǎn)之間互相先ssh連接一下。
-bash-4.2$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/var/lib/nova/.ssh/id_rsa): Created directory '/var/lib/nova/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /var/lib/nova/.ssh/id_rsa. Your public key has been saved in /var/lib/nova/.ssh/id_rsa.pub. The key fingerprint is: 35:b2:62:61:cb:1e:fb:a9:03:19:5b:a8:38:e7:70:54 nova@bdc212 The key's randomart image is: +--[ RSA 2048]----+ | | | E | | . .o .. o | | . oo.o + . | | o . =* S | |+ + +o + | | * .o | | . .. . | | .oo | +-----------------+ -bash-4.2$ ssh-copy-id localhost -bash-4.2$ scp -r .ssh/ bdc218:~/ -bash-4.2$ scp -r .ssh/ bdc216:~/ -bash-4.2$ ssh bdc218 Last login: Fri Jul 29 16:13:20 2016 from 192.168.13.217 -bash-4.2$ uname -n bdc218
成功無(wú)密碼連接到bdc218的nova用戶
OpenStack的云主機(jī)配置類型的修改,其實(shí)相當(dāng)于做了一個(gè)云主機(jī)在不同宿主機(jī)的遷移,所以需要在相關(guān)遷移云主機(jī)進(jìn)行無(wú)密碼訪問(wèn),由于OpenStack是由Nova組件來(lái)管理云主機(jī),所以需要對(duì)Nova用戶進(jìn)行無(wú)密碼訪問(wèn)。
但是,云主機(jī)之間的遷移可以通過(guò)virsh 的qemu+tcp的方式進(jìn)行遷移,不用配置nova的互信也可以進(jìn)行。
kilo版openstack云主機(jī)動(dòng)態(tài)熱遷移
1、 在遷移或者調(diào)整云主機(jī)大小的過(guò)程中,虛擬機(jī)會(huì)有 downtime,運(yùn)行的服務(wù)也會(huì)down掉,所以最好事先關(guān)閉正在運(yùn)行的服務(wù)。
2、nova之間不僅僅是要無(wú)密碼,還必須得是不需要驗(yàn)證,節(jié)點(diǎn)少的情況下所以最好手動(dòng)節(jié)點(diǎn)之間互相先ssh連接一下。
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“kilo版openstack如何調(diào)整云主機(jī)大小”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來(lái)學(xué)習(xí)!
本文標(biāo)題:kilo版openstack如何調(diào)整云主機(jī)大小
文章出自:http://jinyejixie.com/article28/jdoejp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營(yíng)銷、Google、用戶體驗(yàn)、企業(yè)建站、網(wǎng)站導(dǎo)航、網(wǎng)站排名
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)