Bug 235969 - net/frr6: integrated-vtysh-config not honored by rc file
Summary: net/frr6: integrated-vtysh-config not honored by rc file
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Olivier Cochard
Depends on:
Reported: 2019-02-23 20:25 UTC by Yakov Sh.
Modified: 2019-03-14 20:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (olivier)

frr.in.patch (1.66 KB, patch)
2019-02-23 20:25 UTC, Yakov Sh.
no flags Details | Diff
updated patch (1.76 KB, patch)
2019-02-25 11:30 UTC, Yakov Sh.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yakov Sh. 2019-02-23 20:25:20 UTC
Created attachment 202299 [details]

When using 'integrated-vtysh-config' mode with frr.conf (frr_vtysh_boot rc flag), but without any daemon specific config files (e.g. ospfd.conf) all daemons failed to start. Then 'vtysh -b' failed to apply config to daemons.

Steps to reproduce on 12.0:
 * install frr6
 * create /usr/local/etc/frr/vtysh.conf with
   - service integrated-vtysh-config
   - hostname router
   - username root nopassword
 * create empty /usr/local/etc/frr/frr.conf
 * put any daemons in /etc/rc.conf options with frr_vtysh_boot, like
   - frr_enable="YES"
   - frr_daemons="zebra ospfd bgpd"
   - frr_vtysh_boot="YES"
 * start frr service

No daemons running, service didn't start.

Expected result
All chosen daemons running, service started.

Some explanation
In 'integrated-vtysh-config' mode vtysh utility controls that all daemons has config they need, while serving it from single config file (frr.conf), not daemon specific configs. vtysh also controls config writing. Daemons on startup locate frr.conf file and don't tries to load they own config. 'vtysh -b' runs last and apply configuration to daemons.
While there's a 'frr_vtysh_boot' flag in rc file for that exact reason, startup procedures still require all daemons have they own configs. If there are no daemon specific configs, that daemon will not be executed at all.
Comment 1 Yakov Sh. 2019-02-25 11:29:06 UTC
Probably better check integrated config before starting daemons and reuse check_config function. Reupload patch.
Comment 2 Yakov Sh. 2019-02-25 11:30:11 UTC
Created attachment 202349 [details]
updated patch
Comment 3 commit-hook freebsd_committer 2019-03-14 20:17:38 UTC
A commit references this bug:

Author: olivier
Date: Thu Mar 14 20:17:32 UTC 2019
New revision: 495731
URL: https://svnweb.freebsd.org/changeset/ports/495731

  Fix RC script when VTYSH (integrated configuration) mode is enabled

  PR:		235969
  Submitted by:	Yakov Sh. <yman@protonmail.ch>

Comment 4 Olivier Cochard freebsd_committer 2019-03-14 20:18:30 UTC
Thanks for your patch!