You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Force-stop VM succeed but VM is still running on host if cloudstack-agent is stopped #6798
Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). The caller knows the VM is stopped.
Guess the 'interesting' part is, that there is no further feedback what actually happend while calling the function. In the end that could lead to some nasty situations...
As a 'user' i would expect that, like @weizhouapache descriped it, the VM will be stopped on the host by any means and / or verified that it is stopped. If this isn't possible, cause the agent isn't up or not reachable, i would expect this to throw a 'error'.
I can see why such a function (override of a VM status in DB to be able to deploy it on another host if it is lost) might be usefull. But the overall nameing of the function makes me expect something different then the description in the API docs.
Indeed. My team has opened #6629 to prevent regular users from using this parameter.
@Rubueno your request makes sense, and maybe this option should be named forceMark, markDeleted or just mark. It is forcing the marking as deleted in the DB and doesn´t force anything on the backend.
I think this is by design, we also have a force remove host; we leave upto the admin what they're trying to do - perhaps warn the admin/user what force stop does (in case of KVM)?
according to #7866 made by @DaanHoogland , Force-stop VM means Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.
Activity
DaanHoogland commentedon Oct 3, 2022
@weizhouapache I did merge some kvm related commits. did you verify this on 4.17?
weizhouapache commentedon Oct 3, 2022
@DaanHoogland
I got the same result on a 4.17.1.0 env
DaanHoogland commentedon Oct 3, 2022
Ok, not a regression, but still a major bug. This may result in data corruption of the VM is started again.
Rubueno commentedon Oct 3, 2022
Just my 2 cents: does stopVirtualMachine with forced=true not always behave this way? The caller must know the VM is stopped before calling it: https://cloudstack.apache.org/api/apidocs-4.17/apis/stopVirtualMachine.html
Hudratronium commentedon Oct 3, 2022
Guess the 'interesting' part is, that there is no further feedback what actually happend while calling the function. In the end that could lead to some nasty situations...
As a 'user' i would expect that, like @weizhouapache descriped it, the VM will be stopped on the host by any means and / or verified that it is stopped. If this isn't possible, cause the agent isn't up or not reachable, i would expect this to throw a 'error'.
I can see why such a function (override of a VM status in DB to be able to deploy it on another host if it is lost) might be usefull. But the overall nameing of the function makes me expect something different then the description in the API docs.
Rubueno commentedon Oct 3, 2022
Indeed. My team has opened #6629 to prevent regular users from using this parameter.
SakshiT25 commentedon Oct 9, 2022
Hi, I'm interested in working on this issue. Kindly guide me for the further steps.
DaanHoogland commentedon Oct 11, 2022
@Rubueno your request makes sense, and maybe this option should be named
forceMark,markDeletedor justmark. It is forcing the marking as deleted in the DB and doesn´t force anything on the backend.DaanHoogland commentedon Oct 11, 2022
@SakshiT25 see #5686 (comment)
5 remaining items
DaanHoogland commentedon Jun 22, 2023
definition of force stop is being discussed here!
yadvr commentedon Aug 3, 2023
I think this is by design, we also have a force remove host; we leave upto the admin what they're trying to do - perhaps warn the admin/user what force stop does (in case of KVM)?
weizhouapache commentedon Aug 25, 2023
this is an expected behaviour
according to #7866 made by @DaanHoogland , Force-stop VM means
Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.