Skip to content

librbd/managed_lock/GetLockerRequest: Fix no valid lockers case - #51297

Merged
idryomov merged 2 commits into
ceph:mainfrom
Matan-B:wip-matanb-locker-request-str
May 16, 2023
Merged

idryomov merged 2 commits into
ceph:mainfrom
Matan-B:wip-matanb-locker-request-str

Conversation

@Matan-B

@Matan-B Matan-B commented May 1, 2023 •

Copy link
Copy Markdown
Contributor

See:
m_locker->address = iter->second.addr.get_legacy_str();

In the case where iter->second.addr is an empty address, m_locker->address string is assigned with "0)/0" and therfore will never result in an empty string.

Use is_blank_ip() before get_legacy_str() instead.

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

Signed-off-by: Matan Breizman [email protected]

Contribution Guidelines

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

@Matan-B
Matan-B requested a review from a team as a code owner May 1, 2023 13:39
@github-actions github-actions Bot added the rbd label May 1, 2023
@ajarr

ajarr commented May 2, 2023

Copy link
Copy Markdown
Contributor

@Matan-B will https://tracker.ceph.com/issues/59589 be completely fixed by this PR or does it require an additional crimson fix? I don't totally follow your comment, "Note: This fix helps with unrelated Crimson issue https://tracker.ceph.com/issues/59589"

@Matan-B

Matan-B commented May 2, 2023 •

Copy link
Copy Markdown
Contributor Author

@Matan-B will https://tracker.ceph.com/issues/59589 be completely fixed by this PR or does it require an additional crimson fix? I don't totally follow your comment, "Note: This fix helps with unrelated Crimson issue https://tracker.ceph.com/issues/59589"

Hey @ajarr, The comment was there to explain how this bug was encountered in the first place. Since this PR doesn't relate to the actual fix I have removed the comment to avoid confusion.

@Matan-B

Matan-B commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

jenkins test make check

ajarr

This comment was marked as outdated.

@Matan-B
Matan-B requested a review from a team as a code owner May 3, 2023 09:16
@Matan-B
Matan-B force-pushed the wip-matanb-locker-request-str branch from 6ffd079 to 22dfa5a Compare May 3, 2023 09:19
@Matan-B Matan-B removed the crimson label May 3, 2023
@Matan-B
Matan-B requested review from ajarr and idryomov and removed request for a team May 3, 2023 09:19

@ajarr ajarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to backport this fix to previous releases, I think having a corresponding RBD tracker ticket will help.

@Matan-B

Matan-B commented May 4, 2023

Copy link
Copy Markdown
Contributor Author

If we're going to backport this fix to previous releases, I think having a corresponding RBD tracker ticket will help.

https://tracker.ceph.com/issues/59641

See:
`m_locker->address = iter->second.addr.get_legacy_str();`

In the case where `iter->second.addr` is an empty address,
m_locker->address string is assigned with "0)/0" and therfore
will never result in an empty string.

Use `is_blank_ip()` before `get_legacy_str()`

Signed-off-by: Matan Breizman <[email protected]>
@Matan-B
Matan-B force-pushed the wip-matanb-locker-request-str branch from 22dfa5a to 7482bee Compare May 7, 2023 12:45
@Matan-B
Matan-B requested a review from idryomov May 7, 2023 12:47
@github-actions github-actions Bot added the tests label May 8, 2023
@idryomov

idryomov commented May 8, 2023

Copy link
Copy Markdown
Contributor

Added unit tests since there was a pretty obvious gap there.

@idryomov

idryomov commented May 8, 2023

Copy link
Copy Markdown
Contributor

jenkins test make check

@idryomov
idryomov merged commit fb39a95 into ceph:main May 16, 2023
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