diff --git a/config/foreman.hiera/common.yaml b/config/foreman.hiera/common.yaml index 543b8376..6a717c88 100644 --- a/config/foreman.hiera/common.yaml +++ b/config/foreman.hiera/common.yaml @@ -8,8 +8,6 @@ dhcp::config_comment: | Foreman application and in this configuration preferably via foreman-installer. Use custom-hiera.yaml for multiple subnets. -mongodb::server::set_parameter: "{diagnosticDataCollectionEnabled: false}" - foreman::config::apache::proxy_params: retry: '0' timeout: '900' diff --git a/config/foreman.hiera/family/RedHat-7.yaml b/config/foreman.hiera/family/RedHat-7.yaml index ec894429..105f61f5 100644 --- a/config/foreman.hiera/family/RedHat-7.yaml +++ b/config/foreman.hiera/family/RedHat-7.yaml @@ -1,15 +1,4 @@ --- -mongodb::globals::server_package_name: 'rh-mongodb34-syspaths' -mongodb::client::package_name: 'rh-mongodb34-mongodb' -mongodb::globals::service_name: 'rh-mongodb34-mongod' -mongodb::server::config: '/etc/opt/rh/rh-mongodb34/mongod.conf' -mongodb::server::dbpath: '/var/lib/mongodb' -mongodb::server::syslog: true -mongodb::server::logpath: false -mongodb::server::config_template: 'mongodb/mongodb.conf.2.6.erb' -mongodb::server::manage_pidfile: false -mongodb::server::pidfilepath: '/var/opt/rh/rh-mongodb34/run/mongodb/mongod.pid' - redis::globals::scl: rh-redis5 postgresql::globals::version: '12' diff --git a/config/foreman.hiera/tuning/common.yaml b/config/foreman.hiera/tuning/common.yaml index 1bdb5c5e..cd07318e 100644 --- a/config/foreman.hiera/tuning/common.yaml +++ b/config/foreman.hiera/tuning/common.yaml @@ -22,6 +22,3 @@ postgresql::server::config_entries: log_line_prefix: '%t ' log_min_duration_statement: 1000 log_rotation_size: 200000 - -mongodb::server::config_data: - storage.wiredTiger.engineConfig.cacheSizeGB: "%{facts.kafo.scenario.custom.mongo_cache_size}" diff --git a/hooks/boot/04-services.rb b/hooks/boot/04-services.rb index 5cc09fee..97f80e92 100644 --- a/hooks/boot/04-services.rb +++ b/hooks/boot/04-services.rb @@ -2,19 +2,17 @@ module ServicesHookContextExtension ALL_POSSIBLE_SERVICES = [ - '*mongo*', # Used by Pulp 2 '*redis*', # Used by Foreman/Dynflow and Pulpcore 'apache.service', # Apache on Debian 'dynflow*', 'foreman*', 'httpd.service', # Apache on Red Hat 'postgresql*', # Used by Foreman/Dynflow and Pulpcore - 'pulp*', - 'qdrouterd.service', # Used by Pulp 2 - 'qpidd.service', # Used by Pulp 2 + 'pulpcore*', + 'qdrouterd.service', # Used by Katello for katello-agent + 'qpidd.service', # Used by Katello for katello-agent 'smart_proxy_dynflow_core.service', # Used by Foreman Proxy 'tomcat.service', # Candlepin - 'squid.service', # Used by Pulp 2 ].freeze def start_services(services) diff --git a/hooks/pre_commit/14-mongo-cache-size.rb b/hooks/pre_commit/14-mongo-cache-size.rb deleted file mode 100644 index 5c968777..00000000 --- a/hooks/pre_commit/14-mongo-cache-size.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Setting Default Mongo WiredTiger Engine cache size to be 20% of total memory -# See https://access.redhat.com/solutions/4505561 -# See https://docs.mongodb.com/manual/core/wiredtiger/#memory-use -if katello_enabled? || devel_scenario? - MONGO_CACHE_SIZE_FACT = 'mongo_cache_size'.freeze - - current_mongo_cache_size = get_custom_fact(MONGO_CACHE_SIZE_FACT) - required_mongo_cache_size = (facts[:memory][:system][:total_bytes] * 0.2 / 1024 / 1024 / 1024).round(2) - - if current_mongo_cache_size != required_mongo_cache_size - store_custom_fact(MONGO_CACHE_SIZE_FACT, required_mongo_cache_size) - # Store the app config to disk - kafo.config.configure_application - end -end diff --git a/katello/hooks/pre/15-check-disk.rb b/katello/hooks/pre/15-check-disk.rb deleted file mode 100644 index 75ebbbd0..00000000 --- a/katello/hooks/pre/15-check-disk.rb +++ /dev/null @@ -1,19 +0,0 @@ -if module_enabled?('foreman_proxy_content') - DISK_SIZE = 'The installation requires at least 5G of storage.'.freeze - MONGODB_DIR = '/var/lib/mongodb'.freeze - MIN_FREE_KB = 5 * 1024 * 1024 - - # Error out if there is not 5 gigs of free space. - # If mongo is installed, which is the big item, then add - # the current mongo space to the total - begin - total_space = `df -k --total --exclude-type=tmpfs --output=avail`.split("\n")[-1].to_i - mongo_size = File.directory?(MONGODB_DIR) ? `du -k -s #{MONGODB_DIR}`.split[0].to_i : 0 - if (total_space + mongo_size) < MIN_FREE_KB - $stderr.puts DISK_SIZE - kafo.class.exit 1 - end - rescue StandardError - $stderr.puts 'Failed to verify available disk space' - end -end