Ignite best practice for restarting k8s pod

classic Classic list List threaded Threaded
4 messages Options
vbm vbm
Reply | Threaded
Open this post in threaded view
|

Ignite best practice for restarting k8s pod

Hi,

I had raised this ticket:
https://issues.apache.org/jira/browse/IGNITE-13974


Currently I do not see any cleanup functions getting called when we do a
'kubectl delete pod'.

May I know, what is the best practice for restarting k8s ignite pod ?
How do we handle scenario when we need to scale down Ignite pods ? I think
internally when we do kubectl scale down it calls kubectl delete pod.


Regards,
Vishwas



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alexandr Shapkin Alexandr Shapkin
Reply | Threaded
Open this post in threaded view
|

RE: Ignite best practice for restarting k8s pod

Hi,

 

Thanks for the ticket. I’ll check that.

 

What configuration do you use, is it a persistent cluster or in-memory one?

Do you use an official Ignite image or a custom assembly?

 

'kubectl delete pod' should work fine here and forward KILL SIG to a running node internally.

Well, at least starting from 2.9 version.

 

 

From: [hidden email]
Sent: Wednesday, January 13, 2021 11:32 AM
To: [hidden email]
Subject: Ignite best practice for restarting k8s pod

 

Hi,

 

I had raised this ticket:

https://issues.apache.org/jira/browse/IGNITE-13974

 

 

Currently I do not see any cleanup functions getting called when we do a

'kubectl delete pod'.

 

May I know, what is the best practice for restarting k8s ignite pod ?

How do we handle scenario when we need to scale down Ignite pods ? I think

internally when we do kubectl scale down it calls kubectl delete pod.

 

 

Regards,

Vishwas

 

 

 

--

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

 

Alex Shapkin
vbm vbm
Reply | Threaded
Open this post in threaded view
|

Re: Ignite best practice for restarting k8s pod

Hi Alexandr,

Thanks for the response.

It is with native persistence being enabled.  Will there be any difference, with and without persistence ?
The docker image and the statefulset is created based on the below ignite documentation:

The docker image is based on ignite-2.9.0 release and we had put debug statements in onDisconnected method call but we do not see any
of those prints in the case of "kubectl delete pod"

Also what is the code in ignite which handles KILL SIG  ? 


Thanks & Regards,
Vishwas


On Fri, Jan 15, 2021 at 8:10 PM Alexandr Shapkin <[hidden email]> wrote:

Hi,

 

Thanks for the ticket. I’ll check that.

 

What configuration do you use, is it a persistent cluster or in-memory one?

Do you use an official Ignite image or a custom assembly?

 

'kubectl delete pod' should work fine here and forward KILL SIG to a running node internally.

Well, at least starting from 2.9 version.

 

 

From: [hidden email]
Sent: Wednesday, January 13, 2021 11:32 AM
To: [hidden email]
Subject: Ignite best practice for restarting k8s pod

 

Hi,

 

I had raised this ticket:

https://issues.apache.org/jira/browse/IGNITE-13974

 

 

Currently I do not see any cleanup functions getting called when we do a

'kubectl delete pod'.

 

May I know, what is the best practice for restarting k8s ignite pod ?

How do we handle scenario when we need to scale down Ignite pods ? I think

internally when we do kubectl scale down it calls kubectl delete pod.

 

 

Regards,

Vishwas

 

 

 

--

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

 

Raymond Wilson Raymond Wilson
Reply | Threaded
Open this post in threaded view
|

Re: Ignite best practice for restarting k8s pod

This is the pattern we use in IA C# 2.8.1:

    static async Task<int> Main(string[] args)
    {
      try
      {
        Console.WriteLine($"Service starting at {DateTime.Now}");

        var cancelTokenSource = new CancellationTokenSource();
        AppDomain.CurrentDomain.ProcessExit += (s, e) =>
        {
          Console.WriteLine("Exiting");
          cancelTokenSource.Cancel();
        };

        await Task.Delay(-1, cancelTokenSource.Token);
        return 0;
      }
      catch (TaskCanceledException)
      {
        // Don't care as this is thrown by Task.Delay()
        Console.WriteLine("Process exit via TaskCanceledException (SIGTERM)");
        return 0;
      }
      catch (Exception e)
      {
        Console.WriteLine($"Unhandled exception: {e}");
        Console.WriteLine($"Stack trace: {e.StackTrace}");
        return -1;
      }
    }

On Sat, Jan 16, 2021 at 7:22 PM Vishwas Bm <[hidden email]> wrote:
Hi Alexandr,

Thanks for the response.

It is with native persistence being enabled.  Will there be any difference, with and without persistence ?
The docker image and the statefulset is created based on the below ignite documentation:

The docker image is based on ignite-2.9.0 release and we had put debug statements in onDisconnected method call but we do not see any
of those prints in the case of "kubectl delete pod"

Also what is the code in ignite which handles KILL SIG  ? 


Thanks & Regards,
Vishwas


On Fri, Jan 15, 2021 at 8:10 PM Alexandr Shapkin <[hidden email]> wrote:

Hi,

 

Thanks for the ticket. I’ll check that.

 

What configuration do you use, is it a persistent cluster or in-memory one?

Do you use an official Ignite image or a custom assembly?

 

'kubectl delete pod' should work fine here and forward KILL SIG to a running node internally.

Well, at least starting from 2.9 version.

 

 

From: [hidden email]
Sent: Wednesday, January 13, 2021 11:32 AM
To: [hidden email]
Subject: Ignite best practice for restarting k8s pod

 

Hi,

 

I had raised this ticket:

https://issues.apache.org/jira/browse/IGNITE-13974

 

 

Currently I do not see any cleanup functions getting called when we do a

'kubectl delete pod'.

 

May I know, what is the best practice for restarting k8s ignite pod ?

How do we handle scenario when we need to scale down Ignite pods ? I think

internally when we do kubectl scale down it calls kubectl delete pod.

 

 

Regards,

Vishwas

 

 

 

--

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

 



--

Raymond Wilson
Solution Architect, Civil Construction Software Systems (CCSS)
11 Birmingham Drive | Christchurch, New Zealand
[hidden email]