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 to 1.1 5195 5117 #5227

Merged

Conversation

huguesBouvier
Copy link
Contributor

@huguesBouvier huguesBouvier commented Jul 9, 2021

Cherry pick:
#5195
#5117

Note:
There was a few conflicts that I had to solve manually. Most of them in aziot-edged/src/lib.rs.

Redid tests from previous PR:

Test 5195 (throttling):
Created a separate module and ran the following command with the module.
seq 1 30000 | xargs -I % -P 1000 curl --unix-socket /var/run/iotedge/workload.sock http://127.0.0.1/modules?api-version=2020-07-07 &> /dev/null&

Test 5117 (multiple workload socket):
Config: edgeAgent + edgeHub + my-rust-app module.

Tested all combination

Tested new edged + edgeAgent 1.1 (bootstrap) + new edgeAgent.
Tested new edged + new edgeAgent. (bootstrap) + new edgeAgent.
Tested new edged + edgeAgent 1.1(bootstrap) + edgeAgent 1.1
Tested new edged + new edgeAgent. (bootstrap) + edgeAgent 1.1
Old edged + new edgeAgent + edgeAgent 1.1
sudo docker inspect on agent/hub and my-rust-app and check that the socket /var/lib/aziot/edged/mnt/"imagename".sock is correctly mounted.

Stopped my-rust-app module in portal and checked that the server is not listening anymore on registry by doing:
"sudo curl --unix-socket /var/lib/iotedge/mnt/my-rust-app.sock http:/dummy -v"

Killed the my-rust-app module by removing it in portal and ran "ls /var/lib/aziot/edged/mnt" and verified that my-rust-app.sock had been correctly removed.

Did sudo systemctl restart iotedge and verify that everything comes back online

Killed edged process manually and verify that everything comes back online

Updated my-rust-app image and check it got updated correctly.

Ran iotedge check tests and verified everything was green.

Pipeline test:
Image: https://dev.azure.com/msazure/One/_build/results?buildId=44362377&view=results
edgelet: https://dev.azure.com/msazure/One/_build/results?buildId=44362632&view=results
Test: https://dev.azure.com/msazure/One/_build/results?buildId=44727164&view=results

Also tested on windows:
sub test: with old 1.1.4
sub test with new image.

huguesBouvier and others added 3 commits July 7, 2021 23:08
* One workload socket per module

* mend

Co-authored-by: Ubuntu <azureuser@debug.icpwq1ktqjpeznogd3czb2hold.cx.internal.cloudapp.net>
…Azure#5195)

Implement throttling mechanism to prevent spamming of workload socket.

Test:
Created a separate module and ran the following command with the module.
 seq 1 30000 | xargs -I % -P 1000 curl --unix-socket /var/run/iotedge/workload.sock  http://127.0.0.1/modules?api-version=2020-07-07 &> /dev/null&

I could not reproduce the broken pipe error but I could see parallelism go up to high 80s.
By adding the throttling it is limited to ~10
@huguesBouvier huguesBouvier force-pushed the cherry_pick_to_1.1_5195_5117 branch 8 times, most recently from 3665852 to aceda8b Compare July 9, 2021 04:20
@huguesBouvier huguesBouvier marked this pull request as ready for review July 9, 2021 05:01
@huguesBouvier huguesBouvier force-pushed the cherry_pick_to_1.1_5195_5117 branch 5 times, most recently from b72e954 to cba9ad6 Compare July 13, 2021 21:40
@huguesBouvier huguesBouvier force-pushed the cherry_pick_to_1.1_5195_5117 branch 9 times, most recently from 114b675 to 8614d3a Compare July 20, 2021 03:11
@kodiakhq kodiakhq bot merged commit b7a6d10 into Azure:release/1.1 Jul 23, 2021
@huguesBouvier huguesBouvier deleted the cherry_pick_to_1.1_5195_5117 branch July 23, 2021 18:08
@huguesBouvier huguesBouvier mentioned this pull request Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants