Bug 1374203 - Pass debug level and log file while accessing gluster volume via gfapi for qemu commands
Summary: Pass debug level and log file while accessing gluster volume via gfapi for qe...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.17.18
Hardware: Unspecified
OS: Unspecified
high
medium vote
Target Milestone: ovirt-4.1.0-alpha
: ---
Assignee: Dan Kenigsberg
QA Contact: Aharon Canan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 08:59 UTC by Sahina Bose
Modified: 2016-09-15 10:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-15 10:20:57 UTC
oVirt Team: Storage
sabose: ovirt-4.1?
sabose: planning_ack?
sabose: devel_ack?
sabose: testing_ack?


Attachments (Terms of Use)

Description Sahina Bose 2016-09-08 08:59:28 UTC
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

Comment 1 Sahina Bose 2016-09-08 09:01:04 UTC
Prasanna, can you give a sample for the options?

Comment 2 Prasanna Kumar Kalever 2016-09-08 09:15:57 UTC
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)

Comment 3 Sahina Bose 2016-09-15 10:20:57 UTC
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


Note You need to log in before you can comment on or make changes to this bug.