[PATCH conductor] BZ 817114 - don't send empty configuration to configserver
Tzu-Mainn Chen
tzumainn at redhat.com
Wed May 30 15:46:37 UTC 2012
Pushed as well.
Mainn
----- Original Message -----
> From: "Tzu-Mainn Chen" <tzumainn at redhat.com>
> To: jprovazn at redhat.com
> Cc: aeolus-devel at lists.fedorahosted.org
> Sent: Tuesday, May 29, 2012 1:19:19 PM
> Subject: Re: [PATCH conductor] BZ 817114 - don't send empty configuration to configserver
>
> ACK'd
>
> Mainn
>
> ----- Original Message -----
> > From: jprovazn at redhat.com
> > To: aeolus-devel at lists.fedorahosted.org
> > Cc: "Jan Provaznik" <jprovazn at redhat.com>
> > Sent: Tuesday, May 29, 2012 9:00:13 AM
> > Subject: [PATCH conductor] BZ 817114 - don't send empty
> > configuration to configserver
> >
> > From: Jan Provaznik <jprovazn at redhat.com>
> >
> > If an assambly doesn't define any configserver params, config for
> > this
> > assembly is not sent to configserver.
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=817114
> > ---
> > src/app/util/config_server_util.rb | 4 ++++
> > src/app/util/taskomatic.rb | 4 +++-
> > 2 files changed, 7 insertions(+), 1 deletions(-)
> >
> > diff --git a/src/app/util/config_server_util.rb
> > b/src/app/util/config_server_util.rb
> > index 749f1cf..517b0dd 100644
> > --- a/src/app/util/config_server_util.rb
> > +++ b/src/app/util/config_server_util.rb
> > @@ -180,6 +180,10 @@ module ConfigServerUtil
> > @config_xml ||= to_xml
> > end
> >
> > + def empty?
> > + provided_parameters.empty? && services.empty?
> > + end
> > +
> > protected
> > def _xml
> > xml "<instance-config id='#{@uuid}' name='#{@assembly.name}'
> > secret='#{@instance.secret}'>\n"
> > diff --git a/src/app/util/taskomatic.rb
> > b/src/app/util/taskomatic.rb
> > index a7181dc..8ccdbd4 100644
> > --- a/src/app/util/taskomatic.rb
> > +++ b/src/app/util/taskomatic.rb
> > @@ -21,7 +21,9 @@ module Taskomatic
> > task.state = Task::STATE_PENDING
> > task.save!
> >
> > - task.instance.add_instance_config!(config_server, config) if
> > config_server
> > + if config_server and config.present?
> > + task.instance.add_instance_config!(config_server, config)
> > + end
> > task.instance.provider_account = match.provider_account
> > task.instance.create_auth_key unless
> > task.instance.instance_key
> >
> > --
> > 1.7.7.6
> >
> >
>
More information about the aeolus-devel
mailing list