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

Fail early if file system cannot be mounted due to network connectivity. #50

Closed
harababurel opened this issue Jan 11, 2019 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@harababurel
Copy link
Owner

If there is no internet connection, GCSF fails to populate the file system which results in the mountpoint containing nothing but an empty "Shared with me" directory.

GCSF should fail early in this case, to make it clear that mounting failed. This will also help systemd detect the process death and restart it accordingly.

@harababurel harababurel added enhancement New feature or request good first issue Good for newcomers labels Jan 11, 2019
@harababurel harababurel self-assigned this Jan 11, 2019
@kcallis
Copy link

kcallis commented Jan 11, 2019

Thank you for the fast response and resolution! I had just subscribed to the mailing list and saw the message about using the systemd service from another user. I am wondering if the service will work for multiple users? For instance, I log in and the gcsf.service mounts the filesystem and life is good. I log out and I assume my Google Drive will umount. If my son logs into the host, will the service automatically mount his google drive (he has already authenticated)?

@harababurel
Copy link
Owner Author

Implemented 33f55f3.

@harababurel
Copy link
Owner Author

Thank you for the fast response and resolution! I had just subscribed to the mailing list and saw the message about using the systemd service from another user. I am wondering if the service will work for multiple users? For instance, I log in and the gcsf.service mounts the filesystem and life is good. I log out and I assume my Google Drive will umount. If my son logs into the host, will the service automatically mount his google drive (he has already authenticated)?

Released this feature in 0.1.21 (c8d8406). After updating to this version, GCSF should integrate with systemd a bit more nicely.

To answer your question: the setup you've described should work, provided you make some configuration changes. Specifically, each user should have their own service file with the corresponding session name, mountpoint, User and Group. AFAIK, the service is not started at login time, but rather as soon as possible (i.e. after network.target is running, which is unrelated to users logging in). It's also not stopped at logout -- you have to follow these steps to make it happen.

Depending on your privacy concerns, it may also be acceptable to simply enable the service for each user and have all instances run at the same time regardless of who is logged on.

Another alternative is to manually run systemctl start and systemctl stop after logging in and before logging out, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants