Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19036] Discard local SHM locators that cannot be openned #5118

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Jul 30, 2024

Description

This PR adds a is_locator_reachable API to NetworkFactory so that unreachable locators can be discarded while deserializing the DATA(p), DATA(r), or DATA(w) messages. To do so, the NetworkFactory iterates over the transports looking for one that can reach the given locator. It does so using a new TransportInterface::is_locator_reachable API.

This PR partially solves a long standing communication issue when the participants are run in the same host but under different users. This used to cause the Fast DDS participants to keep SHM locators from the remote participant that could not be opened (due to permissions); and since Fast DDS limits the communication to SHM as soon as the remote participant has a reachable SHM locator, communication was not possible.

After this PR:

  • ✅ Communication with between two different users with similar permissions works in both directions
  • ✅ On a super-user user, subscribing to a topic from a normal user works.
  • ❌ On a normal user, subscribing to a topic from a user with more permissions (such as a super-user) still does not work.

Depends on:

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Any new/modified methods have been properly documented using Doxygen.
  • N/A: Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • ❌ Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • ❌ Changes are API compatible.
  • N/A: New feature has been added to the versions.md file (if applicable).
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.
  • N/A: Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • N/A: If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Base automatically changed from feature/shm_locator_kind_linked_major to master July 30, 2024 16:03
EduPonz added 5 commits July 30, 2024 20:31
…ransports until one reports locator reachability

Signed-off-by: eduponz <[email protected]>
…m non-local ports, and shm local ports that cannot open to write

Signed-off-by: eduponz <[email protected]>
@EduPonz EduPonz force-pushed the feature/discard_unrecheable_shm_locators branch from 44b6103 to b4833f6 Compare July 30, 2024 18:32
@EduPonz EduPonz requested a review from MiguelCompany July 30, 2024 18:32
@EduPonz EduPonz marked this pull request as ready for review July 30, 2024 18:32
@github-actions github-actions bot added the ci-pending PR which CI is running label Jul 30, 2024
@EduPonz EduPonz added this to the v3.0.0 milestone Jul 31, 2024
src/cpp/rtps/builtin/data/ReaderProxyData.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/builtin/data/ParticipantProxyData.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/builtin/data/ReaderProxyData.hpp Show resolved Hide resolved
src/cpp/rtps/builtin/data/WriterProxyData.cpp Outdated Show resolved Hide resolved
@elianalf elianalf force-pushed the feature/discard_unrecheable_shm_locators branch 2 times, most recently from d63e7c5 to 3d14ecf Compare July 31, 2024 10:12
@elianalf elianalf requested review from MiguelCompany and removed request for MiguelCompany July 31, 2024 10:18
@elianalf elianalf requested a review from MiguelCompany July 31, 2024 12:01
@elianalf elianalf force-pushed the feature/discard_unrecheable_shm_locators branch from 87aa5f1 to 92abbd6 Compare July 31, 2024 12:33
@MiguelCompany MiguelCompany force-pushed the feature/discard_unrecheable_shm_locators branch from 92abbd6 to 7e2b522 Compare July 31, 2024 15:31
@MiguelCompany MiguelCompany requested review from MiguelCompany and removed request for MiguelCompany July 31, 2024 20:40
@elianalf elianalf requested review from Mario-DL and removed request for MiguelCompany and Mario-DL August 1, 2024 10:24
@elianalf elianalf requested review from Mario-DL and removed request for Mario-DL August 2, 2024 07:41
@Mario-DL Mario-DL force-pushed the feature/discard_unrecheable_shm_locators branch from 7d9d6b3 to 170e8c4 Compare August 2, 2024 11:52
@Mario-DL
Copy link
Member

Mario-DL commented Aug 2, 2024

We internally agreed to address the convenient changes to overcome the last requirement on a follow up

@Mario-DL Mario-DL requested review from Mario-DL and removed request for Mario-DL August 2, 2024 11:53
@Mario-DL Mario-DL requested a review from richiprosima August 5, 2024 07:25
@JesusPoderoso JesusPoderoso removed the request for review from richiprosima August 5, 2024 11:55
@Mario-DL Mario-DL requested review from Mario-DL and removed request for Mario-DL August 5, 2024 12:19
Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima left a comment

Choose a reason for hiding this comment

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

LGTM

@juanlofer-eprosima juanlofer-eprosima merged commit af94cb5 into master Aug 6, 2024
17 checks passed
@juanlofer-eprosima juanlofer-eprosima deleted the feature/discard_unrecheable_shm_locators branch August 6, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants