mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #14096 from ioito/hotfix/qx-vm-sync-name
fix(region): sync vm name
This commit is contained in:
@@ -2639,7 +2639,7 @@ func (self *SGuest) syncWithCloudVM(ctx context.Context, userCred mcclient.Token
|
||||
diff, err := db.UpdateWithLock(ctx, self, func() error {
|
||||
if options.NameSyncResources.Contains(self.Keyword()) && !recycle {
|
||||
newName, _ := db.GenerateAlterName(self, extVM.GetName())
|
||||
if len(newName) > 0 && newName != self.Name && extVM.GetName() != extVM.GetHostname() {
|
||||
if len(newName) > 0 && newName != self.Name {
|
||||
self.Name = newName
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user