Description of problem: User may copy paste distro tree urls which have tailing spaces while adding new distro tree urls via web UI, this can cause failures due to wrong urls are generated for the kernel and ramdisk images. Version-Release number of selected component (if applicable): 0.11 How reproducible: 100% Steps to Reproduce: 1. Navigate to http://your-beaker-server/distrotrees/<id> 2. Add a new url which contains tailing spaces for one of the lab controllers and remove other valid urls for this lab controller. 3. Create a job with the distro on a system which is controlled by that lab controller Actual results: wrong urls generated for the kernel and ramdisk images while using that distro tree. Expected results: the tailing spaces should be removed Additional info:
correction to the original report: Actually it only happens while using RHEV dynamic guests, so the reproduce steps should be: 1. Add a nfs tree url which has tailing spaces to one of the lab controllers 2. Create a job which can run on RHEV dynamic guests (with the lab controller updated in step 1). It was caused by model.py -> VirtManager -> start_install: kernel_path = os.path.join(local_path, kernel.path) initrd_path = os.path.join(local_path, initrd.path) os.path.join doesn't strip the tailing spaces in 'local_path', thus the vm booted up with invalid local images, and user don't know what happens until check the vdsm on RHEV hypervisor host.
And if the distro url is not ending with '/', there is problem too. The invalid image urls could be: 1. '/net/tree.server.com/released/rhel/rhel6/U4/i386/os/ pxeboot/images/vmlinuz' 2. '/net/tree.server.com/released/rhel/rhel6/U4/i386/ospxeboot/images/vmlinuz'
http://gerrit.beaker-project.org/#/c/1735/
Verified that distro tree URLs are correctly normalized to strip trailing whitespace and append a / when adding them on the Distro Tree page.
Beaker 0.12 has been released.