Skip to content

Commit

Permalink
Drop cpinit
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Mar 26, 2024
1 parent 1a26d77 commit a04117e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 39 deletions.
8 changes: 0 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@
# @param java_package
# Use in conjunction with java_home to specify the JVM used by Tomcat
#
# @param wget_version
# Version of wget to install
#
# @param run_init
# If the init api should be called on Candlepin
#
# @param adapter_module
# Candlepin adapter implementations to inject into the java runtime
#
Expand Down Expand Up @@ -210,8 +204,6 @@
Array[String] $tls_versions = ['1.2'],
Optional[String[1]] $java_package = undef,
String $version = 'present',
String $wget_version = 'present',
Boolean $run_init = false,
Optional[String] $adapter_module = undef,
Boolean $enable_hbm2ddl_validate = true,
Boolean $enable_basic_auth = true,
Expand Down
4 changes: 0 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@
Package['pki-core'] -> Package['candlepin-selinux']
}
}

if $candlepin::run_init {
stdlib::ensure_packages(['wget'], { ensure => $candlepin::wget_version, })
}
}
11 changes: 0 additions & 11 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,4 @@
hasstatus => true,
hasrestart => true,
}

if $candlepin::run_init {
exec { 'cpinit':
# tomcat startup is slow - try multiple times (the initialization service is idempotent)
command => "/usr/bin/wget --no-check-certificate --no-proxy --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- https://localhost:${candlepin::ssl_port}/candlepin/admin/init > /var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done",
require => [Package['wget'], Service['tomcat']],
creates => '/var/lib/candlepin/cpinit_done',
# timeout is roughly "wait" * "tries" from above
timeout => 800,
}
}
}
16 changes: 0 additions & 16 deletions spec/classes/candlepin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# install
it { is_expected.to contain_class('candlepin::install') }
it { is_expected.to contain_package('candlepin').with_ensure('present') }
it { is_expected.not_to contain_package('wget') }

if facts[:os]['release']['major'] == '8'
it { is_expected.to contain_package('pki-core').that_comes_before('Package[candlepin]') }
Expand Down Expand Up @@ -105,7 +104,6 @@
# service
it { is_expected.to contain_class('candlepin::service') }
it { is_expected.to contain_service('tomcat') }
it { is_expected.not_to contain_exec('cpinit') }
it { is_expected.to contain_service('tomcat').with_ensure('running') }
end

Expand Down Expand Up @@ -394,20 +392,6 @@
end
end

context 'with run_init false' do
let :params do
{run_init: true}
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_service('tomcat') }
it do
is_expected.to contain_exec('cpinit')
.that_requires(['Package[wget]', 'Service[tomcat]'])
.that_subscribes_to(['Concat[/etc/candlepin/candlepin.conf]', 'File[/etc/tomcat/server.xml]'])
end
end

describe 'notify' do
let :pre_condition do
<<-EOS
Expand Down

0 comments on commit a04117e

Please sign in to comment.