[PATCH] BZ 796695 enforce provider quota for multi instance deployments
Tzu-Mainn Chen
tzumainn at redhat.com
Wed Feb 29 16:16:44 UTC 2012
Yeah, I just realized that, updated patch coming soon; it uses common_provider_accounts_for, so it should be more consistent in behavior.
Mainn
----- Original Message -----
From: "Scott Seago" <sseago at redhat.com>
To: aeolus-devel at lists.fedorahosted.org
Sent: Wednesday, February 29, 2012 11:10:09 AM
Subject: Re: [PATCH] BZ 796695 enforce provider quota for multi instance deployments
On 02/29/2012 11:00 AM, Tzu-Mainn Chen wrote:
> ---
> src/app/models/deployment.rb | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
> index ec66fdb..aa4e870 100644
> --- a/src/app/models/deployment.rb
> +++ b/src/app/models/deployment.rb
> @@ -376,6 +376,10 @@ class Deployment< ActiveRecord::Base
> deployment_errors = []
> deployment_errors<< I18n.t('instances.errors.pool_quota_reached') if not pool.quota.can_start?(instances)
> deployment_errors<< I18n.t('instances.errors.pool_family_quota_reached') if not pool.pool_family.quota.can_start?(instances)
> + pool.pool_family.provider_accounts.each do |account|
> + deployment_errors<< I18n.t('instances.errors.provider_account_quota_reached', :account_name => account.name) if not account.quota.can_start?(instances)
> + end
> +
> if not deployment_errors.empty?
> raise Aeolus::Conductor::MultiError::UnlaunchableAssembly.new(I18n.t('deployments.flash.error.not_launched'), deployment_errors)
> end
Hmm, this doesn't seem right.
This will throw an error if _any_ provider account has reached quota.
Really hitting quota on one account just means we should use another.
Provider account quota violations should result in filtering the
provider account out of the mix when matching (we're already doing this
-- you may just need to alter it to work w/ multi-instance deployments)
NACK
Scott
More information about the aeolus-devel
mailing list