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

GNS3 2.2.50 uses project_id as directory name in the project folder when using "Save project as..." #2446

Closed
needless opened this issue Nov 10, 2024 · 3 comments
Labels

Comments

@needless
Copy link

needless commented Nov 10, 2024

GNS3 2.2.50 generates random directory name in the project folder when using 'Save project as...'. It takes the GNS3 project_id value instead of name.

The project_id variable can be viewed using the head *.gns3 in the GNS3 project directory.

Describe the bug

Since the GNS3 version 2.2.50 the "Save project as..." function generates a random string directory name in the project folder instead of the desired one.

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

  • OS: Linux
  • GNS3 version 2.2.50
  • GNS3 bare metal, everything runs locally on the workstation

Here the used versions of GNS3 on the workstation:

needle@lifeblind % eix -I gns3-
[I] net-misc/gns3-gui
     Available versions:  (~)2.2.49-r1^t{gpkg} (~)2.2.50^t{gpkg} {test PYTHON_TARGETS="python3_11 python3_12"}
     Installed versions:  2.2.50^t{gpkg}(22:02:32 07/11/24)(-test PYTHON_TARGETS="python3_12 -python3_11")
     Homepage:            https://www.gns3.com https://github.com/GNS3/gns3-gui
     Description:         Graphical Network Simulator

[I] net-misc/gns3-server
     Available versions:  (~)2.2.49-r1^t{gpkg} (~)2.2.50^t{gpkg} {test PYTHON_TARGETS="python3_11 python3_12"}
     Installed versions:  2.2.50^t{gpkg}(21:30:35 07/11/24)(-test PYTHON_TARGETS="python3_12 -python3_11")
     Homepage:            https://www.gns3.com https://github.com/GNS3/gns3-server
     Description:         GNS3 server to asynchronously manage emulators

Found 2 matches

To Reproduce
Steps to reproduce the behavior:

  1. Stop the current running project
  2. Go to 'File'
  3. Click on 'Save project as...'
  4. Type in the desired new project name
  5. New project is created. And the GUI show the new projects name.
  6. Verify the '~/GNS3/project/' directory
  7. Desired project name directory name is not found here the directory is called 62b9750e-7000-4c44-9566-078ca8ed85da

Screenshots or videos

  1. Current stopped project:
    2024-11-10-172944_735x558_scrot

  2. The desired new project name:
    2024-11-10-173124_837x400_scrot

  3. Everything is fine in the GUI:
    2024-11-10-173157_735x558_scrot

  4. Projects directory listing:

ls -lah | grep 17:31
drwxr-xr-x 188 needle needle 8.0K Nov 10 17:31 .
drwxr-xr-x   4 needle needle   94 Nov 10 17:31 62b9750e-7000-4c44-9566-078ca8ed85da
drwxr-xr-x   4 needle needle   85 Nov 10 17:31 VRP-SR-MPLS-00-MPLS-network-day-0

Additional context

The .gns3 filename in the random directory name is created as desired, and everything is as it should. Only the directory name is kind of randomly generated. This did not happen with previous GNS3 versions. Currently downgraded to GNS3-2.2.49 version where this does not happen.

Contents of the random directory showing that the project file is named correctly and working:

pwd       
/home/needle/GNS3/projects/62b9750e-7000-4c44-9566-078ca8ed85da
ls -lah
total 52K
drwxr-xr-x   4 needle needle   94 Nov 10 17:31 .
drwxr-xr-x 188 needle needle 8.0K Nov 10 17:31 ..
drwxr-xr-x   2 needle needle  116 Oct 24 15:34 configs
drwxr-xr-x   6 needle needle   59 Oct 24 07:50 project-files
-rw-r--r--   1 needle needle  40K Nov 10 17:31 VRP-SRv6-01-Enabling-IPv6-routing-day-1.gns3
@needless needless added the Bug label Nov 10, 2024
@needless
Copy link
Author

needless commented Nov 13, 2024

Just emerged the newest 2.2.51 version of GNS3. This happens using this version too. In the terminal following appears after saving the project as a new project:

gns3
2024-11-13 10:57:46 INFO root:126 Log level: INFO
2024-11-13 10:57:46 INFO main:265 GNS3 GUI version 2.2.51
2024-11-13 10:57:46 INFO main:266 Copyright (c) 2007-2024 GNS3 Technologies Inc.
2024-11-13 10:57:46 INFO main:267 Application started with /usr/lib/python-exec/python3.12/gns3
2024-11-13 10:57:53 INFO controller:437 Listening for controller notifications on 'ws://[::1]:3080/v2/notifications/ws'
....
[<---Opening a stored project from disk--->]
2024-11-13 10:57:56 INFO project:647 Listening for project notifications on 'ws://[::1]:3080/v2/projects/eead642d-6ab0-4555-9475-df24f934eb7d/notifications/ws'
....
[<--- Saving current open project as new project --->]
2024-11-13 10:58:23 INFO project:647 Listening for project notifications on 'ws://[::1]:3080/v2/projects/563ec318-8234-4287-93ba-592b7aea50c2/notifications/ws'
gns3  18.52s user 1.15s system 2% cpu 14:20.93 total
...

