mountetna / metis

Metis is a file service for Etna applications.
GNU General Public License v2.0
0 stars 4 forks source link

Files uploading to non-project directories #62

Closed coleshaw closed 4 years ago

coleshaw commented 4 years ago

Found when trying to fix #61 . Files are uploaded to non-project directories (which have to exist first??). For example, I'm seeing:

data/
  uploads/
  data_blocks/
     <my file>

Whereas I think it should be:

data/
  ipi/
    uploads/
    data_blocks/
      <my file>
coleshaw commented 4 years ago

I realized that only the temporary files are in non-project directories, but the final file is actually in a project directory. There is some weirdness in that the data/uploads directory is expected to exist, although the final file isn't put there:

ERROR:2020-05-07T16:39:08+00:00 epyho3 Caught unspecified error
ERROR:2020-05-07T16:39:08+00:00 epyho3 No such file or directory @ rb_file_s_size - /home/developer/metis/data/uploads/96c4be0c924a6a2691851e9ee8529830
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/metis/lib/models/upload.rb:33:in `size'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/metis/lib/models/upload.rb:33:in `append_blob'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/metis/lib/server/controllers/upload_controller.rb:112:in `upload_blob'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/metis/lib/server/controllers/upload_controller.rb:56:in `upload'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/etna-0.1.9/lib/etna/controller.rb:24:in `response'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/etna-0.1.9/lib/etna/route.rb:81:in `call'
ERROR:2020-05-07T16:39:08+00:00 epyho3 /home/developer/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/etna-0.1.9/lib/etna/server.rb:65:in `call'

? Closing this for now, since the final behavior seems like what I expected.

graft commented 4 years ago

Following #53 there are no longer project-specific directories. The VM was put together before #53, so it still has its data in the old format. I neglected to write a setup routine to repair this because I accomplished this using a script to reorganize the file structure in production. However, the correct structure should be "/data_blocks/" for a file, as you may see in Metis::DataBlock#location.