On Wed, 2024-01-03 at 15:48 +0330, Parsa Aminian wrote:
thanks but I have this error on Api Response : Policy doesn't allow os_compute_api:os-admin-actions:reset_state to be performed. reset-state is a adimin only server action because its generally unsafe. horizon hostorically has not exposed all the admin apis via its ui. if you go to the admin endpoint and navagate to the instance you may be able to use reset-state in horizon i have never tried that but reset-state should not be exposed in the normal horizon ui.
i would recomend uing hard-reboot instead of non adimins. hard-reboot is the recommend way to recover form error state as a first attempt.
On Thu, Dec 28, 2023 at 3:41 AM Satish Patel <satish.txt@gmail.com> wrote:
Hope Horizon also has this feature. Sometimes we have to do things for customers which is annoying sometime :(
On Tue, Dec 26, 2023 at 1:47 PM KEREM CELIKER <kmceliker@gmail.com> wrote:
Hey Parsa,
There are two-ways to reset the state of instance by Openstack API;
- Using the Nova reset-state;
$ nova reset-state --active c6bbbf26-b40a-47e7-8d5c-eb17bf65c485
- Using the os-resetstate;
POST /v2/{tenant_id}/servers/{server_id}/action { "os-resetState": { "state": "active" } }
these are both the same way. the nova client just dose a post to api the nova cli does not have database access and is just calling the rest api.
Best, Kerem Çeliker