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

Set flag in oc_preferences after copying skeleton files #23430

Closed
PVince81 opened this issue Mar 21, 2016 · 8 comments
Closed

Set flag in oc_preferences after copying skeleton files #23430

PVince81 opened this issue Mar 21, 2016 · 8 comments

Comments

@PVince81
Copy link
Contributor

It's pointless to copy skeleton files over and over again when the home folder got missing at login time.
Also, the current logic makes it very tricky to detect whenever an individual folder is missing temporarily.

I suggest that whenever the home folder is missing and before the skeleton gets copied, we make a call to oc_preferences to check for a "skeleton_done" flag. If the flag is there, throw StorageNotAvailableException for the home folder.
Else, create the skeleton.

@MorrisJobke @icewind1991

@PVince81 PVince81 added this to the 9.1-current milestone Mar 21, 2016
@PVince81
Copy link
Contributor Author

Tricky part is the migration: go through every user and check if the home folder is there, if yes, set the flag to "oc_preferences" once.

@PVince81
Copy link
Contributor Author

Thinking of it, we already have a flag "lastLogin" in the oc_preferences table. If a value is there, it means the user logged in at least once, so they must have a home folder already (assuming that there was no error...)

@PVince81
Copy link
Contributor Author

In general I think we should try and detect intermittent unavailable home storage in many places in the code, or at least the critical code paths that might delete important stuff.

@icewind1991
Copy link
Contributor

I would prefer a separate entry for the skeleton, migration could be done per user after the current check if the skeleton is copied

@nickvergessen nickvergessen changed the title Set flag in oc_appconfig after copying skeleton files Set flag in oc_preferences after copying skeleton files Mar 22, 2016
@mmattel
Copy link
Contributor

mmattel commented Jun 8, 2016

👍

@PVince81 PVince81 modified the milestones: 9.2-next, 9.1-current Jun 15, 2016
@PVince81
Copy link
Contributor Author

Would also help solve #25212. It sometimes happen that some other process already puts files in the home.

@PVince81
Copy link
Contributor Author

Solved differently on 9.2 already using the last login value and a "first login" hook, closing.

#26206

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants