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

feat: use loopback ip address instead of alias to improve compatibility #2952

Merged

Conversation

reubenmiller
Copy link
Contributor

Proposed changes

Some Linux distributions installations where the /etc/hosts file is not defined, the loopback address (127.0.0.1), the localhost alias does not get resolved to 127.0.0.1. And devices which have a read-only rootfs, can't even add a manual entry to the list, so the only option is to change the tedge.toml values (which is not ideal for such basic settings).

Changing the defaults from localhost to 127.0.0.1 improves the out of the box compatibility.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@reubenmiller reubenmiller temporarily deployed to Test Pull Request June 19, 2024 11:05 — with GitHub Actions Inactive
@reubenmiller reubenmiller added the theme:configuration Theme: Configuration management label Jun 19, 2024
Copy link
Contributor

github-actions bot commented Jun 19, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
453 0 3 453 100 1h0m38.032027s

@reubenmiller
Copy link
Contributor Author

reubenmiller commented Jun 19, 2024

Ok, seems like the mosquitto TLS cert generation might need to change to also support TLS connections when using the loopback address, currently it only supports the hostname, or localhost.

Update

Addressed by 05ca442

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
…certs for localhost

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller force-pushed the feat-use-loopback-ip-address branch from 05ca442 to e54f81a Compare June 19, 2024 12:23
@reubenmiller reubenmiller temporarily deployed to Test Pull Request June 19, 2024 12:24 — with GitHub Actions Inactive
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.2%. Comparing base (ed0b7fd) to head (e54f81a).
Report is 1 commits behind head on main.

Additional details and impacted files
Files Coverage Δ
crates/common/mqtt_channel/src/config.rs 45.9% <100.0%> (ø)
.../tedge_config/src/tedge_config_cli/tedge_config.rs 76.8% <100.0%> (ø)
...s/core/tedge/src/bridge/common_mosquitto_config.rs 75.3% <100.0%> (ø)
crates/extensions/c8y_mapper_ext/src/converter.rs 84.1% <100.0%> (ø)
crates/extensions/tedge_mqtt_bridge/src/config.rs 96.1% <100.0%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

@reubenmiller reubenmiller added this pull request to the merge queue Jun 19, 2024
Merged via the queue into thin-edge:main with commit dc64912 Jun 19, 2024
33 checks passed
@reubenmiller reubenmiller deleted the feat-use-loopback-ip-address branch July 18, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:configuration Theme: Configuration management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants