mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-05-27 11:40:05 +00:00
fixes crashwatcher stop
This commit is contained in:
parent
0c961b8348
commit
92a5a1e361
@ -70,13 +70,13 @@ namespace KubernetesWorkflow
|
||||
using var client = new Kubernetes(config);
|
||||
while (!token.IsCancellationRequested)
|
||||
{
|
||||
token.WaitHandle.WaitOne(TimeSpan.FromSeconds(10));
|
||||
|
||||
if (HasContainerBeenRestarted(client))
|
||||
{
|
||||
DownloadCrashedContainerLogs(client);
|
||||
return;
|
||||
}
|
||||
|
||||
token.WaitHandle.WaitOne(TimeSpan.FromSeconds(10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -735,7 +735,10 @@ namespace KubernetesWorkflow
|
||||
throw new Exception($"Expected to find 1 pod by podLabel '{deployment.PodLabel}'. Found: {pods.Length}. " +
|
||||
$"Total number of pods: {allPods.Items.Count}. Their labels: {string.Join(Environment.NewLine, allLabels)}");
|
||||
}
|
||||
return pods[0];
|
||||
var pod = pods[0];
|
||||
if (pod.Status == null) throw new Exception("Pod status unknown");
|
||||
if (string.IsNullOrEmpty(pod.Status.PodIP)) throw new Exception("Pod IP unknown");
|
||||
return pod;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -26,9 +26,9 @@ namespace CodexPlugin
|
||||
public void Stop(bool waitTillStopped)
|
||||
{
|
||||
Log($"Stopping node...");
|
||||
crashWatcher.Stop();
|
||||
var workflow = tools.CreateWorkflow();
|
||||
workflow.Stop(pod, waitTillStopped);
|
||||
crashWatcher.Stop();
|
||||
onStop();
|
||||
Log("Stopped.");
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
using CodexPlugin;
|
||||
using CodexTests;
|
||||
using CodexTests;
|
||||
using NUnit.Framework;
|
||||
using System.Drawing;
|
||||
using Utils;
|
||||
|
||||
namespace CodexReleaseTests.DataTests
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user