{"action":"created","issue":{"url":"https://api.github.com/repos/gluster/glusterd2/issues/96","repository_url":"https://api.github.com/repos/gluster/glusterd2","labels_url":"https://api.github.com/repos/gluster/glusterd2/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/gluster/glusterd2/issues/96/comments","events_url":"https://api.github.com/repos/gluster/glusterd2/issues/96/events","html_url":"https://github.com/gluster/glusterd2/pull/96","id":162172492,"number":96,"title":"Add support for config files","user":{"login":"kshlm","id":362086,"avatar_url":"https://avatars.githubusercontent.com/u/362086?v=3","gravatar_id":"","url":"https://api.github.com/users/kshlm","html_url":"https://github.com/kshlm","followers_url":"https://api.github.com/users/kshlm/followers","following_url":"https://api.github.com/users/kshlm/following{/other_user}","gists_url":"https://api.github.com/users/kshlm/gists{/gist_id}","starred_url":"https://api.github.com/users/kshlm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshlm/subscriptions","organizations_url":"https://api.github.com/users/kshlm/orgs","repos_url":"https://api.github.com/users/kshlm/repos","events_url":"https://api.github.com/users/kshlm/events{/privacy}","received_events_url":"https://api.github.com/users/kshlm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"kshlm","id":362086,"avatar_url":"https://avatars.githubusercontent.com/u/362086?v=3","gravatar_id":"","url":"https://api.github.com/users/kshlm","html_url":"https://github.com/kshlm","followers_url":"https://api.github.com/users/kshlm/followers","following_url":"https://api.github.com/users/kshlm/following{/other_user}","gists_url":"https://api.github.com/users/kshlm/gists{/gist_id}","starred_url":"https://api.github.com/users/kshlm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshlm/subscriptions","organizations_url":"https://api.github.com/users/kshlm/orgs","repos_url":"https://api.github.com/users/kshlm/repos","events_url":"https://api.github.com/users/kshlm/events{/privacy}","received_events_url":"https://api.github.com/users/kshlm/received_events","type":"User","site_admin":false},"assignees":[{"login":"kshlm","id":362086,"avatar_url":"https://avatars.githubusercontent.com/u/362086?v=3","gravatar_id":"","url":"https://api.github.com/users/kshlm","html_url":"https://github.com/kshlm","followers_url":"https://api.github.com/users/kshlm/followers","following_url":"https://api.github.com/users/kshlm/following{/other_user}","gists_url":"https://api.github.com/users/kshlm/gists{/gist_id}","starred_url":"https://api.github.com/users/kshlm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshlm/subscriptions","organizations_url":"https://api.github.com/users/kshlm/orgs","repos_url":"https://api.github.com/users/kshlm/repos","events_url":"https://api.github.com/users/kshlm/events{/privacy}","received_events_url":"https://api.github.com/users/kshlm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-06-24T15:31:49Z","updated_at":"2016-07-05T06:21:59Z","closed_at":"2016-07-05T06:19:00Z","pull_request":{"url":"https://api.github.com/repos/gluster/glusterd2/pulls/96","html_url":"https://github.com/gluster/glusterd2/pull/96","diff_url":"https://github.com/gluster/glusterd2/pull/96.diff","patch_url":"https://github.com/gluster/glusterd2/pull/96.patch"},"body":"GD2 can be configured using config files. The very good spf13/viper\npackage has been used to provide this facility.\n\nGD2 will search for a file named \"glusterdconf.(toml|yaml|json)\" in\n\"/etc/glusterd\" and the current working directory by default. A specific\nconfig file can also be given using the `--config` flag on the command\nline.\n\nAll of the command line flags, can also be configured in the config\nfile. The preference for values will be in the order\n  Flags > Config file > Coded defaults\n\nThe glusterd/config package has been removed. Any GD2 package requiring\naccess to the config needs to now import the spf13/viper package and use\nthe relevant Get* function to get the configuration.\n\nFor eg.\n```go\nimport config \"github.com/spf13/viper\"\n\nfunc someFunc() {\n  rpcAddress := config.GetString(\"rpcaddress\")\n}\n```"},"comment":{"url":"https://api.github.com/repos/gluster/glusterd2/issues/comments/230396115","html_url":"https://github.com/gluster/glusterd2/pull/96#issuecomment-230396115","issue_url":"https://api.github.com/repos/gluster/glusterd2/issues/96","id":230396115,"user":{"login":"atinmu","id":6978456,"avatar_url":"https://avatars.githubusercontent.com/u/6978456?v=3","gravatar_id":"","url":"https://api.github.com/users/atinmu","html_url":"https://github.com/atinmu","followers_url":"https://api.github.com/users/atinmu/followers","following_url":"https://api.github.com/users/atinmu/following{/other_user}","gists_url":"https://api.github.com/users/atinmu/gists{/gist_id}","starred_url":"https://api.github.com/users/atinmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atinmu/subscriptions","organizations_url":"https://api.github.com/users/atinmu/orgs","repos_url":"https://api.github.com/users/atinmu/repos","events_url":"https://api.github.com/users/atinmu/events{/privacy}","received_events_url":"https://api.github.com/users/atinmu/received_events","type":"User","site_admin":false},"created_at":"2016-07-05T06:21:59Z","updated_at":"2016-07-05T06:21:59Z","body":"@kshlm : I tried to create a glusterd.yaml file in '/etc/glusterd' with following content:\r\n``localstatedir = \"/var/lib/glusterd\"                                                  \r\n  rpcaddress = \":24008\"                                                                \r\n  restaddress = \":24007\"\r\n``\r\nWhile bringing up glusterd2 instance I see the following log:\r\nDEBU[0000] failed to read any config files, continuing with defaults  config=glusterd.(toml|yaml|json) error=While parsing config: yaml: unmarshal errors:\r\n  line 1: cannot unmarshal !!str `localst...` into map[string]interface {} paths=[/etc/glusterd .]\r\nDEBU[0000] running with configuration   "}}
{"actor":{"display_login":"atinmu"}}