Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server: Running two skyd in same directory can lead to loss of data #167

Closed
martinmolin opened this issue Jun 11, 2021 · 2 comments · Fixed by #169 or #170
Closed

Server: Running two skyd in same directory can lead to loss of data #167

martinmolin opened this issue Jun 11, 2021 · 2 comments · Fixed by #169 or #170
Labels
A-independent Architecture independent issue/PR C-bug Something isn't working C-reliability This issue/PR relates to reliability C-storage Relating to storage D-server Related to the server P-high High priority S-waiting-on-author Waiting on author for more details

Comments

@martinmolin
Copy link

Description of bug
Currently it is possible to start two skyd processes from the same directory. This will lead to data being overwritten by the other process.

Steps to reproduce
Steps to reproduce the behavior:
For example:

  1. Run skyd
  2. Run skyd again
  3. Store some data on both servers
  4. When both skydare closed you will end up with data for only the last server closed

Expected behavior
Stop any subsequent skyd process from starting up if there is already one running in that directory.

Meta

  • Release tag:
    None
  • Branch:
  • Commit ID:
  • Operating system:
@martinmolin martinmolin added C-bug Something isn't working D-server Related to the server labels Jun 11, 2021
@ohsayan
Copy link
Member

ohsayan commented Jun 11, 2021

@glydr remind

@glydr glydr added the S-waiting-on-maintainers This issue/PR is awaiting a response from the maintainers label Jun 11, 2021
ohsayan added a commit that referenced this issue Jun 12, 2021
@ohsayan ohsayan added A-independent Architecture independent issue/PR C-reliability This issue/PR relates to reliability C-storage Relating to storage P-high High priority and removed S-waiting-on-maintainers This issue/PR is awaiting a response from the maintainers labels Jun 12, 2021
glydr pushed a commit that referenced this issue Jun 12, 2021
* Deter other processes from using the same data dir

For more information, see #167

* Don't lock `pid_file`

Windows has mandatory locking so second instance won't be able to read
the PID of the other process. We'll just keep the file descriptor/handle
open
@ohsayan
Copy link
Member

ohsayan commented Jun 12, 2021

The pid file needs cleaning up in the event any other runtime (after the pre-startup stage) failures occur. @glydr remind

@ohsayan ohsayan reopened this Jun 12, 2021
@glydr glydr added the S-waiting-on-maintainers This issue/PR is awaiting a response from the maintainers label Jun 12, 2021
@ohsayan ohsayan added S-waiting-on-author Waiting on author for more details and removed S-waiting-on-maintainers This issue/PR is awaiting a response from the maintainers labels Jun 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-independent Architecture independent issue/PR C-bug Something isn't working C-reliability This issue/PR relates to reliability C-storage Relating to storage D-server Related to the server P-high High priority S-waiting-on-author Waiting on author for more details
Projects
None yet
3 participants