Red Hat Bugzilla – Bug 1379034
RFE: add 'iSCSI protocol' support of option 'password-secret' to support for securely passing passwords to QEMU block drivers
Last modified: 2017-08-01 23:32:30 EDT
Description of problem: This bug is opened to track https://bugzilla.redhat.com/show_bug.cgi?id=1301057#c8 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Just posted some patches to support this upstream https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg01124.html
Counter-proposal from Kevin Wolf https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg01130.html
Reworked patches based on Kevin's approach have been sent to qemu-devel. The patches can also be seen here: https://github.com/codyprime/qemu-kvm-jtc/commits/iscsi-blockdev-add
Sent a pull request upstream that contains patches that implement this feature: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg04873.html
Applied to qemu upstream master
package: qemu-kvm-rhev-2.9.0-1.el7.x86_64 Authentication failure(513) error when test with cmd: -object secret,id=sec0,file=/home/iscsi-password \ -drive driver=iscsi,file=iscsi://10.73.199.233/iqn.2017-04.com.example:t2/0,user=redhat,password-secret=sec0 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=03 \ Note: Double check the iscsi-password file, no blank in the file Pass with old cmd: -drive id=drive_image1,if=none,cache=none,snapshot=on,aio=native,format=raw,file=iscsi://10.73.199.233/iqn.2017-04.com.example:t2/0 \ -iscsi user=redhat,password=redhat,id=iqn \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=03 \
Please run 'od -x -a /home/iscsi-password' and post the output to this bug. I'm pretty sure you will find there is a newline character there that needs removing
# od -x -a /home/iscsi-password 0000000 6572 6864 7461 000a r e d h a t nl 0000007 it works after remove the file # echo -n redhat > /home/iscsi-password # od -x -a /home/iscsi-password 0000000 6572 6864 7461 r e d h a t 0000006 cmd: /usr/libexec/qemu-kvm \ -object secret,id=sec0,file=/home/iscsi-password \ -drive id=drive_image1,if=none,cache=none,snapshot=on,aio=native,format=raw,file=iscsi://10.73.199.233/iqn.2017-04.com.example:t2/0,file.user=redhat,file.password-secret=sec0 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=06
according comment11, update the bug to verified
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-2017:2392