RFC: Move the host status page from foreman_wreckingball to core

The idea is to move the host status page (screenshot below) from foreman_wreckingball plugin to core. It would also be nice to rewrite this page to React.

Could you elaborate on the scope? Currently the plugin depends on foreman-tasks. If you want to move the entire plugin into core, that’s a problem because core can’t depend on plugins. It creates a cyclic dependency. One possible solution is a soft dependency where you don’t perform any actual work unless tasks is installed, but I’m not sure that’s a good experience for users.

I’d guess we are talking more about having a page with host status, that would be plugable and plugins could add their status info? :thinking:

If we are, I think that we are talking about some kind of dashboard, that we already have (just the dashboard is not very well maintained, so it’s not great). But it could be the place to put this? Improve the dashboard so that you can add widget with Host status?

Anyway having host status framework improved and shown somewhere would be quite nice addition IMHO! :slight_smile:

The other side is the tasks running, although I believe we can do that with pure dynflow, you just don’t see the tasks until you install foreman-tasks, given the tasks are just helpers to keep the status up-to date I belive it’s doable.

The scope would just be a generic “Host Status Overview” page where plugins (i.e. wreckingball) can hook into. Wreckingball internally uses the host status API to add it’s functionality. The scope of this RFC would be to add this page to core. All the vmware specific statuses and background tasks to gather the data would stay in the plugin.

What about the default view? If there is no plugin that adds statuses, is the page empty or are there statuses that we can show from core?

I don‘t see why we would not want to show the statuses from core. If there are no hosts present at all, we can show the host welcome modal.

I like the suggestion. I think @ezr-ondrej got it right, this is about moving a host overview to the core, not the whole wreckingball plugin. Any plugin (including wreckingball) could add status to it.

We’d need to introduce some core checks as part of it, so the page is not blank without the wreckingball plugin, as @ekohl points out. I think the first thing to display there would be RFC: Templates rendering status. I can image build status (provisioning success/failed) being a second check. And I guess config management status would be third, however that if it’s not moved to a puppet enc plugin.

I also agree with @ezr-ondrej this evokes dashboard like functionality. However I think the dashboard widget should only display a brief overview. E.g. telling me there’s 3/10 checks that has failed at least on some host. After clicking on it, I should be redirected to this new page, where I can find more details. E.g. I can expand the card to see more details about what the status means, how which hosts are affected. In future potentially even remediate that (triggering puppet, retry the provisioning, open the editor for the failing template, …).

I think we could make it fully configurable, so you can select which statuses should be displayed on the host status page. By default we could display all core statuses.

Just for visibility, there is a PR, that could be enabler for this if done properly: