timburke | zigo, yeah, os.statvfs seems like a good plan -- it's what we use for our reserve checks, fwiw | 04:26 |
---|---|---|
opendevreview | Thomas Goirand proposed openstack/swift master: drive-full-checker https://review.opendev.org/c/openstack/swift/+/907523 | 10:25 |
opendevreview | Thomas Goirand proposed openstack/swift master: drive-full-checker https://review.opendev.org/c/openstack/swift/+/907523 | 10:25 |
opendevreview | Alistair Coles proposed openstack/swift master: Add ClosingIterator class; be more explicit about closes https://review.opendev.org/c/openstack/swift/+/904652 | 11:28 |
opendevreview | Alistair Coles proposed openstack/swift master: WIP s3api: add more MPU cross-compat tests https://review.opendev.org/c/openstack/swift/+/907751 | 12:38 |
opendevreview | Thomas Goirand proposed openstack/swift master: drive-full-checker https://review.opendev.org/c/openstack/swift/+/907523 | 12:41 |
opendevreview | Thomas Goirand proposed openstack/swift master: drive-full-checker https://review.opendev.org/c/openstack/swift/+/907523 | 13:45 |
zigo | timburke: 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 |
zigo | What kind of object is swift.common.utils.ismount returning? | 21:28 |
timburke | huh -- should just return True/False: https://github.com/openstack/swift/blob/master/swift/common/utils/__init__.py#L3943-L4001 | 21:29 |
zigo | Right, which is why I don't get it. | 21:31 |
zigo | timburke: Can I also use a decoration like this? @mock.patch('swift.common.utils.ismount') | 21:32 |
zigo | Then later: os_path_ismount.return_value = 1 | 21:32 |
zigo | (to me fully compliant, I should be returning True and not 1, but that isn't the issue...) | 21:34 |
zigo | Is it possible that mocking os.statvfs interfers? | 21:36 |
timburke | zigo, 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, though | 21:38 |
zigo | Well, the failures are because the mocking doesn't seem working, and ismount always replies no, then rsyncd.conf isn't touched. | 21:40 |
zigo | s/no/false/ | 21:41 |
zigo | At least that's my understanding. | 21:41 |
zigo | Because when I replace swift.common.utils.ismount by what I had before, ie: os.path.ismount, then it works. | 21:41 |
zigo | I'll investigate tomorrow... :) | 21:48 |
zigo | Thanks for the review and help. | 21:48 |
timburke | oh! 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 |
opendevreview | Tim Burke proposed openstack/swift master: drive-full-checker https://review.opendev.org/c/openstack/swift/+/907523 | 23:54 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!