[Engine-devel] default config value (vdc_options; general)

hi all, In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum) Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version. NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version. I will be glad to fix it. Thanks, Gilad.

----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:16:11 PM Subject: [Engine-devel] default config value (vdc_options; general)
hi all,
In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum)
Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version.
NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version.
I will be glad to fix it.
Thanks, Gilad.
I am about to rewrite this whole configuration subsystem. Defaults will not be stored in database nor in code. There will be default per version. Regards, Alon.

----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:19:53 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:16:11 PM Subject: [Engine-devel] default config value (vdc_options; general)
hi all,
In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum)
Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version.
NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version.
I will be glad to fix it.
Thanks, Gilad.
I am about to rewrite this whole configuration subsystem.
Defaults will not be stored in database nor in code. There will be default per version.
Regards, Alon.
Please explain 'default per version'; - Can you have more than one configuration for the same version? - What happens if I need a general configuration which isn't relevant for a specific version?

----- Original Message -----
From: "Doron Fediuck" <dfediuck@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org>, "Gilad Chaplik" <gchaplik@redhat.com> Sent: Monday, December 3, 2012 2:32:55 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:19:53 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:16:11 PM Subject: [Engine-devel] default config value (vdc_options; general)
hi all,
In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum)
Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version.
NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version.
I will be glad to fix it.
Thanks, Gilad.
I am about to rewrite this whole configuration subsystem.
Defaults will not be stored in database nor in code. There will be default per version.
Regards, Alon.
Please explain 'default per version';
- Can you have more than one configuration for the same version?
No, nothing will be changed, you will have one default per version with fallback to the generic version default.
- What happens if I need a general configuration which isn't relevant for a specific version?
You will get the default of the generic version. Alon.

----- Original Message -----
----- Original Message -----
From: "Doron Fediuck" <dfediuck@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org>, "Gilad Chaplik" <gchaplik@redhat.com> Sent: Monday, December 3, 2012 2:32:55 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:19:53 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:16:11 PM Subject: [Engine-devel] default config value (vdc_options; general)
hi all,
In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum)
Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version.
NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version.
I will be glad to fix it.
Thanks, Gilad.
I am about to rewrite this whole configuration subsystem.
Defaults will not be stored in database nor in code. There will be default per version.
Regards, Alon.
Please explain 'default per version';
- Can you have more than one configuration for the same version?
No, nothing will be changed, you will have one default per version with fallback to the generic version default.
- What happens if I need a general configuration which isn't relevant for a specific version?
You will get the default of the generic version.
I think it would be wise to check out http://commons.apache.org/configuration/ if re-evaluating the current configuration system.
Alon. _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

----- Original Message -----
From: "Mike Kolesnik" <mkolesni@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org>, "Doron Fediuck" <dfediuck@redhat.com> Sent: Monday, December 3, 2012 2:37:50 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
----- Original Message -----
From: "Doron Fediuck" <dfediuck@redhat.com> To: "Alon Bar-Lev" <alonbl@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org>, "Gilad Chaplik" <gchaplik@redhat.com> Sent: Monday, December 3, 2012 2:32:55 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:19:53 PM Subject: Re: [Engine-devel] default config value (vdc_options; general)
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "engine-devel" <engine-devel@ovirt.org> Sent: Monday, December 3, 2012 12:16:11 PM Subject: [Engine-devel] default config value (vdc_options; general)
hi all,
In engine config table (vdc_options), when an option has a general as its version, and we fetch by version, we aren't getting the general value, rather the default one (hard coded in the config value enum)
Is this the wanted behavior and why? According to it general is some-kind of a version number instead of a configurable fallback to a missing version.
NOTE: currently there isn't any configurable default; in case the hard coded default != your configurable default, you need to specify it for each version.
I will be glad to fix it.
Thanks, Gilad.
I am about to rewrite this whole configuration subsystem.
Defaults will not be stored in database nor in code. There will be default per version.
Regards, Alon.
Please explain 'default per version';
- Can you have more than one configuration for the same version?
No, nothing will be changed, you will have one default per version with fallback to the generic version default.
- What happens if I need a general configuration which isn't relevant for a specific version?
You will get the default of the generic version.
I think it would be wise to check out http://commons.apache.org/configuration/ if re-evaluating the current configuration system.
Right. Still did not start anything... Next on my queue :) Alon.
participants (4)
-
Alon Bar-Lev
-
Doron Fediuck
-
Gilad Chaplik
-
Mike Kolesnik