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

FIX: /data creation in entrypoint #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

agonbar
Copy link
Collaborator

@agonbar agonbar commented May 16, 2021

to: @subspacecommunity/subspace-maintainers
cc: @subspacecommunity/subspace-maintainers
related to:
resolves:

Error if /data volume is not created via docker, the entrypoint tries to create /data/wireguard and fails.

Background

This would allow to launch the docker image without persistence

Changes

The entrypoint.sh file, add a -p to the mkdir

Testing

Launch the image without creating a volume, it would fail before.

@agonbar agonbar added the bug Something isn't working label May 16, 2021
@agonbar agonbar requested a review from a team May 16, 2021 21:45
@sonarcloud
Copy link

sonarcloud bot commented May 16, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@gchamon
Copy link

gchamon commented May 16, 2021

Why would you want to create subspace without persistence? Is this a feature we want? Could it come back and cause problems? What problem does launching without persistence acutally solves?

If we would accept this pr, maybe we should document it well that, even though subspace could be launch without persistence, that is not a recommended way.

Similarly, even if this pr wouldn't be merged, I think subspace should fail explicitly, and not relying on mkdir failing, showing that failing without persistent volume is an intended behaviour.

What do you think, @agonbar ?

@agonbar
Copy link
Collaborator Author

agonbar commented May 16, 2021

Hmmmm, i'd like to be able to launch without persistence for easiness in the development. But I agree that we need to warn the user when this happens and discourage people from using it this way, I'll give some thought on how to show this to the user in a friendly manner.

@gchamon
Copy link

gchamon commented May 17, 2021

@agonbar I will stand by and wait for updates on this before reviewing. Thanks for considering my suggestions!

Copy link

@gchamon gchamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Warn user explicitly if launching subspace without persistent storage.
  • Add documentation to readme that users can launch without persistent storage, but that is not advisable in a production environment

@gchamon
Copy link

gchamon commented Jun 3, 2021

@agonbar do you need help documenting this change? I think this your suggestion here would be a welcome change

@agonbar
Copy link
Collaborator Author

agonbar commented Jun 3, 2021

It's fine, this is low priority and right now I spend all my spare time in testing the PRs, this project needs more automated tests, it would save me a lot of time.

@gchamon
Copy link

gchamon commented Jun 3, 2021

It's fine, this is low priority and right now I spend all my spare time in testing the PRs, this project needs more automated tests, it would save me a lot of time.

I will get to automating tests ASAP.

I can see unit tests being important, but we could do a whole sort of end to end tests using docker. I will open an issue to track that, or if one is already opened, I'll use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants