Open ghost opened 5 years ago
- Ignore (with a warning) all environment lines with an empty variable (starting with a
=
).
Should have been fixed by https://github.com/GNS3/gns3-server/commit/aea4ae808f18a1031f0b438a7918658882893d6b
- Redesign the docker VM, so that it is not created, when loaded, but when first started. That way any issue with a docker node won't affect loading a project. If a docker VM is misbehaving the user can edit the node config in GNS3. In extreme cases the VM needs to be deleted and then recreated. But at least the project is not lost.
I agree, however I prefer to do this in our 2.2 branch since I am afraid we are likely to break something in 2.1.
As v2.2 is already in alpha and refactoring docker might be complex, even a target of v2.3 is fine for me.
https://gns3.com/community/discussion/gns3-critical-error
Somehow that user added a
=
into the docker environment of a node (that's simple) and then managed to get that saved into the project file, something I wasn't able to reproduce. So to further analyze this, I manually edited the project file. I set"environment": "=",
in one docker node.The main issue is, that the docker nodes are created, when the project is loaded. When anything gets wrong with that creation, the loading aborts and the user has no change to fix the project. The whole project is lost.
The error message on the console is not really helpful:
Docker has returned an error: 500 invalid environment variable: =
The log clearly shows, whats wrong:
The only way to recover that, is to edit the project file, find the offending environment setting and correct that.
I would like to propose two fixes 1) Ignore (with a warning) all environment lines with an empty variable (starting with a
=
). 2) Redesign the docker VM, so that it is not created, when loaded, but when first started. That way any issue with a docker node won't affect loading a project. If a docker VM is misbehaving the user can edit the node config in GNS3. In extreme cases the VM needs to be deleted and then recreated. But at least the project is not lost.