Bug 1005021 - beaker-sync-tasks fails if task XML refers to an internal hostname that is not publicly accessible
Summary: beaker-sync-tasks fails if task XML refers to an internal hostname that is no...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-06 03:42 UTC by Amit Saha
Modified: 2020-10-21 14:18 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-10-21 14:14:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Amit Saha 2013-09-06 03:42:17 UTC
Description of problem:

With Fedora's Beaker instance which I believe has a different public and private hostnames, the task RPM URL when retrieved via XML-RPC returns the private URL and not the public one. On the task page in the Web UI, the URL is correctly the public facing URL.


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


How reproducible:


Steps to Reproduce:
1. Visit Fedora project's beaker instance
2. Check any task's URL
3. Retrieve the XML for this task and check the URL

Actual results:


Expected results:


Additional info:

Perhaps, the absolute_url() in model.py needs to be looked into.

Comment 1 Amit Saha 2013-09-06 03:43:43 UTC
For example, for a task, it's XML returns:

<task version="1.2-50" name="/distribution/pkginstall" creation_date="2013-09-04 00:14:40">
<description>Reports back on the package \tinstallation that was done</description>
<owner>Gurhan Ozen <gozen></owner>
<path>/mnt/tests/distribution/pkginstall</path>
<rpms><rpm url="http://beaker01.qa.fedoraproject.org/bkr/rpms/rh-tests-distribution-pkginstall-1.2-50.noarch.rpm" name="rh-tests-distribution-pkginstall-1.2-50.noarch.rpm"/></rpms>
</task>

On the Web UI, the URL is rightly: http://beaker.fedoraproject.org/rpms/rh-tests-distribution-pkginstall-1.2-50.noarch.rpm

Comment 3 Nick Coghlan 2013-09-06 05:13:17 UTC
Made the example public, since my understanding is that the private Fedora URLs are private in the "unroutable" sense, rather than the "secret" sense :)

This is actually an interesting problem, since I believe what Beaker is currently doing is *right* from a test execution point of view - tasks running on the lab controller need to see the private URL, as they may not have access to the public one, and they're the most likely consumers of the task library URLs.

So it's not as simple as saying "everything should use the public URL", since the test systems may not be able to access that.

Always using the private URL isn't right either, since external clients may want to be able to retrieve the task RPMs (e.g. the task sync script).

Detecting which IP address or URL was used to access the site isn't feasible for XML-RPC, but *would* be feasible for a REST API. So the answer may be to expose a REST API for the task library, rather than trying to fix the XML-RPC API.

Comment 5 Dan Callaghan 2017-04-04 06:09:04 UTC
Updating description to reflect the fact that everything pretty much works here, there is only quite a narrow case that is problematic: when you have a Beaker instance with tg.lab_domain set to some hostname not resolvable on the internet, and someone on the internet wants to run beaker-sync-tasks pointing at your Beaker. In that case the task XML will have inaccessible URLs in it.

beaker-sync-tasks is the only known consumer of the task XML apart from the harness.


Note You need to log in before you can comment on or make changes to this bug.