Azure / Azure/iotedge

EdgeAgent does not report environment vars (Proxy Settings, create options) back to IoT hub on first connect

Open
#5,421 3 comments 0 reactions 0 assignees View on GitHub
1.1.1 area:host_configuration customer-reported enhancement iotedge
Dominant language
C#
Stars
1.5k
Forks
473
Avg merge
2d 17h
Merged PRs (30d)
7

Description

## 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.
1. Setup an edge device in a network configuration that requires a proxy
2. Setup the proxy like specified here https://docs.microsoft.com/en-us/azure/iot-edge/how-to-configure-proxy-support?view=iotedge-2018-06&preserve-view=true
3. Let the edge Agent connect to IoT hub
4. Observe that the edge agent logs the proxy to the log file, but does not report the environment variable as being set

## Context (Environment)

### Device Information
* Ubuntu 18.04
* amd64

### Runtime Versions
* iotedge 1.1.1
* Agent 1.1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the edgeAgent configuration and reported-properties handling, using the proxy setup described in the linked documentation and the edgeAgent logs as the reproduction path. Reproduce on Ubuntu 18.04 with IoT Edge 1.1.1, then verify that the configured http_proxy and https_proxy values are reported after the initial connection and remain available for later deployments.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, docker
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.