Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image files not always copied from temp directory to vdb directory #87

Open
amwhite opened this issue Feb 16, 2015 · 8 comments
Open

image files not always copied from temp directory to vdb directory #87

amwhite opened this issue Feb 16, 2015 · 8 comments

Comments

@amwhite
Copy link

amwhite commented Feb 16, 2015

Specifically, when makeDisplay() calls file.rename() to move the files from temp directory to the vdb directory, it does not work correctly when the temp dir is on a different partition or drive from the vdb dir.

Error message:

> vdbConn("vdb_netflow", autoYes=TRUE)
vdb connection object: [name:none]; path=/people/d3l348/vdb_netflow
> makeDisplay(hostTimeAgg,
+             name = "hourly_count",
+             group = "inside_hosts",
+             desc = "time series plot of hourly counts of connections for each inside host",
+             panelFn = timePanel,
+             cogFn = timeCog,
+             width = 800, height = 400,
+             lims = list(x = "same", y = "same")
+ )
* Validating 'panelFn'...
* Testing cognostics function on a subset ... ok
* Precomputed limits not supplied.  Computing axis limits...
Testing 'prepanelFn' on a subset...
Using 'trellis' panelFn to determine limits... dx and dy will not be computed.
At least one of the variables is not numeric.  Casting as numeric for quantile calculation purposes.
* Storing display object...
* Plotting thumbnail...
* Updating displayList...
Error: Files needed for building trelliscope display were not correctly moved to '/people/d3l348/vdb_netflow/displays/inside_hosts/hourly_count'
In addition: Warning messages:
1: In file.rename(dir(tempPrefix, full.names = TRUE), file.path(displayPrefix,  :
  cannot rename file '/tmp/Rtmpvspqcq/file471234e32bc4/displayObj.Rdata' to '/people/d3l348/vdb_netflow/displays/inside_hosts/hourly_count/displayObj.Rdata', reason 'Invalid cross-device link'
2: In file.rename(dir(tempPrefix, full.names = TRUE), file.path(displayPrefix,  :
  cannot rename file '/tmp/Rtmpvspqcq/file471234e32bc4/thumb.png' to '/people/d3l348/vdb_netflow/displays/inside_hosts/hourly_count/thumb.png', reason 'Invalid cross-device link'
3: In file.rename(dir(tempPrefix, full.names = TRUE), file.path(displayPrefix,  :
  cannot rename file '/tmp/Rtmpvspqcq/file471234e32bc4/thumb_small.png' to '/people/d3l348/vdb_netflow/displays/inside_hosts/hourly_count/thumb_small.png', reason 'Invalid cross-device link'
@lhsego
Copy link
Member

lhsego commented Feb 17, 2015

I'll figure it out...

@amwhite
Copy link
Author

amwhite commented Feb 17, 2015

Work around: in the .Renviron file add a line like this, where the directory chosen is on the same drive/partition/device as the vdb directory.

TMPDIR=~/tmp

Restart R (this is necessary). Then it will use the directory you specify as the place for temporary files and won't have a problem copying them.

@amwhite
Copy link
Author

amwhite commented Feb 17, 2015

Also: see the documentation for tempfile() to see why the above work around works.

@lhsego
Copy link
Member

lhsego commented Feb 19, 2015

@amwhite, do you think this workaround is sufficient, or should we do something in the code?

@amwhite
Copy link
Author

amwhite commented Feb 19, 2015

I think we should fix it in the code. Not a huge priority since we do have a workaround.

@clintidau
Copy link

I just encountered this bug on CentOS 7. The file.rename command fails because the /tmp folder is a different mount point. It works if I change file.rename to file.copy with overwrite=TRUE on line 326 of makeDisplay.R

@amwhite
Copy link
Author

amwhite commented Oct 13, 2015

I think the merge @hafen did earlier today fixes this problem. Please reinstall the latest version of trelliscope and let us know if that doesn't fix it.

@clintidau
Copy link

Confirmed fixed on CentOS 7, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants