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

Cherry pick - release 1.2: Iotedge check proxy-settings (#5581) #5927

Merged
merged 5 commits into from
Dec 13, 2021

Conversation

marianan
Copy link
Contributor

This change introduces a new check in iotedge check called proxy-settings. The new check verifies consistent proxy settings in IoT Edge daemon, IoT Edge agent and Moby daemon.

The following unit tests are added:

  • test check::tests::proxy_settings_all_set_should_succeed_test ... ok
  • test check::tests::proxy_settings_iot_edge_agent_not_set_should_fail_test ... ok
  • test check::tests::proxy_settings_iot_edge_deamon_not_set_should_fail_test ... ok
  • test check::tests::proxy_settings_identity_deamon_not_set_should_fail_test ... ok
  • test check::tests::proxy_settings_mismatching_values_should_fail_test ... ok
  • test check::tests::proxy_settings_moby_deamon_not_set_should_fail_test ... ok
  • test check::tests::proxy_settings_none_set_should_succeed_test ... ok

The new functionality is tested:

Please replace this line with your PR description and read PR checklist below

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

Draft PRs

  • Open the PR in Draft mode if it is:
    • Work in progress or not intended to be merged.
    • Encountering multiple pipeline failures and working on fixes.

Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned here for the PR title and description

marianan and others added 5 commits December 11, 2021 08:24
* proxy settings scaffolding

* Implement proxy settings tests

* First version of proxy settings check

* Proxy check logic

* Proxy settings check logic

* Update tests to mock systemd env settings

* Update tests + check for matching proxy values

* Remove trailing whitespaces

* Fix clippy issues

* cargo fmt

* Refactor bools into enums

* fix style issues

* More style fixes

* Add Identity service check

* Change the error status to warning

* cargo fmt
@marianan marianan merged commit 4983128 into Azure:release/1.2 Dec 13, 2021
@arsing
Copy link
Member

arsing commented Jan 7, 2022

@marianan This sudo invocation also ends up being called by tests, which means these devs cannot run tests unless they allow elevation without prompting.

Please make a PR to fix this. AFAICT no distro should require running that command with sudo to begin with.

kodiakhq bot pushed a commit that referenced this pull request Jan 14, 2022
This affects the certd config generated by running `iotedge config apply`,
as well as a new Edge CA cert issued when the current one expires *and*
the common name has not been set explicitly in certd config already.

Fixes #5937
Ref #4740

Also fix iotedge-check tests to not require sudo access.

Ref #5927 (comment)
lt72 pushed a commit to lt72/iotedge that referenced this pull request Jan 31, 2022
…5998)

This affects the certd config generated by running `iotedge config apply`,
as well as a new Edge CA cert issued when the current one expires *and*
the common name has not been set explicitly in certd config already.

Fixes Azure#5937
Ref Azure#4740

Also fix iotedge-check tests to not require sudo access.

Ref Azure#5927 (comment)
damonbarry added a commit to damonbarry/iotedge that referenced this pull request Apr 15, 2022
…5998)

This affects the certd config generated by running `iotedge config apply`,
as well as a new Edge CA cert issued when the current one expires *and*
the common name has not been set explicitly in certd config already.

Fixes Azure#5937
Ref Azure#4740

Also fix iotedge-check tests to not require sudo access.

Ref Azure#5927 (comment)
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.

3 participants