mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
Merge pull request #16112 from wanyaoqi/fix/load-deamon-server
fix(host): start daemon guest on guest not running
This commit is contained in:
@@ -607,7 +607,7 @@ func (s *SKVMGuestInstance) ImportServer(pendingDelete bool) {
|
||||
s.manager.SaveServer(s.Id, s)
|
||||
s.manager.RemoveCandidateServer(s)
|
||||
|
||||
if (s.IsDirtyShotdown() || s.IsDaemon()) && !pendingDelete {
|
||||
if s.IsDirtyShotdown() && !pendingDelete {
|
||||
log.Infof("Server dirty shutdown or a daemon %s", s.GetName())
|
||||
|
||||
if s.Desc.IsMaster || s.Desc.IsSlave ||
|
||||
@@ -623,6 +623,8 @@ func (s *SKVMGuestInstance) ImportServer(pendingDelete bool) {
|
||||
if !pendingDelete {
|
||||
s.StartMonitor(context.Background(), nil)
|
||||
}
|
||||
} else if s.IsDaemon() {
|
||||
s.StartGuest(context.Background(), nil, jsonutils.NewDict())
|
||||
} else {
|
||||
var action = "stopped"
|
||||
if s.IsSuspend() {
|
||||
|
||||
Reference in New Issue
Block a user