{"action":"created","issue":{"url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/302","labels_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/302/comments","events_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/302/events","html_url":"https://github.com/Exa-Networks/exabgp/issues/302","id":94749245,"number":302,"title":"Problems with exabgp.api.file","user":{"login":"pavel-odintsov","id":2744166,"avatar_url":"https://avatars.githubusercontent.com/u/2744166?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-odintsov","html_url":"https://github.com/pavel-odintsov","followers_url":"https://api.github.com/users/pavel-odintsov/followers","following_url":"https://api.github.com/users/pavel-odintsov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-odintsov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-odintsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-odintsov/subscriptions","organizations_url":"https://api.github.com/users/pavel-odintsov/orgs","repos_url":"https://api.github.com/users/pavel-odintsov/repos","events_url":"https://api.github.com/users/pavel-odintsov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-odintsov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Exa-Networks/exabgp/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Exa-Networks/exabgp/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"thomas-mangin","id":1227755,"avatar_url":"https://avatars.githubusercontent.com/u/1227755?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-mangin","html_url":"https://github.com/thomas-mangin","followers_url":"https://api.github.com/users/thomas-mangin/followers","following_url":"https://api.github.com/users/thomas-mangin/following{/other_user}","gists_url":"https://api.github.com/users/thomas-mangin/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-mangin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-mangin/subscriptions","organizations_url":"https://api.github.com/users/thomas-mangin/orgs","repos_url":"https://api.github.com/users/thomas-mangin/repos","events_url":"https://api.github.com/users/thomas-mangin/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-mangin/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2015-07-13T15:34:16Z","updated_at":"2015-08-08T09:07:50Z","closed_at":null,"body":"Hello, Thomas!\r\n\r\nI could use Git master again :) Thanks for it!\r\n\r\nI'm trying to check this feature: https://plus.google.com/+ThomasMangin/posts/AD8L7vBikWS\r\n\r\nBut haven't any success with it.\r\n\r\n```bash\r\nenv  exabgp.api.file=/tmp/exabgp.cmd exabgp.daemon.user=root exabgp.daemon.daemonize=false exabgp.daemon.pid=/var/run/exabgp.pid exabgp.log.destination=/var/log/exabgp.log sbin/exabgp -d /etc/exabgp_flowspec.conf \r\nexabgp 28583  reactor       performing reload of exabgp 3.9.0\r\nexabgp 28583  configuration > neighbor         | '127.0.0.1'\r\nexabgp 28583  configuration . router-id        | '1.2.3.4'\r\nexabgp 28583  configuration . local-address    | '127.0.0.1'\r\nexabgp 28583  configuration . local-as         | '1'\r\nexabgp 28583  configuration . peer-as          | '1'\r\nexabgp 28583  configuration . group-updates    | 'false'\r\nexabgp 28583  configuration > family           | \r\nexabgp 28583  configuration . ipv4             | 'flow'\r\nexabgp 28583  configuration . ipv6             | 'flow'\r\nexabgp 28583  configuration < family           | \r\nexabgp 28583  configuration < neighbor         | \r\nexabgp 28583  reactor       new peer: neighbor 127.0.0.1 local-ip 127.0.0.1 local-as 1 peer-as 1 router-id 1.2.3.4 family-allowed in-open\r\nexabgp 28583  configuration loaded new configuration successfully\r\n```\r\n\r\nBut there are no any socket files in /tmp:\r\n```bash\r\nls -la /tmp/|grep exa|wc -l\r\n0\r\n```\r\n\r\nAnd no open handles at all:\r\n```bash\r\nls -al /proc/28583/fd\r\ntotal 0\r\ndr-x------ 2 root root  0 Jul 13 17:34 .\r\ndr-xr-xr-x 9 root root  0 Jul 13 17:28 ..\r\nlrwx------ 1 root root 64 Jul 13 17:34 0 -> /dev/pts/1\r\nlrwx------ 1 root root 64 Jul 13 17:34 1 -> /dev/pts/1\r\nlrwx------ 1 root root 64 Jul 13 17:34 2 -> /dev/pts/1\r\nl-wx------ 1 root root 64 Jul 13 17:34 3 -> /var/log/exabgp.log\r\nlr-x------ 1 root root 64 Jul 13 17:34 8 -> /dev/urandom\r\n```\r\n\r\nExample configuration:\r\n```bash\r\ncat /etc/exabgp_flowspec.conf \r\nneighbor 127.0.0.1 {\r\n    router-id 1.2.3.4;\r\n    local-address 127.0.0.1;\r\n    local-as 1;\r\n    peer-as 1;\r\n    group-updates false;\r\n\r\n    family {\r\n        ipv4 flow;\r\n        ipv6 flow;\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/comments/128942716","html_url":"https://github.com/Exa-Networks/exabgp/issues/302#issuecomment-128942716","issue_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/302","id":128942716,"user":{"login":"pyke369","id":115323,"avatar_url":"https://avatars.githubusercontent.com/u/115323?v=3","gravatar_id":"","url":"https://api.github.com/users/pyke369","html_url":"https://github.com/pyke369","followers_url":"https://api.github.com/users/pyke369/followers","following_url":"https://api.github.com/users/pyke369/following{/other_user}","gists_url":"https://api.github.com/users/pyke369/gists{/gist_id}","starred_url":"https://api.github.com/users/pyke369/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyke369/subscriptions","organizations_url":"https://api.github.com/users/pyke369/orgs","repos_url":"https://api.github.com/users/pyke369/repos","events_url":"https://api.github.com/users/pyke369/events{/privacy}","received_events_url":"https://api.github.com/users/pyke369/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T09:07:50Z","updated_at":"2015-08-08T09:07:50Z","body":"2015-08-07 19:36 GMT+03:00 Pavel Odintsov <notifications@github.com>:\n\n> We need following options from ExaBGP side:\n>\n>    - Announce some BGP Flow Spec rule\n>    - Withdrawal some BGP Flow Spec rule\n>    - Get full list of announced rules\n>\n> So we need somehthing more flexible than \"pipe\" integration because we\n> read and write information from/to ExaBGP.\n>\n> I have used this code:\n>\n> process announce-routes {\n>     run /usr/bin/socat stdout pipe:/var/run/exabgp.cmd;\n>     encoder json;\n> }\n>\n> neighbor 127.0.0.1 {\n>     router-id 1.2.3.4;\n>     local-address 127.0.0.1;\n>     local-as 1;\n>     peer-as 1;\n>     group-updates false;\n>\n>   family {\n>         ipv4 flow;\n>     }\n>     api {\n>         processes [ anounce-routes ];\n>     }\n> }\n>\n> But I have not ideas how to implement approach where I could read and\n> write data to/from ExaBGP in same time.\n>\n> Thomas, could you offer some example how I can do this?\n>\n\nYou can have a look here:\nhttps://github.com/pyke369/exabgp-helpers/blob/master/exasrv/exasrv.py#L221-L226\nfor an example of an helper program that read announces from exabgp (to\nprogram a Unix system routing table locally)\nand also send announces to exabgp (depending on an external service\navailability status).\n\n-- \nPierre-Yves\n"}}