Description of problem: ovirt-engine.py uses env variable to check if DEBUG is enabled or not. If user restart service using "service ovirt-engine restart" (recommend way btw) environment variables are cleaned up. using of "/etc/init.d/ovirt-engine restart" fixes the problem but it's not recommended way to do Version-Release number of selected component (if applicable): rhevm-backend-3.5.1.1-0.1.el6ev.noarch How reproducible: 100% Steps to Reproduce: 1. export OVIRT_SERVICE_DEBUG=1 2. service ovirt-engine restart Actual results: logger.level = 20 (INFO) Expected results: logger.level = 10 (DEBUG) Additional info: if os.environ.get('OVIRT_SERVICE_DEBUG', '0') != '0': logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO)
should use /etc/sysconfig/ovirt-engine to control the environment.
I think Alon is correct, please use /etc/sysconfig/ovirt-engine for setting OVIRT_SERVICE_DEBUG=1 instead of exporting the variable.
(In reply to Sandro Bonazzola from comment #4) > I think Alon is correct, please use /etc/sysconfig/ovirt-engine for setting > OVIRT_SERVICE_DEBUG=1 instead of exporting the variable. For sure I've tried this approach I have this: [root@rhevm engine.conf.d]# cat /etc/ovirt-engine/engine.conf.d/10-debug.conf OVIRT_SERVICE_DEBUG=1 and it doesn't work. if os.environ.get('OVIRT_SERVICE_DEBUG', '0') != '0': logger.setLevel(logging.DEBUG) print("Set to debug") else: logger.setLevel(logging.INFO) print("Set to info") << == !!!! /ssh:root.85.107: #$ service ovirt-engine restart Stopping oVirt Engine: [60G[ OK ] Starting oVirt Engine: Set to info << !!!! [60G[ OK ]
Again, location of environment variables for service is at /etc/sysconfig/ovirt-engine Please follow instructions closely. Thanks.
(In reply to Alon Bar-Lev from comment #6) > Again, location of environment variables for service is at > /etc/sysconfig/ovirt-engine > > Please follow instructions closely. > > Thanks. Alon, iirc ovirt-engine switched from using sysconfig to /etc/ovirt-engine/engine.conf.d, didn't it? Anyway: [root@rhevm ~]# service ovirt-engine restart Stopping oVirt Engine: [ OK ] Starting oVirt Engine: Set to info <<< !!!! Test logger before handler 20 [ OK ] [root@rhevm ~]# cat /etc/sysconfig/ovirt-engine OVIRT_SERVICE_DEBUG=1
https://bugzilla.redhat.com/show_bug.cgi?id=917586 [RFE] Use /etc/ovirt-engine/engine.conf for local configuration instead of /etc/sysconfig/ovirt-engine # rpm -qf /etc/sysconfig/ovirt-engine file /etc/sysconfig/ovirt-engine is not owned by any package
These are two different configurations. /etc/sysconfig/ovirt-engine - environment for service. /etc/ovirt-engine/engine.conf.d - configuration for application. If you need special customization of service environment, the standard method to apply that is /etc/sysconfig/@SERVICE_NAME@.
(In reply to Pavel Zhukov from comment #7) > (In reply to Alon Bar-Lev from comment #6) > > Again, location of environment variables for service is at > > /etc/sysconfig/ovirt-engine > > > > Please follow instructions closely. > > > > Thanks. > > Alon, iirc ovirt-engine switched from using sysconfig to > /etc/ovirt-engine/engine.conf.d, didn't it? > > Anyway: > [root@rhevm ~]# service ovirt-engine restart > Stopping oVirt Engine: [ OK ] > Starting oVirt Engine: Set to info <<< !!!! > Test logger before handler 20 > [ OK ] > [root@rhevm ~]# cat /etc/sysconfig/ovirt-engine > OVIRT_SERVICE_DEBUG=1 please try to export it there: OVIRT_SERVICE_DEBUG=1 export OVIRT_SERVICE_DEBUG
Exporting works.