sunbeam terraform apply fails behind proxy

Bug #2032783 reported by eblock@nde.ag
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
New
Undecided
Unassigned

Bug Description

I wanted to try the sunbeam setup for the first time, following [1]. It's a virtual machine behind a proxy, environment variables are set like this:

root@sunbeam:~# cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
HTTP_PROXY="http://<IP>:<PORT>"
HTTPS_PROXY="http://<IP>:<PORT>"
http_proxy="http://<IP>:<PORT>"
https_proxy="http://<IP>:<PORT>"
NO_PROXY="localhost, <our_domain>, 172.17.2.0/24"
no_proxy="localhost, <our_domain>, 172.17.2.0/24"

The initial steps (install openstack snap, prepare-node-script) seem to work with the proxy, but it fails at terraform apply:

---snip---
root@sunbeam:~# sudo sunbeam cluster bootstrap --accept-defaults
terraform apply failed:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # juju_application.sunbeam-machine will be created
  + resource "juju_application" "sunbeam-machine" {
      + constraints = (known after apply)
      + id = (known after apply)
      + model = "controller"
      + name = "sunbeam-machine"
      + placement = (known after apply)
      + principal = (known after apply)
      + trust = false
      + units = 0

      + charm {
          + channel = "latest/edge"
          + name = "sunbeam-machine"
          + revision = (known after apply)
          + series = "jammy"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
juju_application.sunbeam-machine: Creating...
juju_application.sunbeam-machine: Still creating... [10s elapsed]
juju_application.sunbeam-machine: Still creating... [20s elapsed]
juju_application.sunbeam-machine: Still creating... [30s elapsed]

Error: resolving with preferred channel: Post "https://api.charmhub.io/v2/charms/refresh": dial tcp 185.125.188.54:443: i/o timeout

  with juju_application.sunbeam-machine,
  on main.tf line 29, in resource "juju_application" "sunbeam-machine":
  29: resource "juju_application" "sunbeam-machine" {

Error: Command '['/snap/openstack/236/bin/terraform', 'apply', '-auto-approve', '-no-color', '-parallelism=1']' returned non-zero exit status 1.
---snip---

This error usually is related to a direct attempt to reach the URL instead of using the proxy. Is there something else missing to honor the proxy?

[1] https://microstack.run/#get-started

Tags: proxy
Revision history for this message
eblock@nde.ag (eblock) wrote :

I also tried setting all the proxy variables in .local/share/juju/bootstrap-config.yaml (with and without "http://" prefix) but to no avail. Do I need to restart anything before that can work? I stopped and started juju (snap stop juju, snap start juju), doesn't make a difference.

James Page (james-page)
tags: added: 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.