Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Apr 2018 15:51:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 227205] Adapting the "${name}_limits" variable of various database service scripts to the recent changes in rc.subr (r328331)
Message-ID:  <bug-227205-13@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 227205
           Summary: Adapting the "${name}_limits" variable of various
                    database service scripts to the recent changes in
                    rc.subr (r328331)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: 0mp@FreeBSD.org
                CC: ale@FreeBSD.org, brendan+freebsd@bbqsrc.net,
                    brnrd@freebsd.org, dev@dudu.ro, eric@camachat.org,
                    feld@FreeBSD.org, flo@FreeBSD.org, mmokhi@freebsd.org,
                    numisemis@yahoo.com, proler@gmail.com
        Depends on: 226907
                CC: ale@FreeBSD.org, brendan+freebsd@bbqsrc.net,
                    brnrd@freebsd.org, dev@dudu.ro, eric@camachat.org,
                    feld@FreeBSD.org, flo@FreeBSD.org, mmokhi@freebsd.org,
                    numisemis@yahoo.com, proler@gmail.com

Due to the changes in rc.subr introduced by r328331[1] some of the
database services are unable to start (service ${name} start) on FreeBSD
12-CURRENT. Here's an example for databases/mongodb36:

> Starting mongod.
> limits: NO: No such file or directory
> /usr/local/etc/rc.d/mongod: WARNING: failed to start mongod

Before r328331 some database services defined a bool variable
`${name}_limits`. When it was set to YES it triggered limits(1) to run
before a daemon was started.

Revision 328331 introduced a standard mechanism to do it. As a result
daemon maintainers/developers no longer have to roll out their own
solutions. The problem is that the semantics of the new common
mechanism is not compatible with many service files. `${name}_limits`
used to be a bool variable whereas now it is a string of extra flags to
be passed to limits(1).

The following command reveals a list of potentially affected ports:

    $ cd /usr/ports
    $ find . -mindepth 4 -maxdepth 4 -type f ! -name '*patch*' \
    -exec grep -l _limits {} \+ | \
    awk -v FS=3D/ -v OFS=3D/ '{print $2,$3}' - | sort | uniq

    databases/arangodb32
    databases/arangodb33
    databases/clickhouse
    databases/mariadb100-server
    databases/mariadb101-server
    databases/mariadb102-server
    databases/mariadb55-server
    databases/mongodb
    databases/mongodb32
    databases/mongodb34
    databases/mongodb34-rocks
    databases/mongodb36
    databases/mysql55-server
    databases/mysql56-server
    databases/mysql57-server
    databases/mysql80-server
    databases/mysqlwsrep56-server
    databases/mysqlwsrep57-server
    databases/percona55-server
    databases/percona56-server
    databases/percona57-server

I confirm that the problem exists in all those ports.

Initially, I thought that this bug is related only to the
databases/mongodb36 port but it turned out that it is a bigger issue.
The issue on Bugzilla for monogodb36 is here[2].

FWIW, I've submitted an update to the rc.subr manual to improve the
documentation of that new ${name}_limits variable.[3]

This is a meta-issue of this problem. I'll open issues for all the affected
ports to notify maintainers and request individual feedback.

We need to remember that we cannot simply switch to the new mechanism as it=
 is
only available in 12-CURRENT and soon in 11-STABLE (and 11.2).=20

[1]: https://svnweb.freebsd.org/base?view=3Drevision&revision=3Dr328331
[2]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226907
[3]: https://reviews.freebsd.org/D14928


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226907
[Bug 226907] databases/mongodb36:  failed to start mongod due to "limits: N=
O:
No such file or directory"
--=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-227205-13>