Hi Steve,

On Thu, Sep 08, 2011 at 09:12:53PM -0000, Steve Atwell wrote:
> Steve, I'm looking at your change to gssd.conf and idmapd.conf, and it
> looks like you've got a race condition.  You add the following to the
> pre-start script of both:

>         if ! mountpoint -q "$PIPEFS_MOUNTPOINT"
>         then
>                 mount -t rpc_pipefs rpc_pipefs "$PIPEFS_MOUNTPOINT"
>         fi

> The problem is that the filesystem could get mounted between when you
> check with mountpoint and when you call mount.  And because mount is the
> last command in the pre-start script, if it fails then the pre-start
> will fail, preventing the job from starting.  I haven't actually seen
> this issue, but since two jobs are running this same code around the
> same time, it definitely seems like a possibility.

> Probably a simple "|| true" on the mount command would be sufficient.
> If the mountpoint isn't actually there when rpc.gssd or rpc.idmapd
> starts, that process will exit and upstart will retry.

You're right that this is not atomic; however, I believe the worst-case
scenario is that the kernel fs will be mounted twice at the same mount
point, which should not cause significant problems.  (I have seen this
outcome in practice on my machine while testing.)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/811823

Title:
  idmapd upstart job ends in an inconsistent state if /usr is a separate
  partition

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/811823/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to