Project

General

Profile

Bug #55686

mgr/dashboard/iscsi: RuntimeError: dictionary changed size during iteration

Added by Ernesto Puerta almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Category:
Component - iSCSI
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
pacific quincy
Regression:
No
Severity:
4 - irritation
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Description of problem

While upgrading from 16.2.7 to 16.2.8 (but likely unrelated to this new release, since no iSCSI changes have been made there):

xxxxxxxxxxxxxxxxxxxx mgr.ceph-01.xxxxx [WRN] Failed to set Dashboard config for iSCSI: dashboard iscsi-gateway-add failed: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1448, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 414, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/mgr_module.py", line 450, in check
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_cli.py", line 36, in add_iscsi_gateway
    IscsiGatewaysConfig.add_gateway(name, service_url)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 87, in add_gateway
    config = cls.get_gateways_config()
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 105, in get_gateways_config
    return cls._load_config_from_store()
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 48, in _load_config_from_store
    cls.update_iscsi_config(config)
  File "/usr/share/ceph/mgr/dashboard/services/iscsi_config.py", line 58, in update_iscsi_config
    for gateway_name, gateway_config in config['gateways'].items():
RuntimeError: dictionary changed size during iteration
 retval: -22

The user reported that their iSCSI deployment didn't exhibit any issue though.

dictionary changed size during iteration exception is raised when a dictionary is mutated while iterated:
  • it can happen because the dictionary is modified in the very loop where it's iterated,
  • or when multiple threads are accessing the same dictionary.

Related issues

Copied to Dashboard - Bug #56117: mgr/dashboard: upgrade pylint to 2.15 Need More Info
Copied to Dashboard - Backport #56118: pacific: mgr/dashboard/iscsi: RuntimeError: dictionary changed size during iteration Resolved
Copied to Dashboard - Backport #56119: quincy: mgr/dashboard/iscsi: RuntimeError: dictionary changed size during iteration Resolved

History

#1 Updated by Pedro González Gómez almost 2 years ago

  • Assignee set to Pedro González Gómez

#2 Updated by Ernesto Puerta almost 2 years ago

  • Status changed from New to Need More Info

#3 Updated by Pedro González Gómez almost 2 years ago

  • Pull request ID set to 46533

#4 Updated by Ernesto Puerta almost 2 years ago

  • Copied to Bug #56117: mgr/dashboard: upgrade pylint to 2.15 added

#5 Updated by Ernesto Puerta almost 2 years ago

  • Status changed from Need More Info to Pending Backport
  • Backport set to pacific quincy

#6 Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56118: pacific: mgr/dashboard/iscsi: RuntimeError: dictionary changed size during iteration added

#7 Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56119: quincy: mgr/dashboard/iscsi: RuntimeError: dictionary changed size during iteration added

#8 Updated by Pedro González Gómez over 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF