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

"carma" shell script update to support dual compute system #2189

Draft
wants to merge 32 commits into
base: develop
Choose a base branch
from

Conversation

willjohnsonk
Copy link
Contributor

@willjohnsonk willjohnsonk commented Nov 14, 2023

PR Details

Description

To support dual compute system design the carma shell script should be updated so that it can manage Docker services and containers across two PCs. All management of the system should be done from a single manager PC called "PC1", which will run commands similar to "carma start" and other carma commands.

Related GitHub Issue

Related Jira Key

Motivation and Context

Improvements will allow for higher computation throughput on systems by leveraging two PCs.

How Has This Been Tested?

Carma bash script has run successfully on dual compute hardware.

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@adamlm adamlm left a comment

Choose a reason for hiding this comment

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

There are several ShellCheck warnings/errors for the changed code. Please resolve those.

engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
Copy link
Contributor

@adamlm adamlm left a comment

Choose a reason for hiding this comment

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

General comment: ShellCheck raises several issues. Please resolve those.

engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
@adamlm adamlm self-requested a review November 29, 2023 14:29
Copy link
Contributor

@adamlm adamlm left a comment

Choose a reason for hiding this comment

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

Accidentally approved. Still some work that needs to be done before then.

carma/launch/carma_src.launch.py Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
engineering_tools/carma_script_extensions/swarm Outdated Show resolved Hide resolved
Copy link
Contributor

@adamlm adamlm left a comment

Choose a reason for hiding this comment

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

Resolve yellow (warning) ShellCheck issues. Preferably green ones too but not required.

carma/launch/carma_src.launch.py Show resolved Hide resolved
@@ -6,7 +6,7 @@

# Long: Timeout for each service to be detected as available in milliseconds
# Units: milliseconds
service_timeout_ms : 200
service_timeout_ms : 18000
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this change meant to be committed to develop? 18 seconds seems too large for the timeout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

18000 is a very arbitrary value assigned during testing. This relates to specific Swarm behavior of how it deploys services differently (and a bit slower) than our normal Docker deployment. I can do some testing to see what this value actually needs to be, it should be lower but unsure by how much. I can show you a demo sometime as an example.

declare_system_architecture = DeclareLaunchArgument(
name = 'system_architecture',
default_value = 'single',
description = 'Flag to define whether a single compute system or a dual compute system is being used'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also specify the accepted values for this config in the description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically the accepted values are shown in both of these but I can see how it's not clear. It'd be better to be bolded but can't have that, do you think putting it as 'single' 'dual' / 'manager' 'worker' with single quotes in the text be clear enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, i think having them in single quotes would make it clear that those are the values we can use here

declare_host_placement = DeclareLaunchArgument(
name = 'host_placement',
default_value = 'manager',
description = 'Flag to define whether the current active host is a manager or worker for ROS node allocation'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, can you define the accepted values for the config in the description?

@MishkaMN
Copy link
Contributor

@willjohnsonk Should we close this PR if it is not getting merged?
We can keep the branch alive or move this to https://github.com/usdot-fhwa-stol/carma-developer-tools/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants