#50565 Issue 50546 - Fix various issues in UI
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base issue50546  into  master

Download 50565.patch

Description: This patch addresses several issues:

  • 50546 - Exports from Cockpit can be stored outside of /var/lib/dirsrv/slapd-instance_name/ldif/
  • 50418 - dsctl remove does not cleanup /etc/tmpfiles.d
  • 50554 - Cockpit incorrectly shows that a server is in read-only mode
  • 49856 - Changing port should adjust selinux labels

This also enforces a minimum password length for root DN

relates: https://pagure.io/389-ds-base/issue/50546

If a short password specified, UI prints an error Failed to create instance! with an empty infobox without any details.

While trying to export a suffix (Database -> Suffixes -> Suffix Tasks -> Export)
the next error is given to the browser console:

Uncaught TypeError: Cannot read property 'includes' of undefined
at bad_file_name (index.js:173505)
at Suffix.doExport (index.js:150315)
at HTMLUnknownElement.callCallback (index.js:107984)
at Object.invokeGuardedCallbackDev (index.js:108034)
at invokeGuardedCallback (index.js:108091)
at invokeGuardedCallbackAndCatchFirstError (index.js:108105)
at executeDispatch (index.js:108396)
at executeDispatchesInOrder (index.js:108415)
at executeDispatchesAndRelease (index.js:108515)
at executeDispatchesAndReleaseTopLevel (index.js:108523)

And a small nitpick... Could you please specify all of the issue links in the commit message? It will make tracking easier in the future.

This is not correct - if we can't remove the tmpfiles, we have to raise the exception so the tools crash. That way the marker file is not incorrectly removed unless we really really have removed the instance.

What's the problem you are trying to solve here?

I think the pw quality check should not be in setup.py because that's confusing the job/responsibilities of this module I think. Perhaps this should be "higher up" in the process, IE at the cli level or similar? It depends what problem you are trying to solve here.

I think the pw quality check should not be in setup.py because that's confusing the job/responsibilities of this module I think. Perhaps this should be "higher up" in the process, IE at the cli level or similar? It depends what problem you are trying to solve here.

This is for the interactive installer. It is silly to wait to the end of the questions to say, oh wait your root DN password is too short. All interactive installers do this check as soon as a invalid password is used.

Also password policy is not checked for root DN only normal users :-)

This is not correct - if we can't remove the tmpfiles, we have to raise the exception so the tools crash. That way the marker file is not incorrectly removed unless we really really have removed the instance.
What's the problem you are trying to solve here?

Well in my /etc/tmpfile.d I have 150+ dirsrv-instance conf files. We should be removing these are instance removal, and the using shutil.rmtree fails when trying to remove a single file. So I had to change it to os.remove(). I hope that clears things up ;-)

rebased onto 3f6eb1fcab629f8d8d332bf6360e086e40777b33

Revised, please review...

LGTM. Ack from me

rebased onto 004033237ae61b7163dc4d183735a1e6d6898184

Pull-Request has been merged by mreynolds

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 pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3621

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata