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

[20628] Fix Discovery Server over TCP using logical port (backport #4584) #4655

Merged
merged 1 commit into from
May 16, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 4, 2024

Description

This PR fixes a couple of bugs appearing when launching Discovery Server with TCP.

  1. After the latest changes introduced to TCP with the Large Data feature, a DS client with one listening port could skip the channel creation and wait for the DS server to connect to it (which will never happen), as if it was a LARGE_DATA use case. A DS client must always create a CONNECT channel to the DS server.
  2. The timer event that sends the pings to remote servers was not being restarted after updating the remote server list, what was causing a failure in the participant discovery.
  3. It avoids the creation of unnecessary channels when updating the attributes to add new servers.

Additionally, it enables to set the logical port to zero when using DS, which will set the logical port to a value equal to the physical port. This simplifies the configuration required for using DS and is coherent with the logic implement in the CLI and the ROS_DISCOVERY_SERVER environment variable, where the logical port is always set to same value as the physical port.

@Mergifyio backport 2.10.x 2.6.x

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.

  • Changes are ABI compatible.

  • 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.

  • 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.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #4584 done by [Mergify](https://mergify.com).

Copy link
Contributor Author

mergify bot commented Apr 4, 2024

Cherry-pick of 9ff962c has failed:

On branch mergify/bp/2.10.x/pr-4584
Your branch is up to date with 'origin/2.10.x'.

You are currently cherry-picking commit 9ff962c13.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
	modified:   src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
	modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp
	modified:   src/cpp/rtps/participant/RTPSParticipantImpl.h
	modified:   test/blackbox/common/DDSBlackboxTestsDiscovery.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/transport/TCPTransportInterface.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Apr 4, 2024
@JesusPoderoso JesusPoderoso added this to the v2.10.4 milestone Apr 4, 2024
@cferreiragonz cferreiragonz added the temporarily-blocked PR must be merged after another one label Apr 4, 2024
@cferreiragonz
Copy link
Contributor

@cferreiragonz cferreiragonz changed the base branch from 2.10.x to mergify/bp/2.10.x/pr-4454 April 4, 2024 13:35
@cferreiragonz cferreiragonz removed the conflicts Backport PR wich git cherry pick failed label Apr 4, 2024
Base automatically changed from mergify/bp/2.10.x/pr-4454 to 2.10.x April 10, 2024 06:42
@MiguelCompany
Copy link
Member

@cferreiragonz #4560 was merged and this now needs a rebase

@MiguelCompany MiguelCompany removed the temporarily-blocked PR must be merged after another one label Apr 10, 2024
@MiguelCompany MiguelCompany self-requested a review April 10, 2024 06:54
@github-actions github-actions bot added the ci-pending PR which CI is running label Apr 10, 2024
@MiguelCompany
Copy link
Member

@Mergifyio rebase

Copy link
Contributor Author

mergify bot commented Apr 15, 2024

rebase

✅ Branch has been successfully rebased

@MiguelCompany
Copy link
Member

@Mergifyio rebase

* Refs #20628: Update OpenOutputChannel

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Refactor PDPClient to handle initial TPC connections

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Configuration to use logical port 0 as default in DS

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Refactor PDPServer to handle initial TPC connections

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Add TCP DS blackbox test

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Uncrustify

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Check transport in function

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Check interface changes before creating new send resources

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Minor corrections

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Check loc.kind and methods in RTPSPartImpl

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Check loc.kind for default logical port

Signed-off-by: cferreiragonz <[email protected]>

* Refs #20628: Fix windows

Signed-off-by: cferreiragonz <[email protected]>

---------

Signed-off-by: cferreiragonz <[email protected]>
(cherry picked from commit 9ff962c)
Copy link
Contributor Author

mergify bot commented May 16, 2024

rebase

✅ Branch has been successfully rebased

@MiguelCompany MiguelCompany requested review from MiguelCompany and removed request for MiguelCompany May 16, 2024 05:58
@MiguelCompany
Copy link
Member

@richiprosima Please test this

@MiguelCompany MiguelCompany merged commit ee71f07 into 2.10.x May 16, 2024
10 of 17 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/2.10.x/pr-4584 branch May 16, 2024 12:10
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.

3 participants