Monday, 2024-02-12

timburkezigo, yeah, os.statvfs seems like a good plan -- it's what we use for our reserve checks, fwiw04:26
opendevreviewThomas Goirand proposed openstack/swift master: drive-full-checker  https://review.opendev.org/c/openstack/swift/+/90752310:25
opendevreviewThomas Goirand proposed openstack/swift master: drive-full-checker  https://review.opendev.org/c/openstack/swift/+/90752310:25
opendevreviewAlistair Coles proposed openstack/swift master: Add ClosingIterator class; be more explicit about closes  https://review.opendev.org/c/openstack/swift/+/90465211:28
opendevreviewAlistair Coles proposed openstack/swift master: WIP s3api: add more MPU cross-compat  tests  https://review.opendev.org/c/openstack/swift/+/90775112:38
opendevreviewThomas Goirand proposed openstack/swift master: drive-full-checker  https://review.opendev.org/c/openstack/swift/+/90752312:41
opendevreviewThomas Goirand proposed openstack/swift master: drive-full-checker  https://review.opendev.org/c/openstack/swift/+/90752313:45
zigotimburke: Hi! You told me to use swift.common.utils.ismount, but in my latest patch iteration, that's what's causing my test to fail. If I replace it by os.path.ismount, then tests are passing. What am I doing wrong?21:27
zigoWhat kind of object is swift.common.utils.ismount returning?21:28
timburkehuh -- should just return True/False: https://github.com/openstack/swift/blob/master/swift/common/utils/__init__.py#L3943-L400121:29
zigoRight, which is why I don't get it.21:31
zigotimburke: Can I also use a decoration like this? @mock.patch('swift.common.utils.ismount')21:32
zigoThen later: os_path_ismount.return_value = 121:32
zigo(to me fully compliant, I should be returning True and not 1, but that isn't the issue...)21:34
zigoIs it possible that mocking os.statvfs interfers?21:36
timburkezigo, i'd definitely be fine with mocking out ismount in a decorator like that. i wouldn't have thought that the statvfs mock would interfere, but i guess maybe? i haven't looked at the failures yet, though21:38
zigoWell, the failures are because the mocking doesn't seem working, and ismount always replies no, then rsyncd.conf isn't touched.21:40
zigos/no/false/21:41
zigoAt least that's my understanding.21:41
zigoBecause when I replace swift.common.utils.ismount by what I had before, ie: os.path.ismount, then it works.21:41
zigoI'll investigate tomorrow... :)21:48
zigoThanks for the review and help.21:48
timburkeoh! i see it now! the drive checker isn't using something named swift.common.utils.ismount, it's importing that then using (essentially) swift.cli.drive_full_checker.ismount ...23:41
opendevreviewTim Burke proposed openstack/swift master: drive-full-checker  https://review.opendev.org/c/openstack/swift/+/90752323:54

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!