Bug 1162874

Summary: Default owfs.service unit file fails to start owfs-fs.
Product: [Fedora] Fedora Reporter: Douglas Furlong <bugzilla_rhn>
Component: owfsAssignee: Tomasz Torcz <tomek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: tomek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: owfs-2.9p8-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-06 10:50:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Douglas Furlong 2014-11-11 22:12:43 UTC
Description of problem:

A couple of issues with the owfs.service unit file.

1) Uses /run/owfs however this is not created and as such fails.
2) the owfs command forks at run time, and as such Type=forking needs to be specified.


Version-Release number of selected component (if applicable):
owfs-fs-2.9p8-1.fc21.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Install owfs-fs and attempt to start.
2.
3.

Actual results:
owfs-fs fails to start.

Expected results:
owfs-fs starts.

Additional info:
The following unit file appears to fix the issue, however I'm new to systemd, so may be doing some thing daft.

[Unit]
Description=1-wire filesystem FUSE mount
Documentation=man:owfs(1)

[Service]
Type=forking
RuntimeDirectory=owfs
RuntimeDirectoryMode=0755
ExecStart=/usr/bin/owfs --server=127.0.0.1 --allow_other -m %t/owfs
ExecStop=/usr/bin/umount %t/owfs

[Install]
WantedBy=multi-user.target

Comment 1 Douglas Furlong 2014-11-11 22:29:38 UTC
Just to note, speaking to the systemd folk, apparently "Type=notify" is the prefered type, with "Type=simple" being second best :)

"[22:16] <va-> Yeah, -f is for the fuse library, i.e. the fuse_main() C function call. You would have to see how owfs makes it possible to set it."

As such, the correct solution (or at least perfered from a systemd perspective is.


[Unit]
Description=1-wire filesystem FUSE mount
Documentation=man:owfs(1)

[Service]
Type=simple
RuntimeDirectory=owfs
RuntimeDirectoryMode=0755
ExecStart=/usr/bin/owfs --foreground --server=127.0.0.1 --allow_other -m %t/owfs
ExecStop=/usr/bin/umount %t/owfs

[Install]
WantedBy=multi-user.target

-----------------------

Obviously the RuntimeDirectoryMode is open for debate, possibly controlling by group membership may make more sense.

Comment 2 Tomasz Torcz 2014-11-12 11:11:46 UTC
Hi,

It seems there was a problem with foreground setting upstream:
http://sourceforge.net/p/owfs/code/ci/747b48200844669fe4fa264c9b57c84087eaa95a/

Although it did work in my tests, so I'll check again. I'll also review improvements to the unit, for example usage of %t looks quite cleaner that current stuff.

Comment 3 Douglas Furlong 2014-11-12 11:15:10 UTC
Morning Tomasz

I think my note may have come across as confusing.

--forground does do what we expect, I.E. it stays in the foreground and does not fork.

The default is to fork though, so it would need to be explicitly stated, that we do not want it to fork.

Comment 4 Fedora Update System 2014-11-12 18:03:24 UTC
owfs-2.9p8-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/FEDORA-2014-12790/owfs-2.9p8-2.fc21

Comment 5 Tomasz Torcz 2014-11-12 18:08:14 UTC
Indeed there's a bug. RuntimeDirectory= was added post-release and missed the packaging.
The Type= was wrong, too. I don't know how it worked in my testing...

I've went with "forking", it's provides better readiness notification than "simple". I included your "%t" changes, too.

owfs-2.9p8-2.fc21 is fixed build. Thanks for helping!

Comment 6 Douglas Furlong 2014-11-13 09:15:02 UTC
No problem.

Regarding the forking & background v's simple & foreground, the initial indication I got from some people on the systemd IRC channel suggesting that simple/notify were the prefered type's.

I've no idea one way or the other (though am keen to unerstand), arguably that is beyond this bug report though :)

Comment 7 Fedora Update System 2014-11-13 18:07:19 UTC
Package owfs-2.9p8-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing owfs-2.9p8-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12790/owfs-2.9p8-2.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-11-18 12:12:57 UTC
Package owfs-2.9p8-2.fc21, collectd-5.4.1-8.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing owfs-2.9p8-2.fc21 collectd-5.4.1-8.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12790/collectd-5.4.1-8.fc21,owfs-2.9p8-2.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-12-06 10:50:53 UTC
owfs-2.9p8-2.fc21, collectd-5.4.1-8.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.