Skip to content

Commit 995ca9c

Browse files
(SIMP-10407) Enable dirsrv.target (#12)
* Fixed * Ensure that dirsrv.target is enabled so that all instances start at boot * Temporarily allow OEL tests to fail in GitLab, as the OEL modular repos are currently broken SIMP-10407 #close
1 parent 5776bc6 commit 995ca9c

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,17 @@ pup6.pe-fips:
360360
pup6.pe-oel:
361361
<<: *pup_6_pe
362362
<<: *acceptance_base
363+
# OEL modularity repos are broken
364+
allow_failure: true
363365
script:
364366
- 'bundle exec rake beaker:suites[default,oel]'
365367

366368
pup6.pe-oel-fips:
367369
<<: *pup_6_pe
368370
<<: *acceptance_base
369371
<<: *with_SIMP_ACCEPTANCE_MATRIX_LEVEL_3
372+
# OEL modularity repos are broken
373+
allow_failure: true
370374
script:
371375
- 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]'
372376

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
* Tue Aug 03 2021 Trevor Vaughan <tvaughan@onyxoint.com> - 0.1.1
2+
- Fixed
3+
- Ensure that dirsrv.target is enabled so that all 389ds instances start at boot
4+
15
* Tue Jun 15 2021 Trevor Vaughan <tvaughan@onyxpoint.com> - 0.1.0
26
- Initial release

manifests/instance/service.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
$_instance_name = split($title, /^(dirsrv@)?slapd-/)[-1]
1313

14+
# Ensure that services start at boot time
15+
ensure_resource('service', 'dirsrv.target', { enable => true })
16+
1417
ensure_resource('service', "dirsrv@${_instance_name}",
1518
{
1619
ensure => $ensure,

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simp-ds389",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"author": "SIMP Team",
55
"summary": "Management of 389 Directory Server",
66
"license": "Apache-2.0",

spec/acceptance/suites/default/00_default_spec.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@
137137
apply_manifest_on(host, manifest, catch_changes: true)
138138
end
139139

140+
it 'is running the dirsrv@test_in service' do
141+
status = YAML.safe_load(
142+
on(host, 'puppet resource --to_yaml service dirsrv@test_in')
143+
.stdout
144+
)
145+
146+
expect(status['service']['dirsrv@test_in']['ensure']).to eq('running')
147+
end
148+
140149
it 'can login to 389DS' do
141150
# rubocop:disable Layout/LineLength
142151
on(host, %(ldapsearch -x -y "#{root_dn_password_file}" -D "#{hieradata['ds389::instances'][ds_root_name]['root_dn']}" -H ldapi://%2fvar%2frun%2fslapd-#{ds_root_name}.socket -b "cn=tasks,cn=config"))
@@ -168,6 +177,16 @@
168177
expect( scrap_details['rootdn'] ).to eq('cn=Scrap_Admin')
169178
expect( scrap_details.key?('securePort') ).to be false
170179
end
180+
181+
it 'starts after reboot' do
182+
host.reboot
183+
status = YAML.safe_load(
184+
on(host, 'puppet resource --to_yaml service dirsrv@test_in')
185+
.stdout
186+
)
187+
188+
expect(status['service']['dirsrv@test_in']['ensure']).to eq('running')
189+
end
171190
end
172191

173192
context 'when removing server instances' do

0 commit comments

Comments
 (0)