Bug 1802216

Summary: Add support for newer glusterfs
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Rezanina <mrezanin>
Component: qemu-kvm-rhevAssignee: Maxim Levitsky <mlevitsk>
Status: CLOSED ERRATA QA Contact: CongLi <coli>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: coli, jinzhao, jmaloy, juzhang, mlevitsk, mtessun, virt-bugs, virt-maint
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.12.0-45.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1802215
: 1821669 1822236 (view as bug list) Environment:
Last Closed: 2020-08-03 07:23:25 UTC Type: ---
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: 1802215    
Bug Blocks: 1821669, 1822236    

Comment 9 Tingting Mao 2020-03-19 08:25:21 UTC
Thanks for Maxim's info first, and I tried to verify this bug as below. Could set this bug as verified after the status changed to ON_QA. Thanks.


Tested with:
qemu-kvm-rhev-2.12.0-45.el7
kernel-3.10.0-1129.el7.x86_64

# rpm -qa | grep glusterfs
glusterfs-libs-6.0-30.1.el7rhgs.x86_64
glusterfs-devel-6.0-30.1.el7rhgs.x86_64
glusterfs-geo-replication-6.0-30.1.el7rhgs.x86_64
glusterfs-cloudsync-plugins-6.0-30.1.el7rhgs.x86_64
glusterfs-6.0-30.1.el7rhgs.x86_64
glusterfs-api-6.0-30.1.el7rhgs.x86_64
glusterfs-fuse-6.0-30.1.el7rhgs.x86_64
glusterfs-server-6.0-30.1.el7rhgs.x86_64
glusterfs-events-6.0-30.1.el7rhgs.x86_64
glusterfs-rdma-6.0-30.1.el7rhgs.x86_64
glusterfs-debuginfo-6.0-30.1.el7rhgs.x86_64
glusterfs-client-xlators-6.0-30.1.el7rhgs.x86_64
glusterfs-cli-6.0-30.1.el7rhgs.x86_64
glusterfs-api-devel-6.0-30.1.el7rhgs.x86_64


Steps:
1. Setup gluster server in the host.
1.1 Installed the rpm packages as above.
1.2 Import volume.
# systemctl enable --now glusterd

# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-03-19 03:41:39 EDT; 6s ago
     Docs: man:glusterd(8)
  Process: 10669 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 10670 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─10670 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 19 03:41:38 hp-dl388pg8-01.lab.eng.pek2.redhat.com systemd[1]: Starting GlusterFS, a clustered fi....
Mar 19 03:41:39 hp-dl388pg8-01.lab.eng.pek2.redhat.com systemd[1]: Started GlusterFS, a clustered fil....
Hint: Some lines were ellipsized, use -l to show in full.

# mkdir /home/brick

# gluster volume create gv0 hp-dl388pg8-01.lab.eng.pek2.redhat.com:/home/brick force
volume create: gv0: success: please start the volume to access data

# gluster volume start gv0
volume start: gv0: success

2. Do tests.
2.1 Create images with different formats.
Qcow2:
# qemu-img create -f qcow2 gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.qcow2 20G
Formatting 'gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.qcow2', fmt=qcow2 size=21474836480 cluster_size=65536 lazy_refcounts=off refcount_bits=16
[2020-03-19 07:43:50.530321] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded
[2020-03-19 07:43:52.532435] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded

# qemu-img info gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.qcow2
[2020-03-19 07:44:02.970223] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded
image: gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 193K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Raw:
# qemu-img create -f raw gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.raw 2G
Formatting 'gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.raw', fmt=raw size=2147483648
[2020-03-19 07:44:33.656620] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded

# qemu-img info gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.raw
[2020-03-19 07:44:49.607893] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded
image: gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.raw
file format: raw
virtual size: 2.0G (2147483648 bytes)
disk size: 0

Luks:
# qemu-img create --object secret,id=sec0,data=base -o key-secret=sec0 -f luks gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.luks 2G
Formatting 'gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.luks', fmt=luks size=2147483648 key-secret=sec0
[2020-03-19 07:45:22.735832] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded
[2020-03-19 07:45:29.855047] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded

# qemu-img info gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.luks
[2020-03-19 07:45:41.430622] I [io-stats.c:4027:fini] 0-gv0: io-stats translator unloaded
image: gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.luks
file format: luks
virtual size: 2.0G (2147483648 bytes)
disk size: 256K
encrypted: yes
Format specific information:
    ivgen alg: plain64
    hash alg: sha256
    cipher alg: aes-256
    uuid: e9e94aec-a928-4b38-820e-ffe2c7096cb3
    cipher mode: xts
    slots:
        [0]:
            active: true
            iters: 96946
            key offset: 4096
            stripes: 4000
        [1]:
            active: false
            key offset: 262144
        [2]:
            active: false
            key offset: 520192
        [3]:
            active: false
            key offset: 778240
        [4]:
            active: false
            key offset: 1036288
        [5]:
            active: false
            key offset: 1294336
        [6]:
            active: false
            key offset: 1552384
        [7]:
            active: false
            key offset: 1810432
    payload offset: 2068480
    master key iters: 24407

2.2 Install guest over a image with qcow2 format, reboot, and shutdown.
# /usr/libexec/qemu-kvm \
        -name 'guest-rhel' \
        -machine q35 \
        -nodefaults \
        -vga qxl \
        -drive id=drive_cd1,if=none,snapshot=off,aio=threads,cache=unsafe,media=cdrom,file=RHEL7.8-Server-x86_64.iso  \
        -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=0 \
        -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=gluster://hp-dl388pg8-01.lab.eng.pek2.redhat.com/gv0/base.qcow2 \
        -device virtio-blk-pci,id=virtio_blk_pci0,drive=drive_image1,bus=pcie.0,addr=05 \
        -vnc :0 \
        -monitor stdio \
        -m 8192 \
        -smp 8 \
        -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b3,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pcie.0,addr=0x9  \
        -netdev tap,id=idxgXAlm \
        -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/timao/monitor-qmpmonitor1-20180220-094308-h9I6hRsI,server,nowait \
        -mon chardev=qmp_id_qmpmonitor1,mode=control  \

Result:
Creation works fine, and install,reboot, shutdown all work fine.

Comment 22 errata-xmlrpc 2020-08-03 07:23:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3267