Skip to content

rgw: udpate options yaml file so LDAP uri isn't an invalid example - #56645

Merged
ivancich merged 1 commit into
ceph:mainfrom
ivancich:wip-remove-example-ldap-domain
Apr 4, 2024
Merged

ivancich merged 1 commit into
ceph:mainfrom
ivancich:wip-remove-example-ldap-domain

Conversation

@ivancich

@ivancich ivancich commented Apr 3, 2024 •

Copy link
Copy Markdown
Member

LDAP tries to bind the URI configuration option when RGW starts. The default value is an example used to show the form of the URI and is not itself valid. The default value is used, unless overrideen, and can cause delays in start-up in some situations. The example is now provided in the description and the default is the empty string.

Fixes: https://tracker.ceph.com/issues/65277

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@cbodley

cbodley commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

what happens when rgw_ldap_uri is an empty string? do we still try to call into ldap?

@ivancich

ivancich commented Apr 3, 2024

Copy link
Copy Markdown
Member Author

@cbodley : Does this need a QA run or can it be merged directly?

@ivancich

ivancich commented Apr 3, 2024 •

Copy link
Copy Markdown
Member Author

what happens when rgw_ldap_uri is an empty string? do we still try to call into ldap?

Sorry, I missed your question. I've run it and there are no apparent issues. The call in rgw_appmain.cc in which this is used is:

ldh.reset(new rgw::LDAPHelper(ldap_uri, ldap_binddn,
             ldap_bindpw.c_str(), ldap_searchdn, ldap_searchfilter, ldap_dnattr));

ldap_uri is expected to be a comma-separated list of URIs, so basic parsing is done, and it seems to be able to handle the empty string, as I would expect. Are you suggesting check for the empty string earlier in the call stack?

LDAP tries to bind the URI configuration option when RGW starts. The
default value is an example used to show the form of the URI and is
not itself valid. The default value is used, unless overrideen, and
can cause delays in start-up in some situations. The example is now
provided in the description and the default is the empty string.

Signed-off-by: J. Eric Ivancich <[email protected]>
@cbodley

cbodley commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

ldap_uri is expected to be a comma-separated list of URIs, so basic parsing is done, and it seems to be able to handle the empty string, as I would expect. Are you suggesting check for the empty string earlier in the call stack?

if the current logic avoids calling into ldap unnecessarily, i don't think we need an earlier check

@cbodley : Does this need a QA run or can it be merged directly?

please qa! introducting regressions at this point would be particularly disruptive for squid

@ivancich
ivancich force-pushed the wip-remove-example-ldap-domain branch from 98149f6 to 236f1df Compare April 3, 2024 18:28
@ivancich
ivancich requested a review from a team as a code owner April 3, 2024 18:28
@ivancich ivancich added the wip-eric-testing-1 for ivancich testing label Apr 3, 2024
1 similar comment
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.

3 participants