Skip to content

Commit 1b0cb11

Browse files
committed
Debug the remaining containers after cnf_installation2
It adds logs to debug the next issues which will help protecting them in a 2nd PR. According to /var/log/syslog, it should be the same issues as seen when deleting the kind clusters Container failed to exit within 10s of kill - trying direct SIGKILL Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
1 parent a1ca483 commit 1b0cb11

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

spec/setup_spec.cr

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ describe "Installation" do
314314

315315
begin
316316
# Start registry
317-
DockerClient.run("rm -f oci-reg >/dev/null 2>&1 || true")
318317
DockerClient.run(
319318
"run -d --name oci-reg \
320319
-p #{local_registry_port}:5000 \
@@ -347,7 +346,9 @@ describe "Installation" do
347346
result[:status].success?.should be_true
348347
(/CNF installation complete/ =~ result[:output]).should_not be_nil
349348
ensure
350-
DockerClient.run("rm -f oci-reg >/dev/null 2>&1 || true")
349+
result = DockerClient.run("rm -f oci-reg")
350+
Log.for("verbose").debug { "#{result} #{result[:output]}" }
351+
result[:status].success?.should be_true
351352
FileUtils.rm_rf(tgz) rescue nil
352353

353354
result = ShellCmd.cnf_uninstall
@@ -361,7 +362,6 @@ describe "Installation" do
361362

362363
begin
363364
# Start ChartMuseum with basic auth
364-
DockerClient.run("rm -f cm >/dev/null 2>&1 || true")
365365
DockerClient.run(
366366
"run -d --name cm \
367367
-p #{chart_museum_port}:8080 \
@@ -392,7 +392,9 @@ describe "Installation" do
392392
result[:status].success?.should be_true
393393
(/CNF installation complete/ =~ result[:output]).should_not be_nil
394394
ensure
395-
DockerClient.run("rm -f cm >/dev/null 2>&1 || true")
395+
result = DockerClient.run("rm -f cm")
396+
Log.for("verbose").debug { "#{result} #{result[:output]}" }
397+
result[:status].success?.should be_true
396398
FileUtils.rm_rf(tgz) rescue nil
397399

398400
result = ShellCmd.cnf_uninstall
@@ -440,7 +442,6 @@ describe "Installation" do
440442

441443
# Start registry (mTLS)
442444
config_path = "sample-cnfs/sample_tls_repo/config.yml"
443-
DockerClient.run("rm -f oci-reg-mtls >/dev/null 2>&1 || true")
444445
DockerClient.run(
445446
"run -d --name oci-reg-mtls " \
446447
"-p #{registry_port}:5000 " \
@@ -474,7 +475,9 @@ describe "Installation" do
474475
result[:status].success?.should be_true
475476
(/CNF installation complete/ =~ result[:output]).should_not be_nil
476477
ensure
477-
DockerClient.run("rm -f oci-reg-mtls >/dev/null 2>&1 || true")
478+
result = DockerClient.run("rm -f oci-reg-mtls")
479+
Log.for("verbose").debug { "#{result} #{result[:output]}" }
480+
result[:status].success?.should be_true
478481
FileUtils.rm_rf(tls_dir) rescue nil
479482
FileUtils.rm_rf(tgz) rescue nil
480483
prev_proxy.each { |k, v| v.try { |s| ENV[k] = s } || ENV.delete(k) }

0 commit comments

Comments
 (0)