Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspend provider #17489

Closed
13 tasks done
slemrmartin opened this issue May 29, 2018 · 17 comments
Closed
13 tasks done

Suspend provider #17489

slemrmartin opened this issue May 29, 2018 · 17 comments
Labels

Comments

@slemrmartin
Copy link
Contributor

slemrmartin commented May 29, 2018

Goal: Make an ability to manually suspend all remote operations (outside VMDB) for one provider.

Using two features:

  1. Pausing provider by ExtManagementSystem.enabled
  2. Move provider (and child providers) to Maintenance zone and save old one

When provider is paused (suspended), refresh worker's (and other provider-related worker's) processes are terminated.
Quadicons in UI have moon icon and there is Pause/Resume links in Providers toolbars in list/detail view of provider under button "Configuration"

Links:

RFC ManageIQ/manageiq-design#41

PRs:

Features definition:

Pre-defined roles extension:

Older PRs:

BZs:

@slemrmartin
Copy link
Contributor Author

@miq-bot add_label question

@Fryguy
Copy link
Member

Fryguy commented Jun 12, 2018

@slemrmartin Do you have a design doc for how to solve this? I feel that would be very helpful in deciding the right way to implement this. Please create an RFC on https://github.com/ManageIQ/manageiq-design/issues

@slemrmartin
Copy link
Contributor Author

@Fryguy - created ManageIQ/manageiq-design#41

@skateman
Copy link
Member

How this maintenance zone should be represented in the API? In the UI we are not displaying it at all when requesting all zones. What zone should the API respond for a suspended provider? These questions bother me @abellotti @gtanzillo

@Fryguy
Copy link
Member

Fryguy commented Dec 21, 2018

@skateman This was my concern from the beginning, and part of the reason I find the visible column strange.

So, there is a visible column now on zone (note that I think there may be a bug and there needs to be a migration to set all unset zones to "true", but assume visible "works" for this discussion) that needs to be honored. Additionally, there is an enabled column on ext_management_systems that can help in that logic. IMO, there are places where we still need to show the maintenance zone, otherwise once a user pauses an EMS they may have a hard time finding it again.

  • EMS Show screen - IMO, we should show the display name of the zone like we always do, so it will show "Maintenance Zone". Additionally EMS#enabled can drive the the EMS icon to show something like the pause icon (I think this part is already in place)
  • EMS Edit screen - IMO, if the EMS is enabled, then the user cannot change the Zone and we should just show the zone's display name. If the EMS is not enabled, then we can present the dropdown of zones, honoring the visible column, and filter out the invisible zones.
  • Zone Show screen (do we even have a page that shows all zones?) - IMO we should show the maintenance zone here, so users can get to the details, and ultimately the list of paused EMSes.
  • Zones Settings page - IMO we should show the maintenance zone with all of the paused EMSes underneath it. This way a user can still get to the paused EMSes in order to change the settings of that EMS.

So, my overarching opinion here is that the visible column only be honored in the EMS Edit dropdown for unpaused EMSes. All other places, we just show it like a normal zone.

I'm sure @agrare @gtanzillo @slemrmartin @chessbyte have their own opinions. I also think we should get UX's opinion.

@Fryguy
Copy link
Member

Fryguy commented Dec 21, 2018

How this maintenance zone should be represented in the API?

I missed the "in the API" qualifier, but my opinion is everything comes out of the API. All zones including the invisible ones. All EMSes including paused ones. EMS.zone should return a link to whatever zone, visible or not. EMS.zone_before_pause_id should return a link to whatever zone.

@slemrmartin
Copy link
Contributor Author

I missed the "in the API" qualifier, but my opinion is everything comes out of the API. All zones including the invisible ones. All EMSes including paused ones. EMS.zone should return a link to whatever zone, visible or not. EMS.zone_before_pause_id should return a link to whatever zone.

I agree, API could show all zones, i.e. returning nil for invisible zone will be confusing there

@slemrmartin
Copy link
Contributor Author

@Fryguy but there is no invisible zone (or at least maintenance zone)'s validation that it cannot be deleted.
In combination of fact there is no create on missing check I suggested it can lead to error when user consider it's something he doesn't want and deletes it

@slemrmartin
Copy link
Contributor Author

.. Previous comment is not valid, maintenance zone cannot be deleted

@slemrmartin
Copy link
Contributor Author

UI ManageIQ/manageiq-ui-classic#4269 implemented basic features requested.
But there is more possible things to do:

  • Suspend Foreman/AnsibleTower providers
  • Remote actions (buttons) on VM/Instance and other inventories in EMS's subgraph should be disabled
    • in UI and backend (validations? ...API calls)

@Fryguy @agrare If wanted it can be done in separate PR, what do you think about it?

@skateman
Copy link
Member

@slemrmartin @agrare @Fryguy do we want to have suspend for these providers?

@agrare
Copy link
Member

agrare commented Jan 18, 2019

Suspend Foreman/AnsibleTower providers

@slemrmartin this is because these have Provider wrappers around the actual ExtManagementSystem I assume? Yes I think that would be a great addition.

Remote actions (buttons) on VM/Instance and other inventories

Yeah we could add a disabled provider check to the existing supports feature blocks.

@skateman
Copy link
Member

There are still missing some default roles mentioned here

@slemrmartin
Copy link
Contributor Author

cc @Loicavenel - according to link ^^, which pre-defined roles should have Pause and Resume provider feature enabled by default?

@Loicavenel
Copy link

@slemrmartin any Role that can create and delete a provider should be able to Pause/Resume.

@skateman
Copy link
Member

@slemrmartin last UI PR got in, anything else you need from me?

@slemrmartin
Copy link
Contributor Author

It seems to be finally all, @skateman. Thanks for cooperation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants