-
-
Notifications
You must be signed in to change notification settings - Fork 134
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 syncrepl
parameter
#412
Conversation
9a8e9b1
to
ec10db1
Compare
Optional[realm] => String[1], | ||
Optional[secprops] => String[1], | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but a couple options are missing:
Optional[logbase] => String[1],
Optional[logfilter] => String[1],
Optional[retry] => String[1],
Optional[syncdata] => String[1],
Optional[sizeLimit] => Variant[Integer[0], Enum['unlimited']],
Optional[timelimit] => Variant[Integer[0], Enum['unlimited']],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a PR against this branch with the missing fields I found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Do you think this interface is better and we should go this way?
Intresting, a simil work can be good for limit to |
df75919
to
7b27d3d
Compare
* Add missing documentation; * Fix wrong data types; * Correctly serialize parameters without arguments.
e05ae26
to
6d9cdeb
Compare
@smortex I mean, a struct to set olcLimits array similar to what you do to olcSyncprov parameter. |
openldap::server::database
interface for the syncrepl
parameter
I use the syncrepl feature and thing this PR is great! It will make defining syncrepl entries in hiera much cleaner and easier to define and debug. Thanks @smortex for this work. Hope to see it merged soon :) |
It is not uncommon to set the `rid` as a fixed-width string with 0 padding. For Puppet, `001` is the octal number 1 and the fixed-width is "lost", so add the ability to pass it as a string of up to three digits like `"001"` which will be kept unchanged.
I think this is ready to ship! |
Available parameters have not changed between these versions, but doc related to the older version will likely disapear before the one of the latest version.
The current
syncrepl
data type (Optional[Variant[String[1],Array[String[1]]]]
) is tedious and error prone (#221, #407). Thanks to data types, we can improve validation at the Puppet level, making it easier for the user to write a catalog that configure replication using the module, and harder to provide invalid OpenLDAP configuration.Because of the new validation, this PR is a breaking change. The interface is therefore adjusted to mandate an Array of replication configurations, even if a single one is required. This is intended to make the interface simpler.
The provided configuration is now validated with a dedicated
Openldap::Syncrepl
data type, which is serialized to the previously expected string by theopenldap::server::database
class and passed to theopenldap_database
puppet type.Fixes: #221
Updating your configuration
If you are using the
syncrepl
parameter, you need to update your manifests when updating the module.Transform a configuration like:
Into this: