Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2022 16:11:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 266052] libucl: ctld fails to start when including nonexistent globs
Message-ID:  <bug-266052-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266052

            Bug ID: 266052
           Summary: libucl: ctld fails to start when including nonexistent
                    globs
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

In UCL mode (ctld -u), ctl.conf may contains ".include" directives to inclu=
de
other files, and these may be globs ".include(glob=3Dtrue)".  But if the gl=
ob
matches nothing, then parsing the config file will fail, and ctld will fail=
 to
start.  For example:

root@MYSERVER:~ # service ctld start
Starting ctld.
ctld: unable to parse configuration file /etc/ctl.conf: (null): No such fil=
e or
directory
ctld: configuration error; exiting
/etc/rc.d/ctld: WARNING: failed to start ctld
root@MYSERVER:~ # cat /etc/ctl.conf
pidfile /var/run/ctld.pid
portal-group pg0 {
     discovery-auth-group no-authentication
     listen 0.0.0.0:3260
}

lun {
        .include(glob=3Dtrue) "/etc/ctl.d/lun/*"
}

target {
        .include(glob=3Dtrue) "/etc/ctl.d/target/*"
}

In this case the /etc/ctl.d/lun and /etc/ctl.d/target directories exist but=
 are
empty.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266052-227>