From: Nathan Cutler Date: Wed, 16 Oct 2019 21:04:42 +0000 (+0200) Subject: misc: temporary fix for "No space left on device" errors X-Git-Tag: 1.1.0~210^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1335%2Fhead;p=teuthology.git misc: temporary fix for "No space left on device" errors 41a13eca480e38cfeeba7a180b4516b90598c39b fixed a longstanding bug that the lab was relying on. Before the bug was fixed, the get_wwn_id_map function was doing: try: r = remote.run( args=[ 'ls', '-l', '/dev/disk/by-id/wwn-*', ], stdout=StringIO(), ) stdout = r.stdout.getvalue() except Exception: log.info('Failed to get wwn devices! Using /dev/sd* devices...') return dict((d, d) for d in devs) The bug was that "remote.run" was putting single quotes around the string "/dev/disk/by-id/wwn-*" because it wasn't enclosed in Raw(...). The single quotes were causing the command to fail, triggering the except clause, and that was happening 100% of the time. The fix in 41a13eca480e38cfeeba7a180b4516b90598c39b caused the command to start succeeding, which caused execution to continue. As a result, MON stores and OSDs started getting created on the wrong devices, and tests that were previously succeeding started to fail due to "No space left on device". In short, the wwn devices on today's smithis are not big enough for /var/lib/ceph. This commit "fixes the fix" by dropping the dead code and always returning the value that qa/tasks/ceph.py has come to expect. Fixes: https://tracker.ceph.com/issues/42313 Signed-off-by: Nathan Cutler --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 1f5d88c7f..3472f8b56 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -799,41 +799,8 @@ def pull_directory_tarball(remote, remotedir, localfile): def get_wwn_id_map(remote, devs): - """ - Extract ww_id_map information from ls output on the associated devs. - - Sample dev information: /dev/sdb: /dev/disk/by-id/wwn-0xf00bad - - :returns: map of devices to device id links - """ - stdout = None - try: - stdout = remote.sh('ls -l /dev/disk/by-id/wwn-*') - except Exception: - log.info('Failed to get wwn devices! Using /dev/sd* devices...') - return dict((d, d) for d in devs) - - devmap = {} - - # lines will be: - # lrwxrwxrwx 1 root root 9 Jan 22 14:58 - # /dev/disk/by-id/wwn-0x50014ee002ddecaf -> ../../sdb - for line in stdout.splitlines(): - comps = line.split(' ') - # comps[-1] should be: - # ../../sdb - rdev = comps[-1] - # translate to /dev/sdb - dev = '/dev/{d}'.format(d=rdev.split('/')[-1]) - - # comps[-3] should be: - # /dev/disk/by-id/wwn-0x50014ee002ddecaf - iddev = comps[-3] - - if dev in devs: - devmap[dev] = iddev - - return devmap + log.warn("Entering get_wwn_id_map, a deprecated function that will be removed") + return dict((d, d) for d in devs) def get_scratch_devices(remote):