update_security_db.sh script fails with "Network is unreachable" error behind proxy

Bug #2091265 reported by Yoshi Kadokawa
8
This bug affects 1 person
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_security_db.sh.

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/landscape/script/update_security_db.sh
--- EXCERPT OUTPUT ---
+ logger -p info -t update-security-db -- ' % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  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_security_db.sh
+ get_distributed_lock update_security_db.sh --release
+ local command=/opt/canonical/landscape/get-distributed-lock
+ /opt/canonical/landscape/get-distributed-lock update_security_db.sh --release
+ rm -f /var/lock/update_security.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://bugs.launchpad.net/landscape-charm/+bug/2025978
[1] https://charmhub.io/landscape-client/configurations#http-proxy

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.