Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1783313

Summary: gluster connection opened via blockdev-create doesn't use the /dev/stderr default log
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Peter Krempa <pkrempa>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: Gluster QA Contact: aihua liang <aliang>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aliang, coli, jinzhao, juzhang, timao, virt-maint
Version: 8.1   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-16 16:45:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1465810    

Description Peter Krempa 2019-12-13 14:53:24 UTC
Description of problem:
When creating a gluster image via blockdev-create or opening it via -blockdev qemu seems to ignore the documented default log output for libgfapi and initiates logging to a libgfapi-created file in /var/log/gluster. Since qemu has no permissions for that directory the startup fails.

{"execute":"blockdev-create","arguments":{"job-id":"create-libvirt-2-storage","options":{"driver":"gluster","location":{"volume":"gv","path":"q35.s1","server":[{"type":"inet","host":"10.66.85.42","port":"24007"}]},"size":3298103296}},"id":"libvirt-367"}

error: operation failed: failed to format image: 'Permission denied'

qemu log contains:
ERROR: failed to create logfile "/var/log/glusterfs/10.66.85.42-gv-27855.log" (Permission denied)

Documentation states:
##
# @BlockdevOptionsGluster:
#
# Driver specific block device options for Gluster
#
# @volume:      name of gluster volume where VM image resides
#
# @path:        absolute path to image file in gluster volume
#
# @server:      gluster servers description
#
# @debug:       libgfapi log level (default '4' which is Error)
#               (Since 2.8)
#
# @logfile:     libgfapi log file (default /dev/stderr) (Since 2.8)
#
# Since: 2.9
##
{ 'struct': 'BlockdevOptionsGluster',
  'data': { 'volume': 'str',
            'path': 'str',
            'server': ['SocketAddress'],
            '*debug': 'int',
            '*logfile': 'str' } }


Version-Release number of selected component (if applicable):
libvirt-5.10.0-1.module+el8.2.0+5040+bd433686.x86_64
qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64
glusterfs-6.0-24.el8.x86_64


How reproducible:
always

Steps to Reproduce:
1. Use the above command when running under proper confinement (qemu:qemu + selinux)
2.
3.

Actual results:
permission denied error

Expected results:
logs collected in /dev/stderr thus processed by libvirt

Additional info: