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) #4656

Merged
merged 1 commit into from
May 14, 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).

@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Apr 4, 2024
Copy link
Contributor Author

mergify bot commented Apr 4, 2024

Cherry-pick of 9ff962c has failed:

On branch mergify/bp/2.6.x/pr-4584
Your branch is up to date with 'origin/2.6.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.h
	modified:   test/blackbox/common/DDSBlackboxTestsDiscovery.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/participant/RTPSParticipantImpl.cpp
	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

@JesusPoderoso JesusPoderoso added this to the v2.6.8 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

@Mario-DL Mario-DL modified the milestones: v2.6.8, v2.6.9 Apr 23, 2024
@cferreiragonz cferreiragonz changed the base branch from 2.6.x to mergify/bp/2.6.x/pr-4454 April 23, 2024 13:50
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.6.x/pr-4584 branch from 26406f0 to bf6fac3 Compare April 23, 2024 13:54
@cferreiragonz cferreiragonz removed the conflicts Backport PR wich git cherry pick failed label Apr 23, 2024
Base automatically changed from mergify/bp/2.6.x/pr-4454 to 2.6.x April 24, 2024 06:37
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.6.x/pr-4584 branch from bf6fac3 to c240b4e Compare April 26, 2024 11:05
@cferreiragonz cferreiragonz added ci-pending PR which CI is running and removed temporarily-blocked PR must be merged after another one labels Apr 26, 2024
@Mario-DL
Copy link
Member

@cferreiragonz would you mind removing conflict marks here ? Also, remember replacing EPROSIMA_LOG_INFO withlogInfo

@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.6.x/pr-4584 branch from c240b4e to e0adcfe Compare April 30, 2024 15:00
@Mario-DL
Copy link
Member

Mario-DL commented May 6, 2024

@richiprosima please test this

@Mario-DL
Copy link
Member

Mario-DL commented May 7, 2024

It seems that there has been some errors in compilation, @cferreiragonz could you take a look at them ?

* 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)
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.6.x/pr-4584 branch from e0adcfe to 032d791 Compare May 7, 2024 08:14
@Mario-DL
Copy link
Member

Mario-DL commented May 7, 2024

@richiprosima please test this

@Mario-DL Mario-DL self-requested a review May 10, 2024 05:37
@Mario-DL
Copy link
Member

@richiprosima please test windows

@Mario-DL Mario-DL added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels May 13, 2024
@Mario-DL
Copy link
Member

Mario-DL commented May 14, 2024

Failing tests unrelated to this PR, the tcp_corner_case and tcp_topology in macOs ci known to be flaky from time to time

@EduPonz EduPonz merged commit 6b5aa78 into 2.6.x May 14, 2024
12 of 17 checks passed
@EduPonz EduPonz deleted the mergify/bp/2.6.x/pr-4584 branch May 14, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants