#51177 Rust / Plugin - on upgrade configuration
Closed: wontfix by firstyear. Opened by firstyear.

Issue Description

To help improve the rust interface, we need on-run upgrade mechanisms which are a sub-part of the PR https://pagure.io/389-ds-base/pull-request/49579

This PR also contains transactional plugin loading and configuration management.

PR 49579 should be revived, updated and used to provide the plugin loader to entryuuid and dynamic config.


Metadata Update from @firstyear:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Issue marked as blocking: #51174

Metadata Update from @mreynolds:
- Issue priority set to: normal
- Issue set to the milestone: 1.4.4

Commit b8e9773e fixes this issue

Reopening, there are compiler warnings, and the first one can cause crashes:

./389-ds-base/ldap/servers/slapd/upgrade.c: In function upgrade_entry_exists_or_create:
../389-ds-base/ldap/servers/slapd/upgrade.c:34:18: warning: implicit declaration of function slapi_exists_or_add_internal; did you mean slapi_add_internal? [-Wimplicit-function-declaration]
   34 |     int result = slapi_exists_or_add_internal(base_sdn, filter, dupentry, modifier_name);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  slapi_add_internal
../389-ds-base/ldap/servers/slapd/upgrade.c:37:54: warning: format %s expects a matching char * argument [-Wformat=]
   37 |         slapi_log_error(SLAPI_LOG_FATAL, upgrade_id, "Failed to create entry: %"PRId32": %s\n", result);
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../389-ds-base/ldap/servers/slapd/upgrade.c:37:91: note: format string is defined here
   37 |         slapi_log_error(SLAPI_LOG_FATAL, upgrade_id, "Failed to create entry: %"PRId32": %s\n", result);
      |                                                                                          ~^
      |                                                                                           |
      |                                                                                           char *
At top level:
../389-ds-base/ldap/servers/slapd/upgrade.c:28:1: warning: upgrade_entry_exists_or_create defined but not used [-Wunused-function]
   28 | upgrade_entry_exists_or_create(char *upgrade_id, char *filter, char *dn, char *entry) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Metadata Update from @mreynolds:
- Issue status updated to: Open (was: Closed)

Sorry about this mate I'll resolve it tomorrow morning. Can I check if you were runnig with --enable rust or not to be sure I use the right configure args to match what you're doing?

Sorry about this mate I'll resolve it tomorrow morning. Can I check if you were runnig with --enable rust or not to be sure I use the right configure args to match what you're doing?

Hmm didn't try that, but I think it's time to enable rust by default. I know our builds pass with it enable. Is there anything else holding it up?

I have an open issue for it. I need to fix something between entryuuid + syncrepl so that we don't create issues for rust by default. But otherwise we'd be ready to go I think.

Commit 3d61aafa fixes this issue

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/4230

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata
Related Pull Requests