Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515847 - satellite-clone removed needed /etc/hosts entries
Summary: satellite-clone removed needed /etc/hosts entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Satellite Clone
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: John Mitsch
QA Contact: Evgeni Golov
URL:
Whiteboard:
Depends On:
Blocks: 1533259
TreeView+ depends on / blocked
 
Reported: 2017-11-21 13:23 UTC by Tomer Brisker
Modified: 2019-04-12 15:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-19 17:23:12 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0330 normal SHIPPED_LIVE Satellite Maintenance bug fix update 2018-02-19 22:22:51 UTC

Description Tomer Brisker 2017-11-21 13:23:20 UTC
A user that needs to have cdn.redhat.com in their /etc/hosts file to properly resolve the CDN gets that entry removed when satellite-clone is run, leading to a failed installation of Satellite.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a host that can't resolve cdn.redhat.com (e.g. by disabling dns)
2. Add an entery in /etc/hosts for cdn.redhat.com
3. Run satellite-clone

Actual results:
TASK [satellite-clone : Install Satellite 6.2 packages] ************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "[Errno -3] Temporary failure in name resolution\nhttps://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: cdn.redhat.com; Temporary failure in name resolution\"\nTrying other mirror.\n\n\n One of the configured repositories failed (Red Hat Enterprise Linux 7 Server (RPMs)),\n and yum doesn't have enough cached data to continue. At this point the only\n safe thing yum can do is fail. There are a few ways to work \"fix\" this:\n\n     1. Contact the upstream for the repository and get them to fix the problem.\n\n     2. Reconfigure the baseurl/etc. for the repository, to point to a working\n        upstream. This is most often useful if you are using a newer\n        distribution release than is supported by the repository (and the\n        packages for the previous distribution release still work).\n\n     3. Disable the repository, so yum won't use it by default. Yum will then\n        just ignore the repository until you permanently enable it again or use\n        --enablerepo for temporary usage:\n\n            yum-config-manager --disable rhel-7-server-rpms\n\n     4. Configure the failing repository to be skipped, if it is unavailable.\n        Note that yum will try to contact the repo. when it runs most commands,\n        so will have to try and fail each time (and thus. yum will be be much\n        slower). If it is a very temporary problem though, this is often a nice\n        compromise:\n\n            yum-config-manager --save --setopt=rhel-7-server-rpms.skip_if_unavailable=true\n\nfailure: repodata/repomd.xml from rhel-7-server-rpms: [Errno 256] No more mirrors to try.\nhttps://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: cdn.redhat.com; Temporary failure in name resolution\"\n", "rc": 1, "results": []}


Expected results:
Satellite is installed correctly.


Additional info:
Current workaround is to disable the /etc/hosts task in the clone playbook.

Comment 2 sthirugn@redhat.com 2018-01-08 19:10:43 UTC
upstream issue - https://github.com/RedHatSatellite/satellite-clone/issues/281

Comment 3 John Mitsch 2018-01-10 21:33:14 UTC
option added upstream https://github.com/RedHatSatellite/satellite-clone/pull/288

Comment 4 Evgeni Golov 2018-02-02 12:48:01 UTC
VERFIED
satellite-clone-1.2.1-1.el7sat.noarch

# cat /etc/hosts
192.0.2.1	testing.example.com
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

# grep etc_hosts /etc/satellite-clone/satellite-clone-vars.yml 
overwrite_etc_hosts: false

# satellite-clone

...
TASK [satellite-clone : create /etc/hosts] ************************************
Friday 02 February 2018  11:44:30 +0000 (0:00:00.360)       0:00:08.216 ******* 
skipping: [localhost]
...

# cat /etc/hosts
192.0.2.1	testing.example.com
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6



However, I think the whole logic should be opt-in, rather than opt-out, so I opened https://github.com/RedHatSatellite/satellite-clone/issues/319 for further discussion upstream.

Comment 7 errata-xmlrpc 2018-02-19 17:23:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0330


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