Bug 1465794

Summary: capsule install failed w/ error No package <capsule_hostname>-apache available
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Foreman ProxyAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: ddolguik, sghai
Target Milestone: Unspecified   
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: 2017-06-29 05:42:58 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 Nikhil Kathole 2017-06-28 08:26:18 UTC
Description of problem:
I was trying to install external capsule server.Satellite-capsule installed successfully but while running the command generated by the output from the capsule-certs-generate command in the satellite server on capsule is showing error as 

 Execution of '/usr/bin/yum install -y <hostname>-apache' returned 1: Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package <hostname>-apache available.
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.3HaV75 (%install)



Version-Release number of selected component (if applicable): sat6.3 snap4


How reproducible: always


Steps to Reproduce:
1.Install satellite and generate activation key for capsule
2.Try to create external capsule server
3.yum install -y satellite-capsule
4.Run command generated by the output from the capsule-certs-generate command in the satellite server on capsule

Actual results:

Execution of '/usr/bin/yum install -y <hostname>-apache' returned 1: Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package <hostname>-apache available.
Nothing to do



Expected results:

command generated by the output from the capsule-certs-generate command in the satellite server should run successfully on capsule



Additional info:

Comment 2 Sachin Ghai 2017-06-28 10:50:27 UTC
I'm also facing similar issue while installing external capsule using sat6.3 beta snap4 capsule.

The capsule-cert-generate cmd gives following output:

satellite-installer --scenario capsule  --foreman-proxy-content-parent-fqdn           "satellite_server.redhat.com" --foreman-proxy-register-in-foreman "true"  --foreman-proxy-foreman-base-url  "https://cloud-qe-15.idmqe.lab.eng.bos.redhat.com" --foreman-proxy-trusted-hosts  "satellite_server.redhat.com"  --foreman-proxy-trusted-hosts  "satellite_server.redhat.com"  --foreman-proxy-oauth-consumer-key      "McyRHrdYk3KoVZKZYRbo9STKSbw9zjyB" --foreman-proxy-oauth-consumer-secret  "CTh8KCo5rLHztvzxHzgNVgNdGGubBd7G" --foreman-proxy-content-pulp-oauth-secret     "BDkVrNHXWVWgj6qVXEXbv9TdR7hZue7Z"  --foreman-proxy-content-certs-tar "/root/capsule_server.redhat.com-certs.tar" --puppet-server-foreman-url  "https://satellite-server.redhat.com"


Please note that in above cmd I updated the --scenario to "capsule" from "foreman-proxy-content" and got following issue:


Execution of '/usr/bin/yum install -y capsule_server.redhat.com-apache' returned 1: Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package capsule_server.redhat.com-apache available.
 Nothing to do
/usr/share/ruby/vendor_ruby/puppet/util/execution.rb:219:in `execute'
/usr/share/ruby/vendor_ruby/puppet/provider/command.rb:23:in `execute'
/usr/share/ruby/vendor_ruby/puppet/provider.rb:237:in `block in has_command'
/usr/share/ruby/vendor_ruby/puppet/provider.rb:463:in `block in create_class_and_instance_method'
/usr/share/katello-installer-base/modules/certs/lib/puppet/provider/katello_ssl_tool.rb:80:in `deploy!'
/usr/share/katello-installer-base/modules/certs/lib/puppet/provider/katello_ssl_tool.rb:18:in `create'
/usr/share/ruby/vendor_ruby/puppet/property/ensure.rb:16:in `block in defaultvalues'
/usr/share/ruby/vendor_ruby/puppet/property.rb:197:in `call_valuemethod'
/usr/share/ruby/vendor_ruby/puppet/property.rb:498:in `set'
/usr/share/ruby/vendor_ruby/puppet/property.rb:581:in `sync'
/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:204:in `sync'
/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:128:in `sync_if_needed'
/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:81:in `perform_changes'
/usr/share/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:204:in `apply'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:217:in `eval_resource'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in `call'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
/usr/share/ruby/vendor_ruby/puppet/util.rb:335:in `block in thinmark'
/usr/share/ruby/benchmark.rb:296:in `realtime'
/usr/share/ruby/vendor_ruby/puppet/util.rb:334:in `thinmark'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:147:in `block in evaluate'
/usr/share/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/usr/share/ruby/vendor_ruby/puppet/transaction.rb:138:in `evaluate'
/usr/share/gems/gems/kafo-2.0.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:169:in `block in apply'
/usr/share/ruby/vendor_ruby/puppet/util/log.rb:149:in `with_destination'
/usr/share/ruby/vendor_ruby/puppet/transaction/report.rb:112:in `as_logging_destination'
/usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:168:in `apply'
/usr/share/ruby/vendor_ruby/puppet/configurer.rb:120:in `block in apply_catalog'
/usr/share/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
/usr/share/ruby/benchmark.rb:296:in `realtime'

Comment 3 Sachin Ghai 2017-06-29 05:42:58 UTC
Closing this issue as generated the certs w/ cmd:

capsule-certs-generate --node-fqdn $CAPSULE_FQDN --certs-tar ~/$CAPSULE_FQDN-certs.tar

this time we tried 
capsule-certs-generate --foreman-proxy-fqdn $CAPSULE_FQDN --certs-tar ~/$CAPSULE_FQDN-certs.tar
 and we didn't face the above reported issue.