All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPDK] for primary/secondary check
@ 2017-12-14  4:43 liupan1234
  0 siblings, 0 replies; 2+ messages in thread
From: liupan1234 @ 2017-12-14  4:43 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

Hi All,


I have one question about multi-process.


The primary/secondary check is based the flock of /var/run/.spdkX_config. Let's see the case: when the primary crash, the flock will be released, and the secondary is still running there with shared memory. When I invoke origin primary process again, it will get flock, treat itself as primary and initialize shared memory again, which is not what I want: will cause secondary process crash.


Do you have any method for me to know if there is any secondary process running?


Great thanks
Pan

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 797 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [SPDK] for primary/secondary check
@ 2017-12-15  3:40 Cao, Gang
  0 siblings, 0 replies; 2+ messages in thread
From: Cao, Gang @ 2017-12-15  3:40 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Hi Pan,

The short term solution is that in this case (rely on some ways from the application management to know existing secondary and no primary there), explicitly start the new process as the secondary process with the parameter --proc-type = secondary.

Will also look detailed into this issue to see how to make the changes in the code level to automatically detect and handle this situation.

Thanks,
Gang

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of liupan1234
Sent: Thursday, December 14, 2017 12:43 PM
To: spdk(a)lists.01.org
Subject: [SPDK] for primary/secondary check

Hi All,

I have one question about multi-process.

The primary/secondary check is based the flock of /var/run/.spdkX_config. Let's see the case: when the primary crash, the flock will be released, and the secondary is still running there with shared memory. When I invoke origin primary process again, it will get flock, treat itself as primary and initialize shared memory again, which is not what I want: will cause secondary process crash.

Do you have any method for me to know if there is any secondary process running?

Great thanks
Pan




[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 6426 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-15  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14  4:43 [SPDK] for primary/secondary check liupan1234
2017-12-15  3:40 Cao, Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.