Bug 1565406

Summary: Beakerd may not go to OpenStack if distro requires is set to incompatible iPXE URL
Product: [Retired] Beaker Reporter: Roman Joost <rjoost>
Component: openstackAssignee: beaker-dev-list
Status: CLOSED EOL QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: mastyk
Target Milestone: future_maintKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-07 13:03:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Joost 2018-04-10 00:46:39 UTC
Description of problem:

I've introduced a problem when it comes to OpenStack provisioning in https://gerrit.beaker-project.org/#/c/6054/5/Server/bkr/server/model/scheduler.py

The code checks if the installation.tree_url is iPXE compatible. The problem is, that a NFS URL from the distro_tree could be set on the installation.tree_url during provisioning which would mean that if no physical systems match, no OpenStack provisioning would take place.

What the code should do instead is what I do in this re-factoring https://gerrit.beaker-project.org/#/c/6057/5/Server/bkr/server/model/scheduler.py on line 3092:

* first lookup the tree URL from the lab controller
* if the tree_url is still None or does not have an http, ftp scheme it is not compatible with virt

Version-Release number of selected component (if applicable):
25.1

How reproducible:
100%

Steps to Reproduce:
This is tricky, since we currently can't force a virt provisioning.

Comment 1 Dan Callaghan 2018-04-10 01:01:32 UTC
Note that there are a few other bits of code with a similar problem:

* S/390 zpxe needs to be given ftp:// URLs, even if you want Anaconda to use nfs://

* beaker-provision needs either http:// or ftp:// to download the images and put them into /var/lib/tftpboot, even if you want to Anaconda to use nfs://

So there are some other possible solutions here which might work better with the custom distro support.

For example, what if installation grew another column, in addition to tree_url? The tree_url specifies the URL for Anaconda (which might be nfs://) but you can optionally supply a netboot_url which specifies how to fetch the images. The netboot_url could default to the same as the tree_url if the tree_url is http:// or ftp://. It would only need to be specified in cases where there is a mismatch between what Beaker needs to supply for netbooting vs. what the recipe wants Anaconda to use.

Or there is another possible solution. On installation we already have columns for kernel and initrd. Typically these are relative paths which are resolved from the tree_url but they can also be absolute URLs. So if you want to use nfs:// for the installation then you just need to give an absolute http:// or ftp:// URL for the kernel and initrd so that Beaker can fetch it properly.

Comment 2 Roman Joost 2018-05-25 03:02:52 UTC
I've tried to come up with a quick fix here:

https://gerrit.beaker-project.org/#/c/6109/

but it turns out it's not good.

The problem is that over long run the installation.tree_url should become the authoritative source. The patch would go backwards and promote the distro_tree again to be the authoritative source.

Comment 3 Martin Styk 2020-04-07 13:03:43 UTC
We are not planning to support Openstack as part of Beaker anymore. 

If you have any questions, please reach out to me.

Regards,
Martin Styk <martin.styk>