Hide Forgot
Description of problem: Debug level and log file options have been added for gluster driver in qemu. These need to be passed from vdsm for all qemu commands (qemu-img) in order to enable logging to files. Version-Release number of selected component (if applicable): How reproducible: NA Steps to Reproduce: NA
Prasanna, can you give a sample for the options?
we can choose the log level [0-9] and logfile path (default to /dev/stderr) Debug levels are 0-9, with 9 being the most verbose, and 0 representing no debugging output. The default is the same as it was before, which is a level of 4. The current logging levels defined in the gluster source are: 0 - None 1 - Emergency 2 - Alert 3 - Critical 4 - Error 5 - Warning 6 - Notice 7 - Info 8 - Debug 9 - Trace For qemu-img: Only URI format is supported because the qemu .brv_create() is currently doesn't support json style. # qemu-img create -o debug=9 -o logfile=/var/log/vdsm/qemu_gluster.log gluster://hostname/volname/VM.img 2G For qemu-system-x86_64 or qemu-kvm: # *URI Style: --------- qemu-system-x86_64 -drive file=gluster://hostname/volname/image.qcow2,file.debug=9,file.logfile=/var/log/qemu/qemu-gfapi.log *JSON Style: ---------- qemu-system-x86_64 \ 'json:{ "driver":"qcow2", "file":{ "driver":"gluster", "volume":"volname", "path":"image.qcow2", "debug":"9", "logfile":"/var/log/qemu/qemu-gfapi.log", "server":[ { "type":"tcp", "host":"1.2.3.4", "port":24007 }, { "type":"unix", "socket":"/var/run/glusterd.socket" } ] } }' Note: DEBUG LEVEL patches are currently available with qemu but LOG FILE related patches are not merged yet (we can expect this in near future, as I already got an ACK with the patches)
The log level will be controlled by "qemu_gfapi_debuglevel" in qemu.conf , see https://www.redhat.com/archives/libvir-list/2016-September/msg00485.html This bug is not required. closing it