** Description changed: + [Impact] + + * Libvirt has a concept of a live and a persistent config. + The code was so far workign on a copy due to that the handling of + device attach that caused some issues as some functions e.g. + the scsi attach here - rely on knowing data from the other live + content. + + * This was fixed upstream to use the correct definition in those cases + and by effectively splitting the definitions used for checks/code in + CONFIG/LIVE cases. + + [Test Case] + + * Simplified, but complete test steps (working on a fresh Bionic x86 host): + $ sudo apt install uvtool-libvirt + $ time uvt-simplestreams-libvirt --verbose sync --source http://cloud-images.ubuntu.com/daily arch=amd64 label=daily release=bionic + $ ssh-keygen + $ uvt-kvm create --password ubuntu b-testattach arch=amd64 release=bionic label=daily + $ virsh dumpxml b-testattach | grep controller.*scsi + # will show no output - ok + $ echo "<controller type='scsi' model='virtio-scsi' />" > controller_scsi.xml + # check persistent and live config + $ virsh attach-device b-testattach controller_scsi.xml --persistent + error: Failed to attach device from controller_scsi.xml + error: internal error: Cannot parse controller index -1 + $ virsh attach-device b-testattach controller_scsi.xml --live --config + error: Failed to attach device from controller_scsi.xml + error: internal error: Cannot parse controller index -1 + + With the fix those attaches should work just fine. + + [Regression Potential] + + * The changes are local to attaching devices, no other functionality + should be affected. If anything then e.g. due to backporting we could + have introduced issues there - I'll take a look at testing the case and + some other attach/detach in general to be sure. + + [Other Info] + + * n/a + + + --- + + == Comment: #0 - SRIKANTH AITHAL - 2019-03-28 05:10:54 == ---Problem Description--- Failed to attach scsi contr. with opt. "--config --live" when index attribute isn't specified in XML - + ---Steps to Reproduce--- - 1. Use below guest: - # virsh list - Id Name State + 1. Use below guest: + # virsh list + Id Name State ---------------------------------------------------- - 11 srik_ubuntu running + 11 srik_ubuntu running 2.Use below xml for controller attach - # cat /home/srikanth/controller_scsi.xml + # cat /home/srikanth/controller_scsi.xml <controller type='scsi' model='virtio-scsi' /> 3. Check for any previous controllers attached: # virsh dumpxml srik_ubuntu | grep controller.*scsi 4.Issue with persistent hot-attach: # virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --persistent error: Failed to attach device from /home/***/controller_scsi.xml error: internal error: Cannot parse controller index -1 5.Issue with persistent live-config: # virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --live --config error: Failed to attach device from /home/***/controller_scsi.xml error: internal error: Cannot parse controller index -1 6. Where as index is getting auto generated for live attach, as well as config attach # virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --live Device attached successfully # virsh dumpxml test_vm1 | grep controller.*scsi - <controller type='scsi' index='0' model='virtio-scsi'> - + <controller type='scsi' index='0' model='virtio-scsi'> Expected result: - From Libvirt >=1.3.5 all attach varients of hot controller attach should generate the controller index automatically if not given explicitly. - - Machine Type = witherspoon - + From Libvirt >=1.3.5 all attach varients of hot controller attach should + generate the controller index automatically if not given explicitly. + + Machine Type = witherspoon + ---uname output--- Linux ltcgen6 4.15.0-1017.19-bz175922-ibm-gt #bz175922 SMP Thu Mar 21 09:34:09 CDT 2019 ppc64le ppc64le ppc64le GNU/Linux - + ---Debugger--- A debugger is not configured - - Userspace tool common name: libvirt-bin 4.0.0-1ubuntu8.6 - - The userspace tool has the following bit modes: 64 + + Userspace tool common name: libvirt-bin + 4.0.0-1ubuntu8.6 + + The userspace tool has the following bit modes: 64 Userspace rpm: libvirt-bin
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1823676 Title: Failed to attach scsi contr. with opt. "--config --live" when index attribute isn't specified in XML To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-power-systems/+bug/1823676/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs