"config-changed" hook failed with required_mtu set: TypeError: argument of type 'int' is not iterable

Bug #1973838 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-magpie
Fix Committed
Undecided
Unassigned

Bug Description

How to reproduce:

1. deploy the edge charm:

$ juju deploy magpie --channel edge -n3
Located charm "magpie" in charm-hub, revision 3
Deploying "magpie" from charm-hub charm "magpie", revision 3 in channel edge on focal

2. set required_mtu

$ juju config magpie required_mtu=1500

unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Invoking reactive handler: reactive/magpie.py:128:check_all_node
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log MTU for iface: ens5 is 9001
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Running iperf test
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Pinging unit_id: 0
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Ping OK for unit_id: 0
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Pinging unit_id: 2
unit-magpie-1: 10:18:24 INFO unit.magpie/1.juju-log Ping OK for unit_id: 2
unit-magpie-1: 10:18:24 ERROR unit.magpie/1.juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-magpie-1/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-magpie-1/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-magpie-1/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-magpie-1/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-magpie-1/charm/reactive/magpie.py", line 135, in check_all_node
    _set_states(check_nodes(nodes))
  File "/var/lib/juju/agents/unit-magpie-1/charm/lib/charms/layer/magpie_tools.py", line 588, in check_nodes
    if "failed" not in mtu:
TypeError: argument of type 'int' is not iterable

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-magpie (master)
Changed in charm-magpie:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-magpie (master)

Reviewed: https://review.opendev.org/c/openstack/charm-magpie/+/843132
Committed: https://opendev.org/openstack/charm-magpie/commit/f22166f6ece34656ffbaa1c7093ce0aae3973ed4
Submitter: "Zuul (22348)"
Branch: master

commit f22166f6ece34656ffbaa1c7093ce0aae3973ed4
Author: Nobuto Murata <email address hidden>
Date: Tue May 24 20:38:42 2022 +0900

    Fix a type error in the MTU evaluation

    To avoid the following error since required_mtu is int:
    TypeError: argument of type 'int' is not iterable

    Closes-Bug: #1973838
    Change-Id: I36796018a537e6030bf46f283f1c74ef1fe4772c

Changed in charm-magpie:
status: In Progress → Fix Committed
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.