Bug 1375887
Summary: | volume xml's encryption info lost after pool refreshed | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yisun |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.4 | CC: | dyuan, jdenemar, jferlan, lmen, rbalakri, xuzhang, yanyang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.5.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 17:16:43 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: |
Description
yisun
2016-09-14 07:29:18 UTC
Patch was pushed : $ git describe 2f6b750ecaff0e1d87e17d3a7c5a01218a527220 v2.2.0-68-g2f6b750 $ git show 2f6b750ecaff0e1d87e17d3a7c5a01218a527220 commit 2f6b750ecaff0e1d87e17d3a7c5a01218a527220 Author: John Ferlan <jferlan> Date: Tue Sep 6 17:00:30 2016 -0400 storage: Need to properly read the crypt offset value Commit id 'a48c7141' altered how to determine if a volume was encrypted by adding a peek at an offset into the file at a specific buffer location. Unfortunately, all that was compared was the first "char" of the buffer against the expect "int" value. Restore the virReadBufInt32BE to get the complete field in order to compare against the expected value from the qcow2EncryptionInfo or qcow1EncryptionInfo "modeValue" field. This restores the capability to create a volume with encryption, then refresh the pool, and still find the encryption for the volume. Version-Release number of selected component: kernel-3.10.0-671.el7.x86_64 qemu-kvm-rhev-2.9.0-6.el7.x86_64 libvirt-3.2.0-6.el7.x86_64 Steps to verify: 1:create volume through vol.xml and check the dumpxml file # cat vol.xml <volume> <name>test</name> <capacity>104857600</capacity> <allocation>52428800</allocation> <target> <format type="qcow2" /> <encryption format="default" /> </target> </volume> # virsh pool-list --all Name State Autostart ------------------------------------------- default active yes # virsh vol-create --pool default --file vol.xml Vol test created from vol.xml # virsh vol-dumpxml test --pool default <volume type='file'> <name>test</name> <key>/var/lib/libvirt/images/test</key> <source> </source> <capacity unit='bytes'>104857600</capacity> <allocation unit='bytes'>200704</allocation> <physical unit='bytes'>196616</physical> <target> <path>/var/lib/libvirt/images/test</path> <format type='qcow2'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_image_t:s0</label> </permissions> <timestamps> <atime>1495706930.351323456</atime> <mtime>1495706930.349323456</mtime> <ctime>1495706930.350323456</ctime> </timestamps> <encryption format='qcow'> <secret type='passphrase' uuid='8ef116e4-cb77-4442-9f55-a361b2c7d402'/> </encryption> </target> </volume> 2:refresh the pool and check the volume dumpxml file again # virsh pool-refresh default Pool default refreshed # virsh vol-dumpxml test --pool default <volume type='file'> <name>test</name> <key>/var/lib/libvirt/images/test</key> <source> </source> <capacity unit='bytes'>104857600</capacity> <allocation unit='bytes'>200704</allocation> <physical unit='bytes'>196616</physical> <target> <path>/var/lib/libvirt/images/test</path> <format type='qcow2'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_image_t:s0</label> </permissions> <timestamps> <atime>1495706930.351323456</atime> <mtime>1495706930.349323456</mtime> <ctime>1495706930.350323456</ctime> </timestamps> <encryption format='qcow'> <secret type='passphrase' uuid='8ef116e4-cb77-4442-9f55-a361b2c7d402'/> </encryption> </target> </volume> 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/RHEA-2017:1846 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/RHEA-2017:1846 |