Problem of edit a guest while the guest has a snapshot

Hi Zongmei Gou, You're right, that's exactly the problem which causes this issue. I already have an in-progress patch which handles that correctly (i.e. editing a guest which contains snapshots), but another problem comes up now. Due to Kimchi's infrastructure, when the following command is executed: POST /vms/myvm/snapshots/mysnap/revert Kimchi looks up the VM "myvm", then it looks up the snapshot "mysnap" from that VM, then revert to it, then it looks up "myvm" and "mysnap" again to return data; you may notice that when you execute that command, you get the snapshot data as return. However, let's suppose the VM "myvm" has been renamed later to "foo" (which now works with my patch), and then someone tries to revert to "mysnap": POST /vms/foo/snapshots/mysnap/revert Kimchi will look up the VM "foo", then "mysnap", then it will revert to that snapshot. After reverting to that snapshot, the VM will be exactly the same as it was when the snapshot was created, including having its old name. So after reverting to that snapshot, Kimchi fails to return data because it will try to look up "foo" and then "mysnap", but "foo" won't exist anymore. And that's the current status of my patch for that issue. I'm working on other issue recently so I haven't had time to continue on this one. But I will get back to it as soon as I can. If you have an idea on how to fix this, let us know! Best regards, Crístian.
participants (2)
-
Crístian Viana
-
苟宗梅