juju controller doesn't reference juju-https-proxy when deploying from charmhub

Bug #1973738 reported by Yoshi Kadokawa
46
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Heather Lanigan

Bug Description

using juju v2.9.29, and bootstrapped juju on openstack with the following model-default configuration.
https://pastebin.canonical.com/p/F4MTrMTfzX/

bootstrap has completed successfully, however, I'm not able to deploy any application via charmhub.
Via charmstore(cs:) url deploys okay.

For example:

$ juju deploy ubuntu
ERROR resolving with preferred channel: Post "https://api.charmhub.io/v2/charms/refresh": dial tcp 185.125.188.58:443: i/o timeout

$ juju deploy cs:ubuntu
Located charm "ubuntu" in charm-store, revision 18
Deploying "ubuntu" from charm-store charm "ubuntu", revision 18 in channel stable on focal

Using cs url should work as a workaround, however, due to the following bug, charms with resources will fail to deploy.
 bug,https://bugs.launchpad.net/snapstore-server/+bug/1971920

Tags: regression
Revision history for this message
Yoshi Kadokawa (yoshikadokawa) wrote :

since charms with charm resources won't work with cs url, there is no way to deploy application at the moment.
subscribing this to field-critical

Revision history for this message
Juan M. Tirado (tiradojm) wrote :

could you please confirm that `curl -x proxy.me:8080 https://api.charmhub.io` works when executed in the controller machine?

Revision history for this message
Yoshi Kadokawa (yoshikadokawa) wrote :

Here is a more verbose output when it fails, by running

$ juju deploy --show-log --logging-config='<root>=TRACE' ubuntu

https://pastebin.canonical.com/p/xkTZRS7DbP/

Revision history for this message
Nobuto Murata (nobuto) wrote :

> could you please confirm that `curl -x proxy.me:8080 https://api.charmhub.io` works when executed in the controller machine?

Yoshi has confirmed it earlier in the day.

Also,

> $ juju deploy cs:ubuntu
> Located charm "ubuntu" in charm-store, revision 18
> Deploying "ubuntu" from charm-store charm "ubuntu", revision 18 in channel stable on focal

This proves that the proxy is working as expected (for https://api.charmhub.io/charms/v5/ubuntu/meta/any) since the specific environment doesn't have a direct internet access neither from the cli client nor the controller. That's why we suspect that somehow the proxy info is missing in the call specific to ch: prefix.

Revision history for this message
Yoshi Kadokawa (yoshikadokawa) wrote :

yes, it is reachable when you specify the proxy.

ubuntu@juju-bdbeba-controller-0:~$ curl -x http://proxy.me:8080 https://api.charmhub.io
charmhub.io store API service - Copyright 2020 Canonical.

Revision history for this message
Juan M. Tirado (tiradojm) wrote :

Could you please add the former

http-proxy: http://proxy.me:8080
https-proxy: http://proxy.me:8080

to the configuration?

Changed in juju:
importance: Undecided → Critical
milestone: none → 2.9.31
status: New → Triaged
Revision history for this message
Hernan Garcia (hernandanielg) wrote :

Made changes to use legacy http proxy variables

$ juju model-config juju-http-proxy=""
$ juju model-config juju-https-proxy=""
$ juju model-config http-proxy="http://proxy.me:8080"
$ juju model-config https-proxy="http://proxy.me:8080"

$ juju model-config | grep -E https?-proxy
apt-http-proxy controller http://proxy.me:8080
apt-https-proxy controller http://proxy.me:8080
http-proxy model http://proxy.me:8080
https-proxy model http://proxy.me:8080
juju-http-proxy default ""
juju-https-proxy default ""
snap-http-proxy controller http://proxy.me:8080
snap-https-proxy controller http://proxy.me:8080

But it's still failing

$ juju deploy ubuntu
ERROR resolving with preferred channel: Post "https://api.charmhub.io/v2/charms/refresh": dial tcp 185.125.188.58:443: i/o timeout

Revision history for this message
Tim Schneider (tim5chneider) wrote :

I have the same problem with juju v2.9.29
Systemwide proxy and curl with proxy works perfect but deploying with juju ends in an error.
I followed these How-to but it doesn't work.
https://discourse.charmhub.io/t/how-to-deploy-charmed-kubeflow-on-microk8s-behind-a-web-proxy/6357/1

Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
status: Triaged → In Progress
tags: added: regression
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

https://github.com/juju/http/pull/8 has to be landed and juju updated accordingly.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Hernan Garcia (hernandanielg) wrote :

I've built juju fromm 2.9 branch and confirmed bug is gone

Changed in juju:
milestone: 2.9.31 → 2.9.30
milestone: 2.9.30 → 2.9.31
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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