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

python installer doesn't create or verify existence of dataverse.files.directory #9572

Closed
donsizemore opened this issue May 4, 2023 · 5 comments · Fixed by #9819
Closed
Milestone

Comments

@donsizemore
Copy link
Contributor

The installer defaults to
os.environ['FILES_DIR'] = config.get('glassfish','GLASSFISH_DIRECTORY') + "/glassfish/domains/domain1/files"
in https://github.com/IQSS/dataverse/blob/develop/scripts/installer/installAppServer.py#L43
which is fine.

Then https://guides.dataverse.org/en/5.10/installation/installation-main.html cautions make sure the user running the installer has write permission to: <snip> your jvm-option specified files.dir. It might be polite for the installer to test for at minimum the existence of files.dir, and squawk an appropriate caution in Section 9, "Declare Victory," letting admins know to either create the directory or update the jvm-option.

@poikilotherm
Copy link
Contributor

Just a thought: would it make sense to add this to some startup code in Java? If write goes away, you're in trouble. And it would be useful in a container as well

@donsizemore
Copy link
Contributor Author

@poikilotherm I considered proposing making it configurable via default.config, but small chunks. Also, I have two installations with a specified but non-existent dataverse.files.directory; I'm intentionally sitting on creating the directory until something blows up.

@poikilotherm
Copy link
Contributor

poikilotherm commented May 4, 2023

Well my question kind of went into the direction of verifying configuration and failing the deployment if something is not right. That is kind of a future vision for me anyway.

A non-existing or non-writeable directory making the deployment bail out with errors would have saved us some investigation in Github Actions and might save a future sysadmin's Friday because it doesn't fail badly when the app seems to be running fine until you try to upload some thing...

@donsizemore
Copy link
Contributor Author

@poikilotherm I support this. Feel free to edit my issue and title as you see fit?

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Jun 21, 2023
…IQSS#9572

Starting with important local storage locations for the Dataverse application,
this service uses EJB startup mechanisms to verify configuration bits on startup.

Checks for the temp storage location and JSF upload location as crucial parts
of the app, which, if not exist or write protected, while only cause errors and
failures on the first data upload attempt. This is not desirable as it might cause
users to be blocked.
@poikilotherm
Copy link
Contributor

poikilotherm commented Aug 23, 2023

@donsizemore I created #9819 which is mostly to address #9662, but to ensure smooth operation I also added verification for the other directories. Does this solve your issue you described above? (Otherwise you/me please remove the "Closes" from the PR)

@pdurbin pdurbin added this to the 6.1 milestone Oct 13, 2023
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

Successfully merging a pull request may close this issue.

3 participants