| Summary: | Binding to a repo gives the wrong hostname in the yum repo file | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Jason Connor <jconnor> |
| Component: | user-experience | Assignee: | Jay Dobies <jason.dobies> |
| Status: | CLOSED WORKSFORME | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | CC: | mmccune, tsanders |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-14 22:00:44 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
I think this is due to the server name not being set (or picked up) in pulp/pulp.conf. Note to self: make sure that step is mentioned in the user guide. I double checked this on the v1 candidate and can't reproduce. I suspect it's that server_name wasn't set correctly or the server hadn't been bounced after it was.
As a further sanity check, I looked in the code to where the bind data is built. In the snippet below, hostnames was already populated from the CDS distribution algorithm:
# Add in the pulp server itself as the last host in the list if there are CDS
# instances; if there are none, the pulp server will be the only entry (default case)
server_name = pulp.server.config.config.get('server', 'server_name')
hostnames.append(server_name)
I'll update the install guide to remind people to set this; it's an important step that's unlisted.
Actually, it's already in the installation instructions to be done before starting the server the first time:
3. Update '/etc/pulp/pulp.conf' to reflect the hostname of the Pulp server.
Change 'localhost' in the below to the hostname of the Pulp server.
|
Description of problem: Bound to a repo that has the ip address in the repo url. Ended up with 'localhost' as the host name in the yum repo file. Steps to Reproduce: 1. Register consumer against server with a 'server name' of an ip address 2. Bind consumer to a repo listed on that server 3. Unable to install packages from repo because 'localhost' is server name in yum repo file Actual results: [root@consumer-1 jconnor]# pulp-consumer consumer bind --repoid 0ad Successfully subscribed consumer [consumer-1] to repo [0ad] [root@consumer-1 jconnor]# pulp-consumer repo list +------------------------------------------+ List of Available Repositories +------------------------------------------+ Id 0ad Name 0ad Repo URL https://10.0.1.189/pulp/repos/repos/bioinfornatics/0ad/fedora-16/x86_64/ ... [root@consumer-1 jconnor]# cat /etc/yum.repos.d/pulp.repo # # Pulp Repositories # Managed by Pulp client # [0ad] name = 0ad enabled = 1 sslverify = 0 gpgcheck = 0 baseurl = https://localhost/pulp/repos/repos/bioinfornatics/0ad/fedora-16/x86_64 Expected results: Expected ip address instead of 'localhost' in the yum repo file