Description of problem: If smartcard support is enabled in a template, every time the "Edit" window is opened and "OK" is pressed a new smartcard entry is created. Even if no changes were made to the template, if "OK" is pressed, a duplicate is added. Since qemu does not handle multiple smartcards, any VM created from a template with more than one smartcard will fail to boot. Version-Release number of selected component (if applicable): rhevm-3.3.2-0.50 How reproducible: 100% Steps to Reproduce: 1. Create a template (I used win2k8) 2. Enable smartcard support in the template 3. Edit the template, make no changes, and press "OK" Actual results: Duplicate smartcard entrries are created Expected results: The single smartcard device is persisted, but no new ones are added. Additional info: * Initial template with no smartcard(ID a11f8bb7-529f-472e-8296-052e689ae0d7) engine=# select count(*) from vm_device where type = 'smartcard' and vm_id = 'a11f8bb7-529f-472e-8296-052e689ae0d7'; count ------- 0 * Edit the template, add smartcard support ("Show Advanced Options" -> Console -> Smartcard Enabled) engine=# select count(*) from vm_device where type = 'smartcard' and vm_id = 'a11f8bb7-529f-472e-8296-052e689ae0d7'; count ------- 1 * Edit the template again, but make no changes. Just click "OK" engine=# select count(*) from vm_device where type = 'smartcard' and vm_id = 'a11f8bb7-529f-472e-8296-052e689ae0d7'; count ------- 2 * Repeat 4 more times engine=# select count(*) from vm_device where type = 'smartcard' and vm_id = 'a11f8bb7-529f-472e-8296-052e689ae0d7'; count ------- 6
Created attachment 896504 [details] vdsm log with multiple failures due to duplicate smartcard entries
*** Bug 1134072 has been marked as a duplicate of this bug. ***
verified in vt3
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://rhn.redhat.com/errata/RHSA-2015-0158.html