O04三、計算節點宕機了怎麼辦

 
Rebuild 能夠恢復損壞的instance 。那若是是宿主機壞了怎麼辦呢?好比硬件故障或者斷電形成整臺計算機節點沒法工做,該節點上運行的instance如何恢復呢?
 
用shelve或者Migrate可不能夠?很不幸,這兩個操做都要求instance 所在的計算節點的 nova-compute服務正常運行。幸運的是,還有 Evacuate
 
Evacuate 可在 nova-compute 沒法工做的狀況下將節點上的instance 遷移到其餘計算節點上,但有個前提:instance的鏡像文件必須放在共享存儲上
 
咱們能夠經過斷電模擬計算節點故障,而後執行Evacuate 操做恢復 instance。目前Evacuate只能經過CLI 執行。
 
stack@DevStack-Controller:~$ nova help evacuate
usage: nova evacuate [--password <password>] [--force] <server> [<host>]
 
Evacuate server from failed host.
 
Positional arguments:
  <server>               Name or ID of server.
  <host>                 Name or ID of the target host. If no host is
                         specified, the scheduler will choose one.
 
Optional arguments:
  --password <password>  Set the provided admin password on the evacuated
                         server. Not applicable if the server is on shared
                         storage.
  --force                Force to not verify the scheduler if a host is
                         provided. (Supported by API versions '2.29' -
                         '2.latest')
 
其實 Evacuate 是經過rebuild 操做實現的,由於Evacuate 是用共享存儲上的instance的鏡像文件從新建立虛機
 
一、先是 nova-scheduler 選擇新的計算節點
二、nova-compute 在計算節點上執行rebuild操做
相關文章
相關標籤/搜索