簡體   English   中英

在 Devstack 中重啟 Nova 服務

[英]Restart of Nova services in Devstack

在 nova.conf 文件中進行了一些修改后,我嘗試重新啟動 Nova 服務。

在嘗試重新啟動時,我收到無法識別服務的錯誤。

我知道在 devstack 中重啟 nova 服務的方式是不同的。

有人為我提供了明確的方法來做同樣的事情。

另一種方法: screen -x列出可用的屏幕會話。 ctrl+a , "獲取可用窗口列表。轉到 n-cpu 並使用 ctrl+c 停止它,然后按arrow up以獲取終端中的最后一個命令,然后按 Enter 運行它。取決於您的 conf 更改,您將需要重啟其他服務(以'n-'開頭,例如n-api、n-cond等)。

我不確定是否可以在 StackOverflow 上推薦 URC 頻道,但在 IRC(在 freenode 服務器上)也有 #openstack-nova 頻道。 如果您遇到與 nova 相關的問題,在那里詢問可能會很有用(並且可以更快地獲得答案)。

我找到了相同的方法:

   * First cd to folder devstack

   * You can find the file ./rejoin_stack.sh

   * Execute the same.

   * It will be executed and screen will be opened for access.

   * press ctrl + a + shift + '

   * Then it will be listing the running services

   * can move to service which needs to be stopped by scrolling towards it.

   * on the service which is needs to be stopped press enter

   * then press ctrl + c , it will stop the service

   * then press up arrow key to run the service again

   * service will be restarted successfully.

不完全是重新啟動 Nova 的方法,但也有幫助。 不過,這是一個黑客。

./rejoin_stack.sh 已從./rejoin_stack.sh 中刪除,甚至screen似乎對我不起作用; 它不顯示菜單,也不接受 CTRL 序列(我責怪我在 Docker 中運行 DevStack,但這並不重要)。

所以這就是黑客派上用場的地方。 所有./unstack.sh服務都通過運行./unstack.sh./stack.sh重新啟動,但在此期間, nova.conf修改被刪除。 hack 是修改/devstack/lib/nova作為nova.conf的模板,以便在重新運行./stack.shnova.conf包含預期的值。

較新版本的 DevStack 將其服務作為systemd單元文件運行,因此您可以使用systemctl來管理它們。

列出所有服務:

sudo systemctl list-units devstack@*

重新啟動任何單個服務(將n-cpu.service替換為服務名稱):

sudo systemctl restart devstack@n-cpu.service

重啟所有服務。

sudo systemctl restart devstack@*

有關更多詳細信息,請參閱OpenStack 文檔

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM