Bug 227217

Summary: databases/mongodb: Adapt ${name}_limits to the new resource limiting mechanics for services
Product: Ports & Packages Reporter: Mateusz Piotrowski <0mp>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: rene
Priority: --- Keywords: regression
Version: LatestFlags: bugzilla: maintainer-feedback? (ale)
0mp: maintainer-feedback?
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 227205, 228319    
Attachments:
Description Flags
Patch adding support for the new ${name}_limits mechanics (databases/mongodb)
none
Patch adding support for the new ${name}_limits mechanics (databases/mongodb, revision: 1)
none
Patch adding support for the new ${name}_limits mechanics (databases/mongodb, revision: 4) 0mp: maintainer-approval?

Description Mateusz Piotrowski freebsd_committer freebsd_triage 2018-04-02 23:28:49 UTC
Created attachment 192130 [details]
Patch adding support for the new ${name}_limits mechanics (databases/mongodb)

Thanks to the recent change to rc.subr(8) it is no longer necessary to
define a resource limiting logic in service scripts. limits(1) is now run
by default and its configuration is handled via the "${name}_limits"
variable.

Unfortunately, there is a collision of variable names. The service
scripts are broken on FreeBSD version with that new change (12.0-CURRENT,
11-STABLE and soon 11.2-RELEASE). It has been reported and diagnosed here.[2]

I'm submitting a patch fixing the service script for this port. A similar patch
has already been accepted by a maintainer of another database port.[2]

The patch preserves the old behavior on the systems without the
modification.

It would be great if you could review the patch and test it. :)

[1]: https://svnweb.freebsd.org/base?view=revision&revision=r328331
[2]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226907
Comment 1 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-04-04 18:06:44 UTC
Created attachment 192221 [details]
Patch adding support for the new ${name}_limits mechanics (databases/mongodb, revision: 1)

The previous patch would fail to trigger the new ${name}_limits semantics for __FreeBSD_version 1101514. The new patch fixes it (thanks to mmokhi@).
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-04-11 00:12:00 UTC
Created attachment 192407 [details]
Patch adding support for the new ${name}_limits mechanics (databases/mongodb, revision: 4)

Due to an increasing number of problems caused by the new ${name}_limits behavior, the revision, which was backported from 12-CURRENT to 11-STABLE, has now been reverted.[1] As a result, the new behavior will not be present in any FreeBSD version < 12. 

This new patch adapts the port to those latest changes.

[1]: https://svnweb.freebsd.org/base?view=revision&revision=r332363
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2018-08-15 11:53:44 UTC
Is this issue relevant for databases/mongodb3* ? Version 2.6.12 (this port) has been end-of-life upstream since 2016.
Comment 4 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-08-15 13:33:54 UTC
(In reply to Rene Ladan from comment #3)

I've submitted patches to all the other affected database ports.

I think that we can close this PR if databases/mongodb is no longer around.
Comment 5 Rene Ladan freebsd_committer freebsd_triage 2018-08-15 13:36:39 UTC
See comment #4, expired port removed.