update_security_db.sh script fails with "Network is unreachable" error behind proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Charm |
New
|
Undecided
|
Unassigned |
Bug Description
First of all, due to this bug[0], landscape is deployed with the http(s)-proxy model-config instead of juju-http(s)-proxy.
The deployment of landscape-scalable bundle will successfully complete.
However, on the landscape dashboard, I do see one alert on the bottom as
"1 Landscape script has issues: 1 didn't run"
which is update_
When I run this script manually on landscape-server unit, I do see the following error(added "set -x" in the script file in order to see the error).
$ sudo -u landscape /opt/canonical/
--- EXCERPT OUTPUT ---
+ logger -p info -t update-security-db -- ' % Total % Received % Xferd Average Speed Time Time Time Current
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to usn.ubuntu.com port 443 after 304 ms: Network is unreachable'
+ exit 1
+ release_lock update_
+ get_distributed
+ local command=
+ /opt/canonical/
+ rm -f /var/lock/
However, when I run this without specifying the landscape user, the script will complete without any errors.
It looks like the proxy configuration from model-config is not properly used with the landscape user.
The workaround I found is to configure the "Proxy for HTTP and HTTPS traffic" from the Landscape Web UI.
I have tried by configuring via charm config[1], but that did not help unfortunately.
[0] https:/
[1] https:/