removing a source config causes turku-update-config to error

Bug #1657240 reported by Michael Foley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Turku Backup System
New
Undecided
Unassigned

Bug Description

Removing a source from /etc/turku-agent/sources.d/ causes turku-update-config to error.

After deleting or renaming a .json file to .json.disabled the I get this error:

$ sudo turku-update-config
Traceback (most recent call last):
  File "/usr/bin/turku-update-config", line 20, in <module>
    sys.exit(update_config.main(sys.argv))
  File "/usr/lib/python2.6/dist-packages/turku_agent/update_config.py", line 142, in main
    config = load_config(args.config_dir)
  File "/usr/lib/python2.6/dist-packages/turku_agent/utils.py", line 211, in load_config
    for s in sources_config:
RuntimeError: dictionary changed size during iteration

I discovered this is because it still reads in configs from /var/lib/turku-agent/sources.d/ and then tries changing a dictionary while iterating over it.

Removing the corresponding file from /var/lib/turku-agent/sources.d/ fixes it.

Related branches

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.