google / shipshape

Program analysis platform
Apache License 2.0
269 stars 35 forks source link

Long-lived shipshape service can't change directories #33

Closed ciera closed 9 years ago

ciera commented 9 years ago

Before starting up, we need to check the volume that is mounted to the shipshape directory. If the files we need to analyzer are not contained within that volume, we need to tear it down and restart it.

We run the risk of always restarting if the user keeps changing which directory they analyze. We could possibly keep multiple copies of the container open in this case. I'm going to start by just restarting when it doesn't match, and we'll see how that works in practice.

ciera commented 9 years ago

Test comment. Did any of the other admins get this through a notification email?

amshali commented 9 years ago

Not yet resolved for me. Still getting findings from previous runs.

collinw commented 9 years ago

@amshali, did you build Shipshape from head, or did you use one of our prebuilt Docker containers?

amshali commented 9 years ago

I downloaded it. (prebuilt Docker containers I suppose)

amshali commented 9 years ago

Any update on this?

ciera commented 9 years ago

I'm back from my trips. I thought I had fixed and released this, but emso says the release hasn't happened in a while. Looking into it.

On Mon, Jun 1, 2015 at 12:23 PM, Amin Shali notifications@github.com wrote:

Any update on this?

— Reply to this email directly or view it on GitHub https://github.com/google/shipshape/issues/33#issuecomment-107677284.

ciera commented 9 years ago

Newest version of shipshape has been released. Try downloading it now.

amshali commented 9 years ago

Not fixed.

ciera commented 9 years ago

Reopening and assigning to emsod.

Note: I had implemented this by checking to see if the new directory is a subdirectory of the one we already have, and reusing it if possible. Otherwise, it tears down and restarts the container with the correct directory. This logic is somewhat confusing though, so I might have missed a case that amshali is hitting.

You might try instead creating a symlink (in /tmp/shipshape?) and then changing the symlink to point to the desired directory. I don't know if that will actually work (not sure how docker maps the volumes...will it follow the symlink when it maps? Or will it just map to the symlink itself?) It would be a cleaner and more reliable implementation if it works.

amshali commented 9 years ago

Looking forward to an actual fix. Thanks!

emsod commented 9 years ago

This issue appears to be resolved in the latest release.