[Kimchi-devel] [PATCH] Change default environment configuration to production mode.

Leonardo Augusto Guimarães Garcia lagarcia at linux.vnet.ibm.com
Fri Aug 8 15:07:51 UTC 2014


On 08/07/2014 05:09 PM, Aline Manera wrote:
>
> On 08/07/2014 04:18 PM, Paulo Vital wrote:
>> Changed the default environment configuration present in the final files
>> src/kimchi.conf and src/kimchi.config.py from 'development' to
>> 'production' mode.
>>
>> This modification will prevent that debugging traces be printed in the
>> front-end when something goes wrong.
>
> The default kimchi configuration is "development"
> If you want to change to production, do it in your kimchi config file.
In my opinion, this is a bad decision. Only bad web applications show
stack traces on their front end. The stack traces need to be logged
appropriately, but the user should not see then.

In my opinion, changing the config file to be "production" as default is
the right choice. It is much easier for a developer to enable/disable
this when they want. Applications need to set defaults that are friendly
to the final users, not to the developers. If this is not acceptable, we
need to at least make sure that the RPMs are generated with the correct
configuration from a user point of view (which is production). It
doesn't make any sense to build an RPM targetting development environments.

Best regards,

Leonardo Garcia
>
>>
>> Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
>> ---
>>   src/kimchi.conf.in      | 2 +-
>>   src/kimchi/config.py.in | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/kimchi.conf.in b/src/kimchi.conf.in
>> index 369f2c3..ed0270d 100644
>> --- a/src/kimchi.conf.in
>> +++ b/src/kimchi.conf.in
>> @@ -24,7 +24,7 @@
>>   #ssl_key =
>>
>>   # Running environment of the server
>> -#environment = development
>> +#environment = production
>>
>>   [logging]
>>   # Log directory
>> diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
>> index 68c8a4d..fca32ee 100644
>> --- a/src/kimchi/config.py.in
>> +++ b/src/kimchi/config.py.in
>> @@ -253,7 +253,7 @@ def _get_config():
>>       config.set("server", "cherrypy_port", "8010")
>>       config.set("server", "ssl_cert", "")
>>       config.set("server", "ssl_key", "")
>> -    config.set("server", "environment", "development")
>> +    config.set("server", "environment", "production")
>>       config.add_section("logging")
>>       config.set("logging", "log_dir", paths.log_dir)
>>       config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list