ceph: refactor mgr-restful-plugin state machine
Replace mgr-restful-plugin service monitoring based on state machine with explicit transitions with a function that goes through the following steps: - wait for Ceph cluster to become available - configure and start ceph-mgr - configure and enable restful plugin - send periodic requests to REST API Procedure to recover from errors: restart ceph-mgr, update certificates, run again through configuration steps, wait for Ceph cluster. mgr-restful-plugin components: 1. init script: parse command line parameters, start service monitoring if not already running, request status via control socket, stop service monitoring. 2. service monitoring: create process running ceph-mgr confguration steps, report status based on current rest api availability and init/recovery procedure, stop ceph-mgr and helper process 3. monitoring helper: successively run commands to configure and start ceph-mgr and restful plugin, send periodic requests to ceph REST API, update service monitoring with current failure status (no response from REST API or ceph-mgr restarts). When ceph-mgr fails too many times mgr-restful-plugin exists and relies on SM to restart it (ceph-mgr is also restarted). Change-Id: Id5342624948024ce2891e32ee6648c910a6e7391 Closes-Bug: 1828024 Signed-off-by: Daniel Badea <daniel.badea@windriver.com>
This commit is contained in: