FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix the state cannot be restored from destroying to stopped when destroy VM failed. by txdyzdy · Pull Request #1224 · zstackio/zstack · GitHub

fix the state cannot be restored from destroying to stopped when destroy VM failed. - #1224

Open
txdyzdy wants to merge 1 commit into
zstackio:masterfrom
txdyzdy:yezi-1
Open

fix the state cannot be restored from destroying to stopped when destroy VM failed.#1224
txdyzdy wants to merge 1 commit into
zstackio:masterfrom
txdyzdy:yezi-1

Conversation

txdyzdy commented Dec 17, 2017

Copy link
Copy Markdown

fix the state cannot be restored from destroying to stopped when destroy VM failed.

MaJin1996 commented Dec 18, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

destroy vm should always succeed, so it maybe other problem, can you provide the problem details what you meet?

txdyzdy commented Dec 18, 2017
edited
Loading

Copy link
Copy Markdown
Author

The stopped event should be added in Destroying's state because it is possible that the status of the VM changed from destroying to stopped in the error function of the FlowChain.

txdyzdy commented Dec 26, 2017

Copy link
Copy Markdown
Author

MaJin1996 commented Dec 28, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Sorry to reply late. In this condition,ZStack will checkState on host, then vm state will out of Destroying unless management restart( you can destroy it again to escape destroying state after management node started).

otherwise I mean APIDestroyVm should always succeed, destroyVmOnHypervisor is possible to fail

Copy link
Copy Markdown
Contributor

So it's not root cause,you can fix that syncVm cannot sync vm state from Destroying to Destroyed. The problem is in KvmVmSyncPingTask.java, thx a lot.

txdyzdy commented Jan 3, 2018
edited
Loading

Copy link
Copy Markdown
Author

Thank you very much, I'm using an old version, after switching to the new version I found this in the method checkState in VmInstanceBase.java.

else if (VmInstanceState.Stopped.toString().equals(state) && self.getState().equals(VmInstanceState.Destroying)) {
    changeVmStateInDb(VmInstanceStateEvent.destroyed);
} ```
  

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL