Skip to content

auth: remove unused AuthTicket::renew_after member variable#64591

Merged
tchaikov merged 1 commit intoceph:mainfrom
tchaikov:wip-auth-remove-unused
Jul 22, 2025
Merged

auth: remove unused AuthTicket::renew_after member variable#64591
tchaikov merged 1 commit intoceph:mainfrom
tchaikov:wip-auth-remove-unused

Conversation

@tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Jul 21, 2025

The AuthTicket::renew_after field is only set in init_timestamps() and read by dump() for debugging purposes. It has no functional use cases and causes encoding/decoding inconsistencies.

During decoding, this field remains unchanged, creating discrepancies between original and decoded values. This issue was masked because check-generated.sh and readable.sh reused struct instances, preserving stale field values across encode/decode cycles.

An upcoming change will allocate fresh instances for each decode operation, which would expose these inconsistent values.

Remove the unused field to eliminate the encoding inconsistency and simplify the codebase.

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

@tchaikov tchaikov requested a review from NitzanMordhai July 21, 2025 01:12
@tchaikov
Copy link
Contributor Author

@NitzanMordhai Hi Nitzan, I noticed you implemented the dump() function for AuthTicket in commit 1d7cabf. Would you mind reviewing this change when you have a chance? Your expertise with that functionality would be greatly appreciated.

@tchaikov
Copy link
Contributor Author

jenkins test make check

@tchaikov
Copy link
Contributor Author

jenkins test make check arm64

The AuthTicket::renew_after field is only set in init_timestamps() and
read by dump() for debugging purposes. It has no functional use cases
and causes encoding/decoding inconsistencies.

During decoding, this field remains unchanged, creating discrepancies
between original and decoded values. This issue was masked because
check-generated.sh and readable.sh reused struct instances, preserving
stale field values across encode/decode cycles.

An upcoming change will allocate fresh instances for each decode
operation, which would expose these inconsistent values.

Remove the unused field to eliminate the encoding inconsistency and
simplify the codebase.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@tchaikov tchaikov force-pushed the wip-auth-remove-unused branch from 611315e to 928aa98 Compare July 21, 2025 08:57
@tchaikov tchaikov requested a review from a team as a code owner July 21, 2025 08:57
@tchaikov
Copy link
Contributor Author

changelog

  • remove renew_after from doc/dev/cephx.rst as well

@tchaikov
Copy link
Contributor Author

jenkins test make check

@tchaikov tchaikov merged commit 6d3dffc into ceph:main Jul 22, 2025
17 of 19 checks passed
@tchaikov tchaikov deleted the wip-auth-remove-unused branch July 22, 2025 01:08
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