1.24/beta MetalLB charms stay blocked: Error fetching image information

Bug #1970657 reported by Bas de Bruijne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MetalLB Operator
Fix Released
Undecided
Adam Dyess

Bug Description

Testing the latest/beta MetalLB charms with the bundle:

```
bundle: kubernetes
applications:
  metallb-controller:
    charm: metallb-controller
    channel: latest/beta
    scale: 1
    options:
    iprange: "10.246.167.109-10.246.167.119"
  metallb-speaker:
    charm: metallb-speaker
    scale: 1
    channel: latest/beta
```

The charms get stuck

```
Model Controller Cloud/Region Version SLA Timestamp
metallb-maas foundations-maas microk8s_cloud_maas/localhost 2.9.28 unsupported 19:27:32Z

App Version Status Scale Charm Channel Rev Address Exposed Message
metallb-controller blocked 1 metallb-controller beta 11 no Error fetching image information
metallb-speaker blocked 1 metallb-speaker beta 6 no Error fetching image information

Unit Workload Agent Address Ports Message
metallb-controller/0* blocked idle Error fetching image information
metallb-speaker/0* blocked idle Error fetching image information

```

In the juju debug-log we see:
```
application-metallb-controller: 19:27:09 ERROR unit.metallb-controller/0.juju-log An error occured while fetching the image info
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/ops/model.py", line 1021, in _run
    result = run(args, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/var/lib/juju/tools/unit-metallb-controller-0/resource-get', 'metallb-controller-image')' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/oci_image.py", line 16, in fetch
    resource_path = self.model.resources.fetch(self.resource_name)
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/ops/model.py", line 872, in fetch
    self._paths[name] = Path(self._backend.resource_get(name))
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/ops/model.py", line 1112, in resource_get
    return self._run('resource-get', resource_name, return_output=True).strip()
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/ops/model.py", line 1023, in _run
    raise ModelError(e.stderr)
ops.model.ModelError: b'ERROR could not download resource: HTTP request failed: Get https://10.246.165.129:17070/model/46bb66a0-95ad-4e44-8343-dafe077cc201/units/unit-metallb-controller-0/resources/metallb-controller-image: while getting resource from the charm store: resource "metallb-controller-image" not found\n'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./src/charm.py", line 63, in _on_start
    image_info = self.image.fetch()
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/oci_image.py", line 18, in fetch
    raise MissingResourceError(self.resource_name) from e
oci_image.MissingResourceError: metallb-controller-image
application-metallb-controller: 19:27:10 INFO juju.worker.caasoperator.uniter.metallb-controller/0.operation ran "leader-elected" hook (via hook dispatching script: dispatch)
application-metallb-speaker: 19:27:12 INFO juju.worker.caasoperator operator "metallb-speaker" started
application-metallb-speaker: 19:27:12 INFO juju.worker.caasoperator.runner start "metallb-speaker/0"
application-metallb-speaker: 19:27:12 INFO juju.worker.leadership metallb-speaker/0 promoted to leadership of metallb-speaker
application-metallb-speaker: 19:27:12 INFO juju.agent.tools ensure jujuc symlinks in /var/lib/juju/tools/unit-metallb-speaker-0
application-metallb-speaker: 19:27:12 INFO juju.worker.caasoperator.uniter.metallb-speaker/0 unit "metallb-speaker/0" started
application-metallb-speaker: 19:27:12 INFO juju.worker.caasoperator.uniter.metallb-speaker/0 resuming charm install
application-metallb-speaker: 19:27:12 INFO juju.worker.caasoperator.uniter.metallb-speaker/0.charm downloading ch:amd64/focal/metallb-speaker-6 from API server
application-metallb-speaker: 19:27:12 INFO juju.downloader downloading from ch:amd64/focal/metallb-speaker-6
application-metallb-controller: 19:27:12 INFO juju.worker.caasoperator.uniter.metallb-controller/0.operation ran "config-changed" hook (via hook dispatching script: dispatch)
application-metallb-speaker: 19:27:12 INFO juju.downloader download complete ("ch:amd64/focal/metallb-speaker-6")
application-metallb-speaker: 19:27:13 INFO juju.downloader download verified ("ch:amd64/focal/metallb-speaker-6")
application-metallb-controller: 19:27:13 INFO juju.worker.caasoperator.uniter.metallb-controller/0 found queued "start" hook
application-metallb-controller: 19:27:13 INFO unit.metallb-controller/0.juju-log Running legacy hooks/start.
application-metallb-controller: 19:27:15 ERROR unit.metallb-controller/0.juju-log An error occured while fetching the image info
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-metallb-controller-0/charm/venv/ops/model.py", line 1021, in _run
    result = run(args, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/var/lib/juju/tools/unit-metallb-controller-0/resource-get', 'metallb-controller-image')' returned non-zero exit status 1.

```

For comparison, when I deploy the bundle:

```
bundle: kubernetes
applications:
  metallb-controller:
    charm: containers-metallb-controller
    scale: 1
    options:
    iprange: "10.246.167.109-10.246.167.119"
  metallb-speaker:
    charm: containers-metallb-speaker
    scale: 1
```

The charms come up as expected:

```
Model Controller Cloud/Region Version SLA Timestamp
metallb-maas foundations-maas microk8s_cloud_maas/localhost 2.9.28 unsupported 19:21:55Z

App Version Status Scale Charm Channel Rev Address Exposed Message
metallb-controller res:metallb-controller-imag... active 1 containers-metallb-controller stable 20 10.152.183.231 no
metallb-speaker res:metallb-speaker-image@d... active 3 containers-metallb-speaker stable 19 10.152.183.20 no

Unit Workload Agent Address Ports Message
metallb-controller/0* active idle 10.1.168.198 7472/TCP
metallb-speaker/0* active idle 10.246.165.200 7472/TC

```

Is there a configuration that I am missing for the new charms?

Revision history for this message
Adam Dyess (addyess) wrote :

these charms (metallb-controller and metalb-speaker) have OCI images that should have been uploaded to charmhub during the build automation step but were missed. I've manually attached the OCI images to the following releases of those charms:

Revision 13 of charm 'metallb-controller' released to 1.24/stable (attaching resources: 'metallb-controller-image' r1)
Revision 13 of charm 'metallb-controller' released to latest/stable (attaching resources: 'metallb-controller-image' r1)
Revision 13 of charm 'metallb-controller' released to 1.24/beta (attaching resources: 'metallb-controller-image' r1)
Revision 8 of charm 'metallb-speaker' released to 1.24/stable (attaching resources: 'metallb-speaker-image' r1)
Revision 8 of charm 'metallb-speaker' released to 1.24/beta (attaching resources: 'metallb-speaker-image' r1)
Revision 8 of charm 'metallb-speaker' released to latest/stable (attaching resources: 'metallb-speaker-image' r1)

Subsequent deployments of these charms should pull the necessary images from charmhub.

Sorry for the inconvenience.

Changed in operator-metallb:
status: New → Fix Released
assignee: nobody → Adam Dyess (addyess)
milestone: none → 1.24+ck1
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.