Bug 205281 - net/avahi-app: runs after mountd causing hostname resolution failures
Summary: net/avahi-app: runs after mountd causing hostname resolution failures
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-12-13 05:04 UTC by Brendan Molloy
Modified: 2020-11-03 06:55 UTC (History)
6 users (show)

See Also:


Attachments
BEFORE: mountd patch (1.15 KB, patch)
2015-12-14 00:15 UTC, Brendan Molloy
no flags Details | Diff
avahi-daemon failing to start, with 'BEFORE' line in place (5.56 KB, text/plain)
2018-08-17 13:11 UTC, mvharding
no flags Details
avahi-daemon starting properly, with 'BEFORE' line removed (5.84 KB, text/plain)
2018-08-17 13:12 UTC, mvharding
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Molloy 2015-12-13 05:04:12 UTC
I have added a line to my /usr/local/rc.d/avahi-daemon to ensure it runs before mountd:

# BEFORE:  mountd

If I don't do this, and I am using avahi for local domain resolution (eg nas.local), it fails to resolve and breaks due to mountd loading before avahi-daemon has.

There may be a better way to solve this, but this is how I fixed it. :)
Comment 1 Rodrigo N. Hernandez freebsd_triage 2015-12-13 06:32:30 UTC
Hello Brendan. Many thanks for your feedback about the issue. Could you provide ansvn diff against the current ports rcd script? It would be very much appreciated.
Comment 2 Brendan Molloy 2015-12-14 00:15:01 UTC
Created attachment 164212 [details]
BEFORE: mountd patch
Comment 3 Brendan Molloy 2015-12-22 14:02:17 UTC
(In reply to Rodrigo N. Hernandez from comment #1)

Any update on this one?
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-12 23:37:56 UTC
Some lines are changed in the initscript.  But not BEFORE..
Is this still relevant?
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-08-13 01:59:52 UTC
A commit references this bug:

Author: zi
Date: Mon Aug 13 01:59:20 UTC 2018
New revision: 477047
URL: https://svnweb.freebsd.org/changeset/ports/477047

Log:
  - Ensure avahi-daemon starts before mountd

  PR:		205281
  Submitted by:	Brendan Molloy <brendan+freebsd@bbqsrc.net>

Changes:
  head/net/avahi-app/files/patch-initscript_freebsd_avahi-daemon.sh.in
Comment 6 mvharding 2018-08-17 03:52:38 UTC
This patch keeps avahi-daemon from running at all.  According to https://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/article.html, 'BEFORE:' means 'mountd' will run before avahi-daemon, not after.  'rcorder' also now shows a loop, and avahi-daemon goes down in flames since it can't find the dbus socket.  More details tomorrow AM.
Comment 7 mvharding 2018-08-17 04:00:48 UTC
Sorry, I misspoke about 'BEFORE:' but rcorder generates a loop so rcorder can't figure out what order to run things in. This may be happening on my system because I have gnome or other things installed.  I'll post the 'rcorder' output tomorrow when I have a chance to boot the machine up.
Comment 8 mvharding 2018-08-17 13:11:32 UTC
Created attachment 196282 [details]
avahi-daemon failing to start, with 'BEFORE' line in place
Comment 9 mvharding 2018-08-17 13:12:17 UTC
Created attachment 196283 [details]
avahi-daemon starting properly, with 'BEFORE' line removed
Comment 10 commit-hook freebsd_committer freebsd_triage 2018-08-17 13:26:51 UTC
A commit references this bug:

Author: zi
Date: Fri Aug 17 13:26:17 UTC 2018
New revision: 477424
URL: https://svnweb.freebsd.org/changeset/ports/477424

Log:
  - Revert init script patch due to dependency issue with dbus/mountd
  - Bump PORTREVISION

  PR:		205281

Changes:
  head/net/avahi-app/Makefile
  head/net/avahi-app/files/patch-initscript_freebsd_avahi-daemon.sh.in
Comment 11 Ryan Steinmetz freebsd_committer freebsd_triage 2018-08-17 13:28:07 UTC
Brendan,

Are you able to dive into this some more?  I think we would need to remove DAEMON from the dbus REQUIRE list, but am unable to dive into what else this might affect at the moment.