{"action":"created","issue":{"url":"https://api.github.com/repos/ehazlett/interlock/issues/114","repository_url":"https://api.github.com/repos/ehazlett/interlock","labels_url":"https://api.github.com/repos/ehazlett/interlock/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/ehazlett/interlock/issues/114/comments","events_url":"https://api.github.com/repos/ehazlett/interlock/issues/114/events","html_url":"https://github.com/ehazlett/interlock/issues/114","id":146311397,"number":114,"title":"Interlock does not generate/save proxy config files","user":{"login":"inf-rno","id":2790866,"avatar_url":"https://avatars.githubusercontent.com/u/2790866?v=3","gravatar_id":"","url":"https://api.github.com/users/inf-rno","html_url":"https://github.com/inf-rno","followers_url":"https://api.github.com/users/inf-rno/followers","following_url":"https://api.github.com/users/inf-rno/following{/other_user}","gists_url":"https://api.github.com/users/inf-rno/gists{/gist_id}","starred_url":"https://api.github.com/users/inf-rno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inf-rno/subscriptions","organizations_url":"https://api.github.com/users/inf-rno/orgs","repos_url":"https://api.github.com/users/inf-rno/repos","events_url":"https://api.github.com/users/inf-rno/events{/privacy}","received_events_url":"https://api.github.com/users/inf-rno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-06T13:18:33Z","updated_at":"2016-04-21T11:03:53Z","closed_at":null,"body":"I'm deploying interlock onto a swarm in Azure using the Azure Container Service template. It is basically a swarm with one master and a couple of nodes.\r\n\r\nHere is my compose file:\r\n```\r\nversion: '2'\r\nvolumes:\r\n  haproxy:\r\nservices:\r\n  # nginx service to serve static client files\r\n  nginx:\r\n    image: boilerangularloop/boilerangularloop_nginx\r\n    restart: always\r\n    ports:\r\n      - '8080'\r\n    labels:\r\n        - \"interlock.hostname=boilagents\"\r\n        - \"interlock.domain=eastus.cloudapp.azure.com\"\r\n\r\n  #interlock\r\n  interlock:\r\n    image: ehazlett/interlock:1.1.0\r\n    environment: \r\n        INTERLOCK_CONFIG: |\r\n            ListenAddr = \":8080\"\r\n            DockerURL = \"${SWARM_HOST}\"\r\n            \r\n            [[Extensions]]\r\n              Name = \"haproxy\"\r\n              ConfigPath = \"/usr/local/etc/haproxy/haproxy.cfg\"\r\n              PidPath = \"/run/haproxy.pid\"\r\n              MaxConn = 1024\r\n              Port = 80\r\n              AdminUser = \"admin\"\r\n              AdminPass = \"interlock\"\r\n    command: -D run\r\n    ports:\r\n        - '8080:8080'\r\n    volumes:\r\n      - haproxy:/usr/local/etc/haproxy\r\n\r\n  #loadbalancer\r\n  haproxy:\r\n    image: haproxy:latest\r\n    ports:\r\n        - '80:80'\r\n        - '443:443'\r\n    labels:\r\n        - \"interlock.ext.name=haproxy\"\r\n    depends_on: \r\n      - interlock\r\n    volumes:\r\n      - haproxy:/usr/local/etc/haproxy\r\n```\r\n\r\nI can see the haproxy volume being created and mounted however interlock doesn't seem to generate the haproxy.cfg file and hence the haproxy service dies. Same happens if I use the nginx extension instead.\r\n\r\nHere are the logs:\r\n```\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=info msg=\"interlock 1.1.0 (8a68c99)\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"loading config from environment\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"docker client: url=tcp://172.16.0.5:2375\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"loading extension: name=haproxy\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=info msg=\"interlock node: id=6a62b5554c670e663ae42b1d4f46bd46c4701e049fe252c8d8bfd6853f100f1e\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"starting event handling\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"event received: status=interlock-start id=0 type= action=\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"notifying extension: lb\"\r\ninterlock_1 | time=\"2016-04-06T13:10:35Z\" level=debug msg=\"triggering reload\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"reaping key: reload\"\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"triggering reload from cache\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"checking to reload\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"updating load balancers\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"generating proxy config\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=info msg=\"boilagents.eastus.cloudapp.azure.com: upstream=10.0.0.5:32799 container=vagrant_nginx_1\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"alias domains: []\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"adding host name=boilagents_eastus_cloudapp_azure_com domain=boilagents.eastus.cloudapp.azure.com\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"proxy config path: /usr/local/etc/haproxy/haproxy.cfg\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"saving proxy config\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"calculating restart across interlock nodes: num=1\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"proxy containers to restart: num=0 containers=\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"signaling reload\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"dropping SYN packets to trigger client re-send\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"&{/sbin/iptables [/sbin/iptables -I INPUT -p tcp --dport 80 --syn -j DROP] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=warning msg=\"error signaling clients to resend; you will notice dropped packets: exit status 3\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"resuming SYN packets\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"&{/sbin/iptables [/sbin/iptables -I INPUT -p tcp --dport 80 --syn -j DROP] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=warning msg=\"error signaling clients to resume; you will notice dropped packets: exit status 3\" ext=haproxy\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"triggering proxy network cleanup\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=info msg=\"reload duration: 32.68ms\" ext=lb\r\ninterlock_1 | time=\"2016-04-06T13:10:36Z\" level=debug msg=\"checking to remove proxy containers from networks\" ext=lb\r\nhaproxy_1   | <7>haproxy-systemd-wrapper: executing /usr/local/sbin/haproxy -p /run/haproxy.pid -f /usr/local/etc/haproxy/haproxy.cfg -Ds\r\nhaproxy_1   | [ALERT] 096/131038 (7) : Could not open configuration file /usr/local/etc/haproxy/haproxy.cfg : No such file or directory\r\nhaproxy_1   | <5>haproxy-systemd-wrapper: exit, haproxy RC=256\r\nvagrant_haproxy_1 exited with code 0\r\n```\r\n\r\nAs you see, it logs both generating and saving proxy config. But if I exec into the interlock container and look at the mounted volume, it remains empty. Any ideas?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/ehazlett/interlock/issues/comments/212859221","html_url":"https://github.com/ehazlett/interlock/issues/114#issuecomment-212859221","issue_url":"https://api.github.com/repos/ehazlett/interlock/issues/114","id":212859221,"user":{"login":"danielbjornadal","id":7441428,"avatar_url":"https://avatars.githubusercontent.com/u/7441428?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbjornadal","html_url":"https://github.com/danielbjornadal","followers_url":"https://api.github.com/users/danielbjornadal/followers","following_url":"https://api.github.com/users/danielbjornadal/following{/other_user}","gists_url":"https://api.github.com/users/danielbjornadal/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbjornadal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbjornadal/subscriptions","organizations_url":"https://api.github.com/users/danielbjornadal/orgs","repos_url":"https://api.github.com/users/danielbjornadal/repos","events_url":"https://api.github.com/users/danielbjornadal/events{/privacy}","received_events_url":"https://api.github.com/users/danielbjornadal/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T11:03:53Z","updated_at":"2016-04-21T11:03:53Z","body":"I have the same problem when using volumes and haproxy.\r\ninterlock will not generate haproxy.cfg\r\n```\r\n$ ls -la /var/lib/docker/volumes/webloadbalancer_haproxy/_data/\r\ndrwxr-xr-x 3 root staff 4096 Apr 21 12:20 .\r\ndrwxr-xr-x 3 root root  4096 Apr 21 12:18 ..\r\ndrwxr-sr-x 2 root staff 4096 Apr  7 07:07 errors\r\n```"}}