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

Default value of Indexing.NuGetPackagesPath may prevent startup (especially with embedded) #15694

Open
mikeminutillo opened this issue Jan 25, 2023 · 4 comments

Comments

@mikeminutillo
Copy link

When Raven server starts up it validates that all PathSetting values that aren't ReadOnlyPath are writeable.

Most path settings default to null, so if you don't explicitly set them, they aren't subjected to this validation.

The ones (that I found) that aren't are:

  • Logs.Path
  • Core.DataDirectory
  • Indexing.NuGetPackagesPath

These all seem have default values that are relative, and it looks like those are relative to the server binary folder. Unfortunately this location may not be writeable. If it's not, then the server fails to start.

The first two are exposed on the embedded ServerOptions so it's fairly easy to see how to change them (and that they need to be changed). The last one needs to be manually configured. For our embedded instance, I did this:

serverOptions.CommandLineArgs.Add("--Indexing.NuGetPackagesPath=\"somewhere-writeable\"");
@garayx
Copy link
Contributor

garayx commented Jan 25, 2023

We assume the user who run the RavenDB process has write permissions into its folder. In any case you can change the DataDir & LogsPath:
https://ravendb.net/docs/article-page/5.1/csharp/server/configuration/core-configuration#datadir
https://ravendb.net/docs/article-page/5.1/csharp/server/configuration/logs-configuration#logs.path

@ayende
Copy link
Member

ayende commented Jan 25, 2023

The issue I think is that he wants the nuget package to also be exposed as a property

@mikeminutillo
Copy link
Author

That would have been helpful. It might be worth considering a global property to use as a root folder that the default data dir, log path, and nuget packages path are all based off. The default value of that could be the server binary folder, but if it's changed it would shift everything at once. That way we won't get caught out new config entries in the future.

@jmajoor
Copy link

jmajoor commented Apr 24, 2024

The issue that I try to address is similar. Many containers are required to run with read only root filesystems. It is therefor important to know where files are being written and how to configure them (either to a writable location or disable them).

Obviously you have the data directory that needs to be placed on a writable persistent volume, but then you have other (temporary) files.

For example there is also Logs.Microsoft.ConfigurationPath, though you can disable that with Logs.Microsoft.Disable

What surprises me is that it makes this write attempt for NuGet, packages even though I don't have a license for that. That configuration should be disabled by default if you don't have a license that includes nuget.

For me it is important to at least have a list of settings that require write permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants