{"action":"created","issue":{"url":"https://api.github.com/repos/GNS3/gns3-server/issues/217","labels_url":"https://api.github.com/repos/GNS3/gns3-server/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/GNS3/gns3-server/issues/217/comments","events_url":"https://api.github.com/repos/GNS3/gns3-server/issues/217/events","html_url":"https://github.com/GNS3/gns3-server/issues/217","id":85185709,"number":217,"title":"Dynamips router without private config: Save doesn't work","user":{"login":"ehlers","id":896406,"avatar_url":"https://avatars.githubusercontent.com/u/896406?v=3","gravatar_id":"","url":"https://api.github.com/users/ehlers","html_url":"https://github.com/ehlers","followers_url":"https://api.github.com/users/ehlers/followers","following_url":"https://api.github.com/users/ehlers/following{/other_user}","gists_url":"https://api.github.com/users/ehlers/gists{/gist_id}","starred_url":"https://api.github.com/users/ehlers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehlers/subscriptions","organizations_url":"https://api.github.com/users/ehlers/orgs","repos_url":"https://api.github.com/users/ehlers/repos","events_url":"https://api.github.com/users/ehlers/events{/privacy}","received_events_url":"https://api.github.com/users/ehlers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GNS3/gns3-server/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GNS3/gns3-server/milestones/11","html_url":"https://github.com/GNS3/gns3-server/milestones/1.3.5","labels_url":"https://api.github.com/repos/GNS3/gns3-server/milestones/11/labels","id":1144860,"number":11,"title":"1.3.5","description":"","creator":{"login":"noplay","id":345437,"avatar_url":"https://avatars.githubusercontent.com/u/345437?v=3","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":4,"state":"open","created_at":"2015-06-02T12:42:14Z","updated_at":"2015-06-05T09:51:46Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-06-04T17:00:07Z","updated_at":"2015-06-05T13:00:33Z","closed_at":null,"body":"GNS3 V1.3.4, OS: OS X 10.9.5 and Linux Debian 8\r\nTopology: 2 x 3725 without private config\r\n\r\nProblem look exctly like issue https://github.com/GNS3/gns3-server/issues/165.\r\n\r\nOn Save only one of the configs is saved:\r\n\r\nLog:\r\n```\r\n2015-06-04 18:49:47 INFO topology.py:462 Starting to save the topology (version 1.3.4)\r\n2015-06-04 18:49:47 INFO topology.py:485 saving node: R1\r\n2015-06-04 18:49:47 INFO topology.py:485 saving node: R2\r\n2015-06-04 18:49:47 INFO topology.py:492 saving Link from R1 port FastEthernet0/0 to R2 port FastEthernet0/0\r\n2015-06-04 18:49:47 INFO topology.py:499 saving server 192.168.1.11:8000\r\n2015-06-04 18:49:47 INFO main_window.py:1339 Saving project: /home/behlers/GNS3/projects/untitled/untitled.gns3\r\n2015-06-04 18:49:47 INFO router.py:1507 saving startup-config to configs/i2_startup-config.cfg\r\n2015-06-04 18:49:47 ERROR route.py:150 VM error detected: <class 'gns3server.modules.dynamips.dynamips_error.DynamipsError'>\r\nTraceback (most recent call last):\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/dynamips/nodes/router.py\", line 1517, in save_configs\r\n    with open(config_path, \"wb\") as f:\r\nIsADirectoryError: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/web/route.py\", line 140, in control_schema\r\n    yield from func(request, response)\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/handlers/api/project_handler.py\", line 111, in commit\r\n    yield from project.commit()\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/project.py\", line 401, in commit\r\n    yield from module.instance().project_committed(self)\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/dynamips/__init__.py\", line 213, in project_committed\r\n    yield from vm.save_configs()\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/dynamips/nodes/router.py\", line 1521, in save_configs\r\n    raise DynamipsError(\"Could not save the private configuration {}: {}\".format(config_path, e))\r\ngns3server.modules.dynamips.dynamips_error.DynamipsError: Could not save the private configuration /home/behlers/GNS3/projects/untitled/project-files/dynamips/: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n2015-06-04 18:49:47 INFO http_client.py:362 Response error: Error downloading http://192.168.1.11:8000/v1/projects/e5992eef-218a-4d24-94d2-318c167dff03/commit - server replied: Conflict\r\n```\r\n\r\n\r\nWhen saving a router config with right-click-save-config an error is shown:\r\n\r\nServer error from 192.168.1.11:8000: R1: Could not save the private configuration /home/behlers/GNS3/projects/untitled/project-files/dynamips/: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n\r\nLogs:\r\n```\r\n2015-06-04 18:52:16 INFO router.py:1507 saving startup-config to configs/i1_startup-config.cfg\r\n2015-06-04 18:52:16 ERROR route.py:150 VM error detected: <class 'gns3server.modules.dynamips.dynamips_error.DynamipsError'>\r\nTraceback (most recent call last):\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/dynamips/nodes/router.py\", line 1517, in save_configs\r\n    with open(config_path, \"wb\") as f:\r\nIsADirectoryError: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/web/route.py\", line 140, in control_schema\r\n    yield from func(request, response)\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/handlers/api/dynamips_vm_handler.py\", line 415, in save_configs\r\n    yield from vm.save_configs()\r\n  File \"/opt/GNS3/lib/python3.4/site-packages/gns3server/modules/dynamips/nodes/router.py\", line 1521, in save_configs\r\n    raise DynamipsError(\"Could not save the private configuration {}: {}\".format(config_path, e))\r\ngns3server.modules.dynamips.dynamips_error.DynamipsError: Could not save the private configuration /home/behlers/GNS3/projects/untitled/project-files/dynamips/: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n2015-06-04 18:52:16 INFO http_client.py:362 Response error: Error downloading http://192.168.1.11:8000/v1/projects/e5992eef-218a-4d24-94d2-318c167dff03/dynamips/vms/92e7a72a-65d9-4bb5-ae7d-d636aeab8abf/configs/save - server replied: Conflict\r\n2015-06-04 18:52:16 ERROR router.py:788 error while saving R1 configs: Could not save the private configuration /home/behlers/GNS3/projects/untitled/project-files/dynamips/: [Errno 21] Is a directory: '/home/behlers/GNS3/projects/untitled/project-files/dynamips/'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/GNS3/gns3-server/issues/comments/109285343","html_url":"https://github.com/GNS3/gns3-server/issues/217#issuecomment-109285343","issue_url":"https://api.github.com/repos/GNS3/gns3-server/issues/217","id":109285343,"user":{"login":"noplay","id":345437,"avatar_url":"https://avatars.githubusercontent.com/u/345437?v=3","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T13:00:33Z","updated_at":"2015-06-05T13:00:33Z","body":"Strange I just test on with a blank project  and two 3725 and I don't replicate the issue :(\r\n\r\nThe faulty code is here \r\n```\r\n            if private_config_base64:\r\n                try:\r\n                    config = base64.b64decode(private_config_base64).decode(\"utf-8\", errors=\"replace\")\r\n                    config = \"!\\n\" + config.replace(\"\\r\", \"\")\r\n                    config_path = os.path.join(module_workdir, self.private_config)\r\n                    with open(config_path, \"wb\") as f:\r\n                        log.info(\"saving private-config to {}\".format(self.private_config))\r\n                        f.write(config.encode(\"utf-8\"))\r\n                except (binascii.Error, OSError) as e:\r\n                    raise DynamipsError(\"Could not save the private configuration {}: {}\".format(config_path, e))\r\n```\r\n\r\nIt seem we have a base6' config but not the file.\r\n"}}