GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.17k stars 436 forks source link

Export Portable Project doesn't export files on docker volumes if filename contains "#" or Special chars #3555

Closed Pcrossley69 closed 3 months ago

Pcrossley69 commented 10 months ago

Describe the bug Export portable project will save the contents of Docker volumes so that they can be reloaded with the scenario. Unfortunately the export seems to have an issue with filenames that contain special characters.

When exporting a docker appliance running MYSQL all the files for the database were copied apart from the ones with names starting with "#".

e.g. the directory #innodb_redo

The absence of this directory will stop mysql from starting.

A similar thing occurred when exporting a docker appliance running an apache server:

The Web application I was using (SIREMIS) creates files that contain special characters - for this scenario the export failed completely with the error

=> ExportProjectWorker thread stopping with an error: File 'project-files/docker/c0f9e1e6-2480-4d35-8850-c21a32c27451/var/www/siremis-5.3.0/siremis/themes/default/template/cpl/%%4F^4F0^4F0FFC97%%system_appbuilder_btn.tpl.html.php' not found on compute File 'project-files/docker/c0f9e1e6-2480-4d35-8850-c21a32c27451/var/www/siremis-5.3.0/siremis/themes/default/template/cpl/%%4F^4F0^4F0FFC97%%system_appbuilder_btn.tpl.html.php' not found on compute

I assume the problem is the unprintable characters in the filenames.

GNS3 version and operating system (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Load a project that contains a siremis Docker container
  2. Ensure that Siremis has completed its initiial configuration
  3. stop the project
  4. Use File->Export Portable project
  5. The export fails with error messages

I have included a screenshot of the error as well as one f the directory listing that caused the problem (I listed the files with both "ls" and "find ."

siremis errormsg Siremis Directory

grossmj commented 8 months ago

When exporting a docker appliance running MYSQL all the files for the database were copied apart from the ones with names starting with "#".

e.g. the directory #innodb_redo

I ran some tests and it looks like empty directories are ignored, is #innodb_redo empty on your side?

The Web application I was using (SIREMIS) creates files that contain special characters - for this scenario the export failed completely with the error

Do you have a Docker image I could use to easily reproduce the error? Thanks 👍

grossmj commented 8 months ago

I fixed the empty directory issue however I couldn't reproduce the second problem. I think this is because of Windows and I need to test that.

grossmj commented 6 months ago

@Pcrossley69 have you tried with the latest version? Do you still have these issues?