The data can be anything and also contain a `=`, causing the line to
fail with `Too many values to unpack`. In my case, it failed with
`ID_FS_LABEL=pvc_name=rook-ceph-lvm-data-44f2gc`.
Regression was introduced here: https://github.com/ceph/ceph/pull/60006
Fixes: https://tracker.ceph.com/issues/71101
Signed-off-by: Janne Heß <janne@hess.ooo>
E:DM_LV_LAYER=
E:NVME_HOST_IFACE=none
E:SYSTEMD_READY=1
+E:ENV_WITH_EQUALS_SIGN=test=abc
G:systemd
Q:systemd
V:1"""
@patch('ceph_volume.util.disk.os.minor', Mock(return_value=0))
@patch('ceph_volume.util.disk.os.major', Mock(return_value=999))
def test_dashed_path_with_bare_device(self) -> None:
- assert disk.UdevData(self.fake_device).dashed_path == '/dev/cephtest'
\ No newline at end of file
+ assert disk.UdevData(self.fake_device).dashed_path == '/dev/cephtest'
if data_type == 'I':
self.id = data
if data_type == 'E':
- key, value = data.split('=')
+ key, value = data.split('=', maxsplit=1)
self.environment[key] = value
if data_type == 'G':
self.group = data