FS#58032 - [kbfs] systemd service file doesn't work

Attached to Project: Community Packages
Opened by Konstantin Gizdov (kgizdov) - Thursday, 29 March 2018, 22:30 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 03 April 2018, 13:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I think there is a couple of problems with the systemd service file. Firstly, the syntax should be:

ExecStartPre=-/bin/sh -c 'fusermount -uz "$(keybase config get mountpoint|sed s/\x5c"//g)"'

and not:

ExecStartPre=-/bin/sh -c 'fusermount -uz "$(keybase config get mountdir|sed s/\x5c"//g)"'

Doesn't probably matter too much, but the official docs say to use 'keybase config set mountpoint /path' and took me quite a while to figure out why my service was failing. I know it comes shipped like this, I'll make a pull request on GitHub.

Second issue is the service fails with the following error:

fusermount: entry for /home/gizdov/keybase not found in /etc/mtab

however, an entry does exist (was created automatically) like this:

/dev/fuse /home/gizdov/keybase fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0


Steps to reproduce:
1. install kbfs
3. run `keybase config set mountpoint/mountdir /keybase`
2. run `systemctl --user start kbfs`
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Tuesday, 03 April 2018, 13:11 GMT
Reason for closing:  Not a bug
Additional comments about closing:  The fact that everything works as expected, is a subtle clue that everything is working as expected. Also this is upstream code...
Comment by Eli Schwartz (eschwartz) - Friday, 30 March 2018, 01:31 GMT
ref: https://github.com/keybase/kbfs/pull/1535

The official docs are wrong then (which ones though)? mountdir is what it created on my system, it is what their run_keybase script tries to create, and it is what their service file consults. As a result of which, it is what I'm fairly sure it uses internally....

EDIT: like I thought, this is defined in https://github.com/keybase/client/blob/607fc79192221b8eb1a9e770f609f5dacd2d5b9d/go/libkb/config.go#L798

Regarding fusermount not seeing your mountpoint, I'm not sure what I'm supposed to do about that... it works for me, the error message comes from fusermount not from keybase, and the most likely explanation I guess is that your kbfs wasn't mounted until after the error message (this is why the ExecStartPre command is permitted to fail).
Comment by Konstantin Gizdov (kgizdov) - Tuesday, 03 April 2018, 12:29 GMT
Updated the GitHub pull request. Must have been fixed in docs or I was looking at an old cache of the webpage at the time when I configured. So scratch the docs issue. My question now is what to do about the fusermount or should I do anything? It fails consistently, but the service still succeeds and seems to work. Just wondering if some `background` effect might be undesirable and may affect me down the line. Thoughts?

Loading...