Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework openldap::server::database interface for the limits parameter #414

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

smortex
Copy link
Member

@smortex smortex commented Mar 30, 2024

Similar to the work on the syncrepl parameter, adjust the interface to
use a well-defined Puppet structure to help writing manifests easier to
read.

Updating your configuration

If you are using the limits parameter, you need to update your manifests when updating the module.

Transform a configuration like:

openldap::server::database { 'dc=example,dc=com':
  ensure => present,
  limits => [
    'dn.exact="cn=anyuser,dc=example,dc=org" size=100000',
    'dn.exact="cn=personnel,dc=example,dc=org" size=unlimited',
    'dn.exact="cn=dirsync,dc=example,dc=org" size=100000',
  ],
}

Into this:

openldap::server::database { 'dc=example,dc=com':
  ensure => present,
  limits => {
    'dn.exact="cn=anyuser,dc=example,dc=org"'   => {
      size => 100000,
    },
    'dn.exact="cn=personnel,dc=example,dc=org"' => {
      size => 'unlimited',
    },
    'dn.exact="cn=dirsync,dc=example,dc=org"'   => {
      size => 100000,
    },
  },
}

@Valantin
Copy link
Contributor

Thanks for the work, at the end of Easter holidays try to review it

Copy link
Contributor

@Valantin Valantin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be good, I think is a better and less error prone way to do it.
On my env I've multiple regex for dn matching and with time/size soft and hard limit I've a very long line to set

@smortex smortex marked this pull request as ready for review April 4, 2024 02:09
@smortex smortex added this to the 8.0.0 milestone Apr 4, 2024
Similar to the work on the `syncrepl` parameter, adjust the interface to
use a well-defined Puppet structure to help writing manifests easier to
read.
@smortex
Copy link
Member Author

smortex commented Apr 7, 2024

Rebased on top of master. If CI pass I will merge this one, and I think a release can follow soon. There are a few other PR to merge before.

@smortex smortex merged commit cf66650 into master Apr 7, 2024
30 checks passed
@smortex smortex deleted the rework-limits branch April 7, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants