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
bz 1402867: Prevent scale down in scaling UI #2889
Conversation
@@ -68,6 +68,10 @@ def scaling | |||
return_message = _("Scaling") | |||
@count_parameters.each do |p| | |||
if !scale_parameters[p.name].nil? && scale_parameters[p.name] != p.value | |||
if scale_parameters[p.name].to_s < p.value.to_s | |||
log_and_flash_message(_("Scaling down is not supported. New value for %{name} %{new_value} is lower than current value %{current_value}.") % {:name => p.name, :new_value => scale_parameters[p.name], :current_value => p.value}) |
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.
log_and_flash_message()
was removed recently from our code. Now, you should just use add_flash(...)
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.
@mzazrivec OK I updated this to reflect the change.
https://bugzilla.redhat.com/show_bug.cgi?id=1402867 In the scaling UI, added checks to allow scaling up but not down. Scale down is handled explicitly via a separate UI action with validation around maintenance mode on the node and lack of active VMs.
d4dd666
to
0d5216a
Compare
Checked commit sseago@0d5216a with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 app/controllers/ems_infra_controller.rb
|
bz 1402867: Prevent scale down in scaling UI (cherry picked from commit 7b16236) https://bugzilla.redhat.com/show_bug.cgi?id=1523855
Fine backport details:
|
bz 1402867: Prevent scale down in scaling UI (cherry picked from commit 7b16236) https://bugzilla.redhat.com/show_bug.cgi?id=1524653
Gaprindashvili backport details:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1402867
In the scaling UI, added checks to allow scaling up but not down.
Scale down is handled explicitly via a separate UI action with
validation around maintenance mode on the node and lack of active
VMs.