mgr/dashboard: Fix 500 error while exiting out of maintenance
When you add a host in maintenance mode and then exit the maintenance
mode, a 500 server error will popup which will interrupt the whole
exit maintenance process and leave the host in an unknown/offline state.
It happened when I was setting the status of the host through the
HostSpec(). With this change, I am using the enter_maintenance api of
the orch to enable the maintenance.
Fixes: https://tracker.ceph.com/issues/51218
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit
ea89b60e3f5e73a653eebf5cdcc3227acb7b2e62)
Conflicts:
src/pybind/mgr/dashboard/controllers/host.py
- Removed the addr and label variables since its not backported yet to
pacific
- Removed Versioning since for pacific this endpoint is not yet
versioned to 0.1
src/pybind/mgr/dashboard/services/orchestrator.py
- Removed the addr and label variables since its not backported yet to
pacific
src/pybind/mgr/dashboard/frontend/src/app/shared/api/host.service.ts
- Didn't included this file because the changes in there are irrelevant
in pacific
src/pybind/mgr/dashboard/openapi.yaml
- Regenerated the openapi file