Open derSchtefan opened 3 years ago
I have the same error, running IoTEdge 1.0.9, edgeAgent 1.0 & edgeHub 1.0.
edgeAgent does not report any proxy values (https or http), but edgeHub does report them in the IoT Hub.
@derSchtefan thank you for the feedback. Restating your expectation to confirm my understanding... proxy settings specified in the config file should always apply to the running edgeAgent. I.e. setting the proxy environment variables in every subsequent deployment manifest shouldn't be necessary. And, those persistent proxy settings should be reported in the portal. Is that correct?
Yes, that would be perfect. But already simply reporting the value back to the iot hub at the initial startup (when the system enters a 417 - deployment not set) would be an advantage.
Of course, in general, the person installing the edge device will have had to set the proxy in the config files anyway, and unless it is overridden from the cloud, this should always be the proxy used.
Currently it is easy to brick an edge device by deploying an iot solution that has not had the edgeagent properties correctly individualized. The edge agent will lose connection, and will never be able to get the correct manifest.
Background
In an environment with a proxy required to gain outside access, the config.yaml (IoT 1.1) is modified by the person installing the edge device so that the initial edgeAgent docker module creation sets the environment variables https_proxy and UpstreamProtocol: AmqpWs.
This allows the edgeAgent to connect to IoT Hub initially, and report a 417 - Configuration not set. Any subsequent deployment will need to specify these settings from the cloud side again, making it required to also store the device's proxy settings there.
Expected Behavior
After the initial connection, we expect that the edge agent reports the http_proxy / https_proxy variables that have been set to him in the "reported properties". This way the settings can be retained or honoured when deploying a solution.
Current Behavior
The edge agent logs that it detected the proxy setting, uses the proxy, but does not report those environment variables to the cloud. Any deployment performed subsequently without those exact proxy settings will brick the device, because the edge agent will be overwritten with missing/wrong proxy settings.
Steps to Reproduce
Provide a detailed set of steps to reproduce the bug.
Context (Environment)
Device Information
Runtime Versions