#47 need changes for createhdds.py for PowerPC
Closed: Invalid None Opened 7 years ago by michelmno.

some of the tests of OpenQA for Fedora need to create images with createhdds.py tool as described in install procedure (1)

I first trial with "support" parameter failed as detailed in (2)
There are at least two errors I need to investigate:
- the hardcoded arch x86_64 while running on a ppc64le machine
- the XML-RPC error

(1) https://phab.qa.fedoraproject.org/diffusion/OPENQA/browse/develop/InstallGuide.md
(2)

[root@fenix hdd]# ~/openqa_fedora_tools/tools/createhdds.py support
INFO:createhdds:Creating image disk_f25_support_3_x86_64.img...[1/1]
libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
Traceback (most recent call last):
  File "/root/openqa_fedora_tools/tools/createhdds.py", line 720, in <module>
    main()
  File "/root/openqa_fedora_tools/tools/createhdds.py", line 710, in main
    args.func(args, hdds)
  File "/root/openqa_fedora_tools/tools/createhdds.py", line 603, in cli_image
    img.create()
  File "/root/openqa_fedora_tools/tools/createhdds.py", line 215, in create
    conn = libvirt.open()
  File "/usr/lib64/python3.5/site-packages/libvirt.py", line 255, in open
    if ret is None:raise libvirtError('virConnectOpen() failed')
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

tempo local bypass replacing x86_64 by ppc64 in tools/hdds.json
and manually starting the libvirt daemon (with disabled listen_tls) allow to continue execution
but now failing as missing installable distribution:

[root@fenix hdd]# ~/openqa_fedora_tools/tools/createhdds.py support
INFO:createhdds:Creating image disk_f25_support_3_ppc64le.img...[1/1]
libvirt: QEMU Driver error : Domain not found: no domain with matching name 'createhdds'
INFO:createhdds:Install running, connect via VNC to monitor
ERROR    Error validating install location: Could not find an installable distribution at 'https://download.fedoraproject.org/pub/fedora/linux/releases/25/Everything/ppc64le/os': The URL could not be accessed, maybe you mistyped?

The location must be the root directory of an install tree.
See virt-install man page for various distro examples.
virt-install command virt-install --disk size=6,path=disk_f25_support_3_ppc64le.img.tmp --os-variant fedora25 -x inst.ks=file:/support.ks --initrd-inject /root/openqa_fedora_tools/tools/support.ks --location https://download.fedoraproject.org/pub/fedora/linux/releases/25/Everything/ppc64le/os --graphics vnc --name createhdds --memory 2048 --noreboot --noautoconsole --wait -1 --network user failed!

I have a temporary patch in bitbucket (1) to bypass two previous problems.
But next failure is that started qemu process (2) seems to hung at the end of anaconda install
with "Performing post-installation setup tasks" in VNC screen.

trying to access guest console (with vnc console createhdds) also hung at this step.

Do somebody has a suggestion ?

(1) https://bitbucket.org/michel_mno/openqa_fedora_tools/commits/5aeb6bf95e6f26ed9fd3ecee2e27e680fe40873e

(2)

[root@fenix openqa_fedora_tools]# ps axf |grep qemu
 48513 pts/0    S+     0:00  |                   \_ grep --color=auto qemu
 48101 ?        RLl    7:23 /usr/bin/qemu-system-ppc64 -name guest=createhdds,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-19-createhdds/master-key.aes -machine pseries-2.7,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 7c4c90e7-da68-44b0-b3b2-1620dd95f57d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-19-createhdds/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -boot strict=on -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.416LaT -initrd /var/lib/libvirt/boot/virtinst-initrd.img.VyXMAE -append inst.ks=file:/support.ks inst.repo=https://download.fedoraproject.org/pub/fedora-secondary/releases/25/Everything/ppc64le/os -device pci-ohci,id=usb,bus=pci.0,addr=0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/var/lib/openqa/share/factory/hdd/disk_f25_support_3_ppc64le.img.tmp,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev user,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:c2:3e:89,bus=pci.0,addr=0x1 -chardev pty,id=charserial0 -device spapr-vty,chardev=charserial0,reg=0x30000000 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-19-createhdds/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-kbd,id=input0,bus=usb.0,port=1 -device usb-mouse,id=input1,bus=usb.0,port=2 -vnc 127.0.0.1:0 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on

The way createhdds is supposed to work is that all the disk images for a given openQA deployment are created on the server for that deployment. So the 'hard coded' arch is appropriate: createhdds should create images for all tested arches, it shouldn't take any notice of the arch of the machine it's running on.

Of course, creating images with an installed ppc64 system from an x86_64 server is likely to be extremely slow, so we might need to rethink the overall design. But somehow farming out the disk image creation to appropriately-arched workers would be...rather a major change (not just in createhdds itself, but in the ansible scripts for the official deployment).

Also, I've just split createhdds into a separate project now hosted on Pagure:
https://pagure.io/fedora-qa/createhdds

could you please re-create this as an issue over there? Thanks!

Login to comment on this ticket.

Metadata