-
Notifications
You must be signed in to change notification settings - Fork 125
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
Maintenance zone support for suspending provider #275
Maintenance zone support for suspending provider #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I prefer this approach. I would probably put Zone.update_all(:visible => true)
in the same migration that adds the column.
@bdunne I believe this is the last day we can merge it? So can you? (btw. I believe it was already commented that we should not mix data and schema migrations together) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@slemrmartin what does the corresponding core PR look like if the maintenance zone name isn't constant? |
We should probably implement a |
@@ -0,0 +1,5 @@ | |||
class AddBackupZoneIdToExtManagementSystem < ActiveRecord::Migration[5.0] | |||
def change | |||
add_reference :ext_management_systems, :backup_zone, :type => :bigint, :index => true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was here from the original PR, but I'm not a fan of the name of this column.
backup
makes it sound like it will get used if there is a problem rather than as a part of normal operation (i.e. resume).
I haven't been able to come up with anything I'm really happy with, but here are some of my thoughts:
runtime_zone
zone_before_pause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original_zone
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also considered original_zone
or last_zone
, but really this is something specific to pausing an ems so I would rather make that obvious from the attribute name.
Spoke about it for a bit with @jrafanie, our "Master Namer of Things" and we came up with zone_when_paused
. How about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is hard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to bikeshed too much about the name, but zone_when_paused
would be the maintenance zone, I'd think zone_before_pause
would be better than zone_when_paused
Generally, I'm with @bdunne. This looks like a much better approach than a rename. I'll 👍 if we can come up with a better name for the |
@agrare there can be used |
It's is implemented in dependent PR, only has to be changed according to this PR |
Checked commits slemrmartin/manageiq-schema@a73880e~...eab842d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 db/migrate/20180618084054_init_zones_visibility.rb
|
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1455145
Issue: ManageIQ/manageiq#17489
Suspending provider consists of moving provider (
ExtManagementSystem
) to maintenance zone.Maintenance zone will be created in
Zone.seed
and identified by association to region.Name of zone will be generated as
maintenance_#{uuid}
. This zone will havevisible
flag set to false, which will be handled by PRs in UI and API.This is an alternative to #222, where zone is supposed to be identified by unique name.