The directory is called like above mentioned 563ec318-8234-4287-93ba-592b7aea50c2:

pwd
/home/needle/GNS3/projects
drwxr-xr-x 135 needle needle 8.0K Nov 13 10:58 ./
drwxr-xr-x   3 needle needle   86 Nov 13 10:58 563ec318-8234-4287-93ba-592b7aea50c2/
drwxr-xr-x   4 needle needle  135 Nov 13 09:39 VRP-MPLS-LDP-network-day-0/
drwxr-xr-x   3 needle needle  112 Nov 13 10:58 VRP-SRv6-99-documentation-example-from-scratch/

And its contents is written normally:

pwd
/home/needle/GNS3/projects/563ec318-8234-4287-93ba-592b7aea50c2
ls -lah                                                                                                                                                            total 56K
drwxr-xr-x   3 needle needle   86 Nov 13 10:58 ./
drwxr-xr-x 135 needle needle 8.0K Nov 13 10:58 ../
drwxr-xr-x   5 needle needle   43 Nov 13 10:56 project-files/
-rw-r--r--   1 needle needle  23K Nov 13 10:58 VRP-SRv6-99-checking.gns3
-rw-r--r--   1 needle needle  17K Sep 27  2022 VRP-SRv6-topo1.png

Would be good if someone using the newest GNS3 version could test this on own hardware.

This is reproduceable on 2 different Linux workstations, that have nothing in common apart from the linux distribution flavour.

@needless
Copy link
Author

needless commented Nov 13, 2024

Did furthter testing using the currently released version GNS3 2.2.51 version. And could narrow it down to following:

  • Create a completely fresh project using fresh appliances, no history in the project.
  • Project is named over here sanbox-00
  • The project directory name is created properly, and its naming.

In the console following appears:

2024-11-13 12:16:55 INFO root:126 Log level: INFO
2024-11-13 12:16:55 INFO main:265 GNS3 GUI version 2.2.51
2024-11-13 12:16:55 INFO main:266 Copyright (c) 2007-2024 GNS3 Technologies Inc.
2024-11-13 12:16:55 INFO main:267 Application started with /usr/lib/python-exec/python3.12/gns3
2024-11-13 12:17:01 INFO controller:437 Listening for controller notifications on 'ws://[::1]:3080/v2/notifications/ws'
2024-11-13 12:19:02 INFO project:647 Listening for project notifications on 'ws://[::1]:3080/v2/projects/c2718184-9091-45d9-80c6-12e945ceddf9/notifications/ws

The c2718184-9091-45d9-80c6-12e945ceddf9 is the GNS3 project_id variable

pwd
/home/needle/GNS3/projects/sandbox-00

head sandbox-00.gns3
{
    "auto_close": true,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "grid_size": 75,
    "name": "sandbox-00",
    "project_id": "c2718184-9091-45d9-80c6-12e945ceddf9",
    "revision": 9,
    "scene_height": 1000,

Now. When stoping the fresh project and wanting to save as a new project this `issue described as above happens again.

In example the new projects name is sanbox-01.

GNS3 using the the Save project as... function in GNS3 does not take the name for the new project directory, but the project_id as the new directory name:

pwd
/home/needle/GNS3/projects/1119c664-eec1-4ab5-9cf5-bcfe6afd2f00

head sandbox-01.gns3
{
    "auto_close": false,
    "auto_open": false,
    "auto_start": false,
    "drawing_grid_size": 25,
    "grid_size": 75,
    "name": "sandbox-01",
    "project_id": "1119c664-eec1-4ab5-9cf5-bcfe6afd2f00",
    "revision": 9,
    "scene_height": 1000,

@needless needless changed the title GNS3 2.2.50 generates a random directory name in the project folder when using "Save project as..." GNS3 2.2.50 uses project_Id as directory name in the project folder when using "Save project as..." Nov 13, 2024
@needless needless changed the title GNS3 2.2.50 uses project_Id as directory name in the project folder when using "Save project as..." GNS3 2.2.50 uses project_id as directory name in the project folder when using "Save project as..." Nov 13, 2024
@grossmj grossmj transferred this issue from GNS3/gns3-gui Nov 26, 2024
grossmj added a commit that referenced this issue Nov 26, 2024
@grossmj
Copy link
Member

grossmj commented Nov 26, 2024

Fixed, thanks for catching that! 👍

@grossmj grossmj closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants