@@ -216,10 +216,10 @@ def wait_on_puppetdb_status(seconds = 240)
216
216
# Puppetserver Helpers
217
217
######################################################################
218
218
219
- def wait_on_puppetserver_status ( seconds = 180 )
219
+ def wait_on_puppetserver_status ( seconds = 180 , service_name = 'puppet' )
220
220
# puppetserver has a healthcheck, we can let that deal with timeouts
221
221
return retry_block_up_to_timeout ( seconds ) do
222
- status = get_container_status ( get_service_container ( 'puppet' ) )
222
+ status = get_container_status ( get_service_container ( service_name ) )
223
223
( status == 'healthy' || status == "'healthy'" ) ? 'healthy' :
224
224
raise ( "puppetserver stuck in #{ status } " )
225
225
end
@@ -237,11 +237,19 @@ def clean_certificate(agent_name)
237
237
# Puppet Agent Helpers
238
238
######################################################################
239
239
240
- def run_agent ( agent_name , network , server = get_container_hostname ( get_service_container ( 'puppet' ) ) )
240
+ # When testing with the `puppet/puppet-agent-alpine` image on windows
241
+ # systems with LCOW we had intermittent failures in DNS resolution that
242
+ # occurred fairly regularly. It seems to be specifically interaction
243
+ # between the base alpine (3.8 and 3.9) images with windows/LCOW.
244
+ #
245
+ # Two issues related to this issue are
246
+ # https://github.com/docker/libnetwork/issues/2371 and
247
+ # https://github.com/Microsoft/opengcs/issues/303
248
+ def run_agent ( agent_name , network , server = get_container_hostname ( get_service_container ( 'puppet' ) ) , ca = get_container_hostname ( get_service_container ( 'puppet' ) ) )
241
249
# setting up a Windows TTY is difficult, so we don't
242
250
# allocating a TTY will show container pull output on Linux, but that's not good for tests
243
251
STDOUT . puts ( "running agent #{ agent_name } in network #{ network } against #{ server } " )
244
- result = run_command ( "docker run --rm --network #{ network } --name #{ agent_name } --hostname #{ agent_name } puppet/puppet-agent-alpine agent --verbose --onetime --no-daemonize --summarize --server #{ server } " )
252
+ result = run_command ( "docker run --rm --network #{ network } --name #{ agent_name } --hostname #{ agent_name } puppet/puppet-agent-ubuntu agent --verbose --onetime --no-daemonize --summarize --server #{ server } --ca_server #{ ca } " )
245
253
return result [ :status ] . exitstatus
246
254
end
247
255
0 commit comments