mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 69132: Used mount(8) to make XFS loop device mounts.
Date Wed, 24 Oct 2018 15:17:28 GMT


> On Oct. 24, 2018, 12:59 a.m., Ilya Pronin wrote:
> > src/tests/containerizer/xfs_quota_tests.cpp
> > Lines 147-152 (original), 147-164 (patched)
> > <https://reviews.apache.org/r/69132/diff/1/?file=2102092#file2102092line147>
> >
> >     The command looks the same in both cases, the only difference is options. Maybe
avoid duplicating code by constructing it? Like
> >     ```c++
> >     string mountCmd = strings::format(
> >         "mount -t xfs%s %s %s",
> >         mountOptions.isNone() ? " " : " -o " + mountOptions.get(),
> >         loopDevice.get(),
> >         mntPath);
> >     ```

Good point, I'll fix that. I think this looks a little cleaner:

```C
   const string mountCmd = mountOptions.isNone()
     ? strings::format("mount -t xfs %s %s", loopDevice.get(), mntPath),
     : strings::format("mount -t xfs -o %s %s %s",
              mountOptions.get(), loopDevice.get(), mntPath);
```


- James


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69132/#review209940
-----------------------------------------------------------


On Oct. 23, 2018, 11:17 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69132/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2018, 11:17 p.m.)
> 
> 
> Review request for mesos, Ilya Pronin, Jacob Janco, and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When we added the `filesystem/linux` isolator to the XFS isolation
> tests, we broke them for older Linux distributions (specifically
> CentOS 6). The `filesystem/linux` isolator needs to remount the
> work directory in shared mode using `mount(8)`, but `mount(8)`
> requires the mount point it is manipulating to be present in
> `mtab(5)`. Since the XFS tests simply issued a `mount(2)` system
> call, `mtab(5)` wasn't updated and the remount would fail. Modern
> Linux distributions don't see this problem because `/` is mounted
> shared by default, and `mtab(5)` is a symlink to `/proc/self/mounts`
> (i.e. always in sync).
> 
> The straightforward fix is to run `mount(8)` to make the XFS test
> fixture mounts, so that `mount(8)` always sees a consistent view of
> `mtab(5)`.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/xfs_quota_tests.cpp 084df067a8d97efdc86fc0ed878bc3f2edca06e5

> 
> 
> Diff: https://reviews.apache.org/r/69132/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check (Fedora 28, CentOS 6)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message