when publishing a content view if you get:
Validation failed: Puppet environment can't be blank
or
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
#!/bin/bash | |
# Works with Satellite 6.5 and later | |
# https://access.redhat.com/solutions/2273561 | |
rm -f /etc/candlepin/certs/keystore | |
rm -f /etc/candlepin/certs/truststore | |
rm -f /etc/tomcat/truststore | |
rm -f /etc/candlepin/certs/amqp/* | |
rm -rf /etc/pki/katello/nssdb/* |
when publishing a content view if you get:
Validation failed: Puppet environment can't be blank
or
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
namespace :taskbench do | |
desc <<~END_DESC | |
Loads up some tasks | |
END_DESC | |
def parallelize(param_lists) | |
max_number_of_forks ||= ENV['forks'].to_i || 10 | |
page = 0 | |
page_size = param_lists.length/max_number_of_forks |
namespace :taskbench do | |
desc <<-END_DESC | |
Loads up some tasks | |
END_DESC | |
def parallelize(param_lists, max_number_of_forks = 20) | |
page = 0 | |
page_size = max_number_of_forks |
namespace :taskbench do | |
desc <<-END_DESC | |
Loads up some tasks | |
END_DESC | |
task :hostupdate => :environment do | |
puts 'Starting task load..' | |
User.current = User.anonymous_admin | |
for y in 0..100 |
cat postgresql.conf |awk '{$1=$1};1' |grep -v "^#" | egrep -v "^[ ]*$|^#" |more |
# foreman-rake db:migrate --trace | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
TABLE dynflow_schema_info | |
rake aborted! | |
Sequel::Migrator::Error: More than 1 row in migrator table | |
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:590:in `schema_dataset' | |
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:444:in `initialize' |
#!!bin/bash | |
# requires 'bc' installed | |
# Sum up the RAM used by processes with given name | |
# eg: | |
# $ mem-process-sum postgres | |
# 1.6777 GB | |
ps aux | sort -nk6 |grep $1 | awk '{print $6}' | paste -sd+ | bc | awk '{$1=$1/(1024^2); print $1,"GB";}' |
while true; | |
do | |
hammer --no-headers --csv content-view list | grep -v "Default Org" | awk -F, '{print $1}' | xargs -I arg1 -n 1 hammer -u admin -p changeme content-view publish --id arg1; | |
done |
## Logging | |
ErrorLog "/var/log/httpd/foreman-ssl_error_ssl.log" | |
ServerSignature Off | |
CustomLog "/var/log/httpd/foreman-ssl_access_ssl.log" combined | |
# Add custom forwarded log to track origin IP addresses through a smart-proxy | |
CustomLog "/var/log/httpd/foreman-ssl_forwarded_ssl.log" forwarded | |