Bug 1631147

Summary: satellite-clone fails to enable satellite 6.3 repositories.
Product: Red Hat Satellite Reporter: Amar Huchchanavar <ahuchcha>
Component: Satellite CloneAssignee: John Mitsch <jomitsch>
Status: CLOSED ERRATA QA Contact: Ales Dujicek <adujicek>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: adujicek, ahuchcha, hshukla, mmccune, supatil
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
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: 2018-10-16 15:16:56 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 Amar Huchchanavar 2018-09-20 05:23:22 UTC
Description of problem:
satellite-clone fails to enable satellite 6.3 repositories.
~~~~
TASK [satellite-clone : Enable required repos for Satellite installation] ********************************************************************************************************************
Thursday 20 September 2018  10:26:28 +0530 (0:00:00.022)       0:02:02.007 **** 
changed: [localhost]

cmd: 
subscription-manager
repos
--enable
rhel-7-server-rpms
--enable
rhel-server-rhscl-7-rpms
--enable
rhel-7-server-satellite-6.2-rpms

start: 2018-09-20 10:26:28.595743

end: 2018-09-20 10:27:02.598621

delta: 0:00:34.002878

stdout: Repository 'rhel-7-server-rpms' is enabled for this system.
Repository 'rhel-7-server-satellite-6.2-rpms' is enabled for this system.
Repository 'rhel-server-rhscl-7-rpms' is enabled for this system.
~~~


task which fails:
~~~
TASK [satellite-clone : Run Satellite installer] *********************************************************************************************************************************************
Thursday 20 September 2018  10:37:07 +0530 (0:00:00.181)       0:12:40.806 **** 
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["satellite-installer", "--scenario", "satellite", "--foreman-proxy-dns", "false", "--foreman-proxy-dhcp", "false", "--foreman-proxy-tftp", "false", "--foreman-ipa-authentication", "false"], "delta": "0:00:05.484732", "end": "2018-09-20 10:37:12.885831", "msg": "non-zero return code", "rc": 1, "start": "2018-09-20 10:37:07.401099", "stderr": "/usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:267:in `expand_path': no implicit conversion of Array into String (TypeError)\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:267:in `parser_cache'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/puppet_module.rb:31:in `initialize'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `new'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `block in modules'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `map'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `modules'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:184:in `params'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:193:in `preset_defaults_from_puppet'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:251:in `set_parameters'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:97:in `initialize'\n\tfrom /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `new'\n\tfrom /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'\n\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:148:in `run'\n\tfrom /usr/sbin/satellite-installer:12:in `<main>'", "stderr_lines": ["/usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:267:in `expand_path': no implicit conversion of Array into String (TypeError)", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:267:in `parser_cache'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/puppet_module.rb:31:in `initialize'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `new'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `block in modules'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `map'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:88:in `modules'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:184:in `params'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/configuration.rb:193:in `preset_defaults_from_puppet'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:251:in `set_parameters'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:97:in `initialize'", "\tfrom /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `new'", "\tfrom /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'", "\tfrom /usr/share/gems/gems/kafo-0.7.6.1/lib/kafo/kafo_configure.rb:148:in `run'", "\tfrom /usr/sbin/satellite-installer:12:in `<main>'"], "stdout": "", "stdout_lines": []}
~~~~

Version-Release number of selected component (if applicable):
this is from BETA repo :satellite-clone-1.2.5-1.el7sat.noarch

OR

this is from GA repo : satellite-clone-1.2.2-1.el7sat.noarch


How reproducible:
Always

Steps to Reproduce:
1.Backup satellite 6.3 server(using katello-backup).
2.Enable 'rhel-7-server-satellite-maintenance-6-rpms'  or  'rhel-7-server-satellite-maintenance-6-beta-rpms' on new system.
3.#satellite-clone  [mention backup path in etc/satellite-clone/satellite-clone-vars.yml]

Actual results:
It fails to enable satellite 6.3 repos.

Expected results:
It should enable satellite 6.3 repos and continue cloning.  

Additional info:

Comment 2 John Mitsch 2018-09-20 15:35:05 UTC
I'm confused, what version of satellite clone are you using? If it is working on the master branch, it should be working in satellite-clone 1.2.5

Comment 5 John Mitsch 2018-09-21 13:50:57 UTC
That should be clearly documented, but a check to fail early if no metadata.yml is present is a good idea. Feel free to file an issue on the repo here https://github.com/RedHatSatellite/satellite-clone

Comment 7 Mike McCune 2018-09-24 21:59:11 UTC
Suraj Patil,

Myself and others have used the 6.4 Beta satellite-clone RPM many times to clone 6.3 systems without error and it works perfectly.

If metadata.yml is missing, this is an issue with the backup tooling or the user who created the backup and not satellite-clone.

If you follow the set of enabled repositories from comment #4:

# subscription-manager repos \
--enable rhel-7-server-satellite-maintenance-6-beta-rpms \
--enable rhel-7-server-ansible-2.6-rpms \
--enable rhel-7-server-rpms

# yum install satellite-clone

it should work without any intervention. I just ran this exact routine with a 6.3 backup *today* without error.

Comment 10 errata-xmlrpc 2018-10-16 15:16:56 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:2926