Skip to content

Instantly share code, notes, and snippets.

capsule-certs-generate --capsule-fqdn "cap.example.com" --certs-tar "~/cap.example.com-certs.tar"
Installing Done [100%] [....................................................]
Success!
To finish the installation, follow these steps:
If you do not have the smartproxy registered to the Katello instance, then please do the following:
1. yum -y localinstall http://katello.examle.com/pub/katello-ca-consumer-latest.noarch.rpm
2. subscription-manager register --org "Default_Organization"
@palmertime
palmertime / katello.log
Created August 19, 2016 18:31
Error when upgrading to new cert without CSR
[ INFO 2016-08-19 10:08:16 main] Executing hooks in group post
[DEBUG 2016-08-19 10:08:16 main] Hook /usr/share/katello-installer-base/hooks/post/10-post_install.rb returned nil
[DEBUG 2016-08-19 10:08:16 main] Hook /usr/share/katello-installer-base/hooks/post/30-upgrade.rb returned nil
[ INFO 2016-08-19 10:08:16 main] All hooks in group post finished
[DEBUG 2016-08-19 10:08:16 main] Exit with status code: 1 (signal was 1)
[ERROR 2016-08-19 10:08:16 main] Errors encountered during run:
[ERROR 2016-08-19 10:08:16 main] "" is not an absolute path. at /usr/share/katello-installer-base/modules/certs/manifests/init.pp:116 on node katello.example.com
[ERROR 2016-08-19 10:08:16 main] "" is not an absolute path. at /usr/share/katello-installer-base/modules/certs/manifests/init.pp:116 on node katello.example.com
[DEBUG 2016-08-19 10:08:16 main] Cleaning /etc/katello-installer/d20160819-6918-1pnfav0
[DEBUG 2016-08-19 10:08:16 main] Cleaning /tmp/default_values.yaml
@palmertime
palmertime / Pulp Sync Error
Created August 19, 2016 15:43
Pulp error after updating WebUI certs.
Action:
Actions::Pulp::Consumer::SyncCapsule
Input:
{"capsule_id"=>3,
"repo_pulp_id"=>"XXX-CoreRelease-XXX-Content",
"remote_user"=>"admin",
"remote_cp_user"=>"admin"}
@palmertime
palmertime / production.log
Created August 16, 2016 20:23
Error when using Merge default and Merge overrides
2016-08-16 13:20:42 [app] [W] Failed to generate external nodes for host.example.com
| NoMethodError: undefined method `deep_merge!' for #<String:0x007f272e631788>
| /usr/share/foreman/app/services/classification/base.rb:227:in `block in update_hash_matcher'
| /usr/share/foreman/app/services/classification/base.rb:222:in `reverse_each'
| /usr/share/foreman/app/services/classification/base.rb:222:in `update_hash_matcher'
| /usr/share/foreman/app/services/classification/base.rb:61:in `block in values_hash'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
| /usr/share/foreman/app/services/classification/base.rb:39:in `values_hash'
| /usr/share/foreman/app/services/classification/class_param.rb:5:in `enc'
Facter.add('yumname') do
setcode do
Facter.value(:operatingsystem)
end
end
---
classes: {}
parameters:
puppetmaster: kcap1.example.com
organization: example
root_pw:
foreman_env: production
foreman_subnets: []
foreman_interfaces:
- mac: 00:50:56:87:20:be
pkg_url => 'https://username:password@rpm.datastax.com/enterprise',
## But the username is an email and then errors on 2 @ symbols
pkg_url => 'https://name@example.com:password@rpm.datastax.com/enterprise',
## I have also tried %40 but errors there too.
@palmertime
palmertime / foreman-rake console
Last active October 20, 2015 21:16
Fix for validation error when creating a CV version
User.current = User.first
Katello::ContentViewPuppetEnvironment.where(:puppet_environment_id => nil).where("environment_id is not null").each do |cvpe|
env = Environment.where(:name => cvpe.generate_puppet_env_name).first
if env.nil?
env = Environment.create(:name => 'foo', :locations => [Location.default_location], :organizations => [cvpe.content_view.organization])
end
env.organizations << cvpe.content_view.organization unless env.organizations.include?(cvpe.content_view.organization)
env.locations << Location.default_location unless env.locations.include?(Location.default_location)
cvpe.puppet_environment = env
cvpe.save!
2015-10-20 11:02:37 [app] [I]
|
| Started POST "/katello/api/v2/content_views/30/publish?organization_id=3" for XXX.XXX.XXX.XXX at 2015-10-20 11:02:37 -0700
2015-10-20 11:02:37 [app] [I] Processing by Katello::Api::V2::ContentViewsController#publish as JSON
2015-10-20 11:02:37 [app] [I] Parameters: {"id"=>"30", "organization_id"=>"3", "api_version"=>"v2", "content_view"=>{"id"=>"30"}}
2015-10-20 11:02:37 [foreman-tasks/action] [E] Validation failed: Name has already been taken (ActiveRecord::RecordInvalid)
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
describe 'hosts_file' do
let(:params) do {
:hosts_fqdn_aliases => ['test1.example.com','test1'],
'hosts_resources' => {
'extra' => {
'name' => 'extra.example.com',
'host_aliases' => ['extra', 'blah', 'blah.examplecar.com', 'blah.example.com'],
'ip' => '10.10.10.11',
}
},