When running sre.mysql.depool with --downtime against a parsercache instance (e.g. pc2021), the cookbook fails with:
TypeError: 'int' object is not subscriptable
[05:49:11] marostegui@cumin1003:~$ sudo cookbook sre.mysql.depool -r "Migration to 10.11.18 T428861" --downtime 2 pc2021
Acquired lock for key /spicerack/locks/cookbooks/sre.mysql.depool:pc2021: {'concurrency': 1, 'created': '2026-06-15 05:49:30.895769', 'owner': 'marostegui@cumin1003 [3955259]', 'ttl': 60}
START - Cookbook sre.mysql.depool depool pc2021: Migration to 10.11.18 T428861
Using parsercache cookbook
The whole 'pc1' section will be depooled
Exception raised while parsing arguments for cookbook sre.mysql.parsercache:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/spicerack/_menu.py", line 359, in _safe_call
ret_value = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/argparse.py", line 1874, in parse_args
args, argv = self.parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/argparse.py", line 1907, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/argparse.py", line 1950, in _parse_known_args
option_tuple = self._parse_optional(arg_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/argparse.py", line 2240, in _parse_optional
if not arg_string[0] in self.prefix_chars:
~~~~~~~~~~^^^
TypeError: 'int' object is not subscriptable
Released lock for key /spicerack/locks/cookbooks/sre.mysql.depool:pc2021: {'concurrency': 1, 'created': '2026-06-15 05:49:30.895769', 'owner': 'marostegui@cumin1003 [3955259]', 'ttl': 60}
END (PASS) - Cookbook sre.mysql.depool (exit_code=0) depool pc2021: Migration to 10.11.18 T428861I believe the fix is just:
458 - cmar.extend(["--downtime", self.downtime]) 458 + cmar.extend(["--downtime", str(self.downtime)])
However, please take a look