MDS should verify/fix backtrace on fetch dirfrag
"""
- self.mount_a.run_shell(["sudo", "mkdir", "testdir1"])
- self.mount_a.run_shell(["sudo", "touch", "testdir1/testfile"])
+ self.mount_a.run_shell(["mkdir", "testdir1"])
+ self.mount_a.run_shell(["touch", "testdir1/testfile"])
dir_objname = "{:x}.00000000".format(self.mount_a.path_to_ino("testdir1"))
# drop inodes caps
# readdir (fetch dirfrag) should fix testdir1's backtrace
self.mount_a.mount()
self.mount_a.wait_until_mounted()
- self.mount_a.run_shell(["sudo", "ls", "testdir1"])
+ self.mount_a.run_shell(["ls", "testdir1"])
# flush journal entries to dirfrag objects
self.fs.mds_asok(['flush', 'journal'])
test if MDS behave correct when it's readonly
"""
# operation should successd when MDS is not readonly
- self.mount_a.run_shell(["sudo", "touch", "test_file1"])
+ self.mount_a.run_shell(["touch", "test_file1"])
writer = self.mount_a.write_background(loop=True)
time.sleep(10)
# touching test file should fail
try:
- self.mount_a.run_shell(["sudo", "touch", "test_file1"])
+ self.mount_a.run_shell(["touch", "test_file1"])
except CommandFailedError:
pass
else:
count = 500
# Create lots of files
for i in range(count):
- self.mount_a.run_shell(["sudo", "touch", "f{0}".format(i)])
+ self.mount_a.run_shell(["touch", "f{0}".format(i)])
# Populate mount_b's cache
- self.mount_b.run_shell(["sudo", "ls"])
+ self.mount_b.run_shell(["ls"])
client_id = self.mount_b.get_global_id()
num_caps = self._session_num_caps(client_id)
self._initial_state = self._mount.stat("datafile")
def validate(self):
- p = self._mount.run_shell(["sudo", "getfattr", "--only-values", "-n", "ceph.file.layout.object_size", "./datafile"])
+ p = self._mount.run_shell(["getfattr", "--only-values", "-n", "ceph.file.layout.object_size", "./datafile"])
# Check we got the layout reconstructed properly
object_size = int(p.stdout.getvalue().strip())
self.fs.wait_for_daemons()
self.mount_a.mount()
self.mount_a.wait_until_mounted()
- out = self.mount_a.run_shell(["sudo", "cat", "subdir/{0}".format(victim_dentry)]).stdout.getvalue().strip()
+ out = self.mount_a.run_shell(["cat", "subdir/{0}".format(victim_dentry)]).stdout.getvalue().strip()
self.assertEqual(out, victim_dentry)
# Finally, close the loop by checking our injected dentry survives a merge
# look orphaned to backward scan if backward scan wisnae
# respectin' tha scrub_tag xattr.
self.mount_a.mount()
- self.mount_a.run_shell(["sudo", "mkdir", "parent/unflushed"])
- self.mount_a.run_shell(["sudo", "dd", "if=/dev/urandom",
+ self.mount_a.run_shell(["mkdir", "parent/unflushed"])
+ self.mount_a.run_shell(["dd", "if=/dev/urandom",
"of=./parent/unflushed/jfile",
"bs=1M", "count=8"])
inos["./parent/unflushed"] = self.mount_a.path_to_ino("./parent/unflushed")
# We will run the deletion in the background, to reduce the risk of it completing before
# we have started monitoring the stray statistics.
def background():
- self.mount_a.run_shell(["sudo", "rm", "-rf", "delete_me"])
+ self.mount_a.run_shell(["rm", "-rf", "delete_me"])
self.fs.mds_asok(["flush", "journal"])
background_thread = gevent.spawn(background)