Skip to content

Running "charm build" on a limited-IPv6 system is very slow due to connection failures #617

@barryprice

Description

@barryprice

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

I ran the following command: snap info charm and got the following ouput:

name:      charm
summary:   charm and charm-tools
publisher: Canonical✓
store-url: https://snapcraft.io/charm
contact:   https://discourse.juju.is/c/charming
license:   unset
description: |
  charmstore-client and charm-tools
commands:
  - charm
snap-id:      2Rryoc2ylScfbFl4eQtpntHD9iuZuMvt
tracking:     latest/stable
refresh-date: 2021-06-25
channels:
  latest/stable:    2.8.2               2021-02-01 (609) 119MB classic
  latest/candidate: 2.8.2               2021-02-01 (609) 119MB classic
  latest/beta:      2.8.2               2021-02-01 (609) 119MB classic
  latest/edge:      2.8.3+git-1-736b1ad 2021-02-23 (620) 119MB classic
installed:          2.8.2                          (609) 119MB classic

I am using: Ubuntu 22.04 on amd64

Issue/Feature

I expect/expected the following

Running charm build on a system with full IPv4 but limited IPv6 connectivity results in a very long wait with no output, even with --debug set on the command line.

Edited to add: I have no native ISP support for IPv6, but my work VPN gives me limited IPv6 connectivity to work networks - but not to the wider IPv6 internet. The problem only appears when connected to that VPN. So this is much more of an edge case than I'd realised when first filing this.

What I got

$ charm --debug build
build: The lockfile /home/ubuntu/charms/ntp-charm/build.lock was not found; building using latest versions.
build: Destination charm directory: /home/ubuntu/charms/builds/ntp
[...very long wait - 15 mins so far, at time of writing...]

Using strace shows what's actually happening - the tooling is attempting to connect to juju.github.io, but is trying each of its four AAAA records in turn before falling back to its A records, with what seems to be a very long timeout.

As a first step, I think it's reasonable for --debug to output what site the tooling is trying to reach.

Ideally, it would be smart enough to figure out early whether a working IPv6 link to the target is available, and prefer IPv4 if not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions