[PATCH conductor] BZ#773226 Error message while rebooting stopped instances

Imre Farkas ifarkas at redhat.com
Fri Feb 10 12:32:41 UTC 2012


On 02/09/2012 03:42 PM, tsedovic at redhat.com wrote:
> From: Tomas Sedovic<tomas at sedovic.cz>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=773226
>
> We do not allow to reboot an instance that's already stopped.
>
> When the user does this (via the Instances filter view in the Monitor section),
> we didn't display the correct error message.
> ---
>   src/app/controllers/instances_controller.rb |    4 ++--
>   src/config/locales/en.yml                   |    1 +
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb
> index 08ce4f5..7af1669 100644
> --- a/src/app/controllers/instances_controller.rb
> +++ b/src/app/controllers/instances_controller.rb
> @@ -179,8 +179,8 @@ class InstancesController<  ApplicationController
>     end
>
>     def multi_reboot
> -    notices = ""
> -    errors = ""
> +    notices = []
> +    errors = []
>       Instance.find(params[:instance_selected] || []).each do |instance|
>         begin
>           require_privilege(Privilege::USE,instance)
> diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> index 822962d..88218ee 100644
> --- a/src/config/locales/en.yml
> +++ b/src/config/locales/en.yml
> @@ -372,6 +372,7 @@ en:
>         provider_account_quota_too_low: "%{match_provider_account} quota limit too low to launch deployable"
>         stop_invalid: "stop is an invalid action."
>         stop_not_be_performed: "stop cannot be performed on this instance."
> +      reboot_not_be_performed: "cannot be rebooted because it's not currently running."
>         must_be_enabled: "%{account_name}: provider must be enabled"
>         provider_not_available: "%{account_name}: provider is not available"
>         cannot_destroy: "destroy cannot be performed on this instance."

ACK



More information about the aeolus-devel mailing list