Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.