You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Darren Shepherd <da...@gmail.com> on 2013/08/22 18:40:20 UTC

why is configuration.default_value = value

Completely random, but I was just reading through SQL and stumbled upon 
schema-420to430.sql and noticed

UPDATE `cloud`.`configuration` SET `default_value` = `value`;

Seems bad to just set the default value as what was currently set at 
that time.  If we want defaults, should probably go through the arduous 
process of setting the proper default values one by one.  Or, maybe 
simpler, run a fresh install and dump the values and put them in the SQL 
script as updates.

Darren

Re: why is configuration.default_value = value

Posted by Darren Shepherd <da...@gmail.com>.
Alex,

I'm quite interested in a common dynamic settings/configuration framework
and looked a little bit at what you've done with ConfigDepot.  I think I do
want to take it little further though.  I'll have to write up what I'm
thinking, but that won't probably come until next week.  But I will
forewarn that I've see problems in practice with storing defaults values in
the DB or also in code.  I'll have to look at what you've done to see if
you mitigated those or if they don't apply, but just a heads up that I'll
probably have some comments coming soon.  But otherwise I'm glad to see
your making progress on dynamic configuration.

Darren


On Thu, Aug 22, 2013 at 10:24 AM, Alex Huang <Al...@citrix.com> wrote:

> There's code that changes the default value if the default value in the db
> differs from the default value of the current cloudstack codebase.  Can't
> change value itself because that's set by the sysadmin.  So as an upgrade
> step, we set it to value.  And then if it varies from the current shipping
> default value, it gets reset.  There's also an update field that shows the
> time when cloudstack updated anything in the table.
>
> The rule though is cloudstack should never automatically update the value
> table other than the initial setup.  I'll write something up for this.
>
> --Alex
>
> > -----Original Message-----
> > From: Darren Shepherd [mailto:darren.s.shepherd@gmail.com]
> > Sent: Thursday, August 22, 2013 9:40 AM
> > To: dev@cloudstack.apache.org
> > Subject: why is configuration.default_value = value
> >
> > Completely random, but I was just reading through SQL and stumbled upon
> > schema-420to430.sql and noticed
> >
> > UPDATE `cloud`.`configuration` SET `default_value` = `value`;
> >
> > Seems bad to just set the default value as what was currently set at
> that time.
> > If we want defaults, should probably go through the arduous process of
> > setting the proper default values one by one.  Or, maybe simpler, run a
> fresh
> > install and dump the values and put them in the SQL script as updates.
> >
> > Darren
>

RE: why is configuration.default_value = value

Posted by Alex Huang <Al...@citrix.com>.
There's code that changes the default value if the default value in the db differs from the default value of the current cloudstack codebase.  Can't change value itself because that's set by the sysadmin.  So as an upgrade step, we set it to value.  And then if it varies from the current shipping default value, it gets reset.  There's also an update field that shows the time when cloudstack updated anything in the table.

The rule though is cloudstack should never automatically update the value table other than the initial setup.  I'll write something up for this.

--Alex

> -----Original Message-----
> From: Darren Shepherd [mailto:darren.s.shepherd@gmail.com]
> Sent: Thursday, August 22, 2013 9:40 AM
> To: dev@cloudstack.apache.org
> Subject: why is configuration.default_value = value
> 
> Completely random, but I was just reading through SQL and stumbled upon
> schema-420to430.sql and noticed
> 
> UPDATE `cloud`.`configuration` SET `default_value` = `value`;
> 
> Seems bad to just set the default value as what was currently set at that time.
> If we want defaults, should probably go through the arduous process of
> setting the proper default values one by one.  Or, maybe simpler, run a fresh
> install and dump the values and put them in the SQL script as updates.
> 
> Darren