{"action":"created","issue":{"url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/238","repository_url":"https://api.github.com/repos/grobian/carbon-c-relay","labels_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/238/comments","events_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/238/events","html_url":"https://github.com/grobian/carbon-c-relay/issues/238","id":192250857,"number":238,"title":"Validation doesn't work on Ubuntu Trusty (glibc 2.19)","user":{"login":"deniszh","id":1227222,"avatar_url":"https://avatars.githubusercontent.com/u/1227222?v=3","gravatar_id":"","url":"https://api.github.com/users/deniszh","html_url":"https://github.com/deniszh","followers_url":"https://api.github.com/users/deniszh/followers","following_url":"https://api.github.com/users/deniszh/following{/other_user}","gists_url":"https://api.github.com/users/deniszh/gists{/gist_id}","starred_url":"https://api.github.com/users/deniszh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniszh/subscriptions","organizations_url":"https://api.github.com/users/deniszh/orgs","repos_url":"https://api.github.com/users/deniszh/repos","events_url":"https://api.github.com/users/deniszh/events{/privacy}","received_events_url":"https://api.github.com/users/deniszh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-29T11:01:07Z","updated_at":"2016-11-30T13:03:19Z","closed_at":null,"body":"Trying to use some generic metric validation, like `validate ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\ [0-9.]+$ else drop` on Ubuntu Trusty. (It was working perfect on Ubuntu Precise btw)\r\nFirst trying that:\r\n```\r\ncluster zone1\r\n    carbon_ch replication 1\r\n        graph001:2103\r\n        graph007:2103\r\n        graph004:2103\r\n    ;\r\ncluster zone2\r\n    carbon_ch replication 1\r\n        graph002:2103\r\n        graph008:2103\r\n        graph005:2103\r\n    ;\r\ncluster zone3\r\n    carbon_ch replication 1\r\n        graph003:2103\r\n        graph009:2103\r\n        graph006:2103\r\n    ;\r\n\r\nmatch *\r\n    validate ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\ [0-9.]+$ else drop\r\n    send to zone1\r\n    ;\r\nmatch *\r\n    validate ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\ [0-9.]+$ else drop\r\n    send to zone2\r\n    ;\r\nmatch *\r\n    validate ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\ [0-9.]+$ else drop\r\n    send to zone3\r\n    stop\r\n    ;\r\n```\r\nGetting this error:\r\n```\r\n[2016-11-29 11:54:24] starting carbon-c-relay v2.2 (2e76c1), pid=30277\r\nconfiguration:\r\n    relay hostname = graph001\r\n    listen port = 2003\r\n    workers = 4\r\n    send batch size = 2500\r\n    server queue size = 25000\r\n    server max stalls = 4\r\n    statistics submission interval = 60s\r\n    listen backlog = 32\r\n    server connection IO timeout = 600ms\r\n    routes configuration = /root/relay.conf\r\n\r\n[2016-11-29 11:54:24] invalid expression '^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\' for match: Trailing backslash\r\n[2016-11-29 11:54:24] failed to read configuration '/root/relay.conf'\r\n```\r\nOK, trying to replace '\\ ' with '\\s'. Looks like working:\r\n```\r\n[2016-11-29 11:55:20] starting carbon-c-relay v2.2 (2e76c1), pid=30330\r\nconfiguration:\r\n    relay hostname = graph001\r\n    listen port = 2003\r\n    workers = 4\r\n    send batch size = 2500\r\n    server queue size = 25000\r\n    server max stalls = 4\r\n    statistics submission interval = 60s\r\n    listen backlog = 32\r\n    server connection IO timeout = 600ms\r\n    routes configuration = /root/relay.conf\r\n\r\nparsed configuration follows:\r\ncluster zone1\r\n    carbon_ch replication 1\r\n        graph001:2103\r\n        graph007:2103\r\n        graph004:2103\r\n    ;\r\ncluster zone2\r\n    carbon_ch replication 1\r\n        graph002:2103\r\n        graph008:2103\r\n        graph005:2103\r\n    ;\r\ncluster zone3\r\n    carbon_ch replication 1\r\n        graph003:2103\r\n        graph009:2103\r\n        graph006:2103\r\n    ;\r\n\r\nmatch\r\n        *\r\n        validate\r\n        ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\s[0-9.]+$\r\n        else\r\n        drop\r\n    send to zone1\r\n    ;\r\nmatch\r\n        *\r\n        validate\r\n        ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\s[0-9.]+$\r\n        else\r\n        drop\r\n    send to zone2\r\n    ;\r\nmatch\r\n        *\r\n        validate\r\n        ^[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?\\s[0-9.]+$\r\n        else\r\n        drop\r\n    send to zone3\r\n    stop\r\n    ;\r\n```\r\nBut it's not:\r\n```\r\na a a\r\nmatch\r\n    * -> a\r\n    carbon_ch(zone1)\r\n        graph004:2103\r\nmatch\r\n    * -> a\r\n    carbon_ch(zone2)\r\n        graph005:2103\r\nmatch\r\n    * -> a\r\n    carbon_ch(zone3)\r\n        graph006:2103\r\n    stop\r\n1 1 1\r\nmatch\r\n    * -> 1\r\n    carbon_ch(zone1)\r\n        graph001:2103\r\nmatch\r\n    * -> 1\r\n    carbon_ch(zone2)\r\n        graph005:2103\r\nmatch\r\n    * -> 1\r\n    carbon_ch(zone3)\r\n        graph009:2103\r\n    stop\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/comments/263868131","html_url":"https://github.com/grobian/carbon-c-relay/issues/238#issuecomment-263868131","issue_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/238","id":263868131,"user":{"login":"deniszh","id":1227222,"avatar_url":"https://avatars.githubusercontent.com/u/1227222?v=3","gravatar_id":"","url":"https://api.github.com/users/deniszh","html_url":"https://github.com/deniszh","followers_url":"https://api.github.com/users/deniszh/followers","following_url":"https://api.github.com/users/deniszh/following{/other_user}","gists_url":"https://api.github.com/users/deniszh/gists{/gist_id}","starred_url":"https://api.github.com/users/deniszh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniszh/subscriptions","organizations_url":"https://api.github.com/users/deniszh/orgs","repos_url":"https://api.github.com/users/deniszh/repos","events_url":"https://api.github.com/users/deniszh/events{/privacy}","received_events_url":"https://api.github.com/users/deniszh/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T13:03:19Z","updated_at":"2016-11-30T13:03:19Z","body":"Yes, if I replacing '\\ ' with '\\s' it doesn't validate at all for some reason.\r\nAnd it didn't accept '\\ ' because of 'Trailing slash'."}}
{"actor":{"display_login":"deniszh"}}