This fix does not seem to work with current charm releases (tested from 30 to 32).
Proxy is configured in juju-*-proxy vars in juju model, but are *not* configured in /etc/environment. If I do set normal http_proxy vars, it works.
All the files sourced in the glance-simplestreams-sync.sh script are empty in the environment I'm deploying. That script is copied to /usr/share and runs from cron. From there, it just cannot use the juju-*-proxy vars anymore, and as I said, all places where it should be are empty.
I created a workaround in which on "install" hook I check if the juju proxy vars are set and write them to /etc/juju-proxy.conf (this is one of the sourced files in the script). It works, fixed the problem. I just don't know if this is the best approach.
This fix does not seem to work with current charm releases (tested from 30 to 32).
Proxy is configured in juju-*-proxy vars in juju model, but are *not* configured in /etc/environment. If I do set normal http_proxy vars, it works.
All the files sourced in the glance- simplestreams- sync.sh script are empty in the environment I'm deploying. That script is copied to /usr/share and runs from cron. From there, it just cannot use the juju-*-proxy vars anymore, and as I said, all places where it should be are empty.
I created a workaround in which on "install" hook I check if the juju proxy vars are set and write them to /etc/juju- proxy.conf (this is one of the sourced files in the script). It works, fixed the problem. I just don't know if this is the best approach.
The changed code is here: https:/ /code.launchpad .net/~andre- ruiz/+git/ charm-glance- simplestreams- sync-proxy- fix
The charm with the applied fix is here: https:/ /jaas.ai/ u/andre- ruiz/glance- simplestreams- sync/0