{"action":"created","issue":{"url":"https://api.github.com/repos/kelseyhightower/confd/issues/275","repository_url":"https://api.github.com/repos/kelseyhightower/confd","labels_url":"https://api.github.com/repos/kelseyhightower/confd/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/kelseyhightower/confd/issues/275/comments","events_url":"https://api.github.com/repos/kelseyhightower/confd/issues/275/events","html_url":"https://github.com/kelseyhightower/confd/issues/275","id":69846386,"number":275,"title":"after erroneous check (by check_cmd) the result file is not updated for next check","user":{"login":"nixn","id":1525581,"avatar_url":"https://avatars.githubusercontent.com/u/1525581?v=3","gravatar_id":"","url":"https://api.github.com/users/nixn","html_url":"https://github.com/nixn","followers_url":"https://api.github.com/users/nixn/followers","following_url":"https://api.github.com/users/nixn/following{/other_user}","gists_url":"https://api.github.com/users/nixn/gists{/gist_id}","starred_url":"https://api.github.com/users/nixn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nixn/subscriptions","organizations_url":"https://api.github.com/users/nixn/orgs","repos_url":"https://api.github.com/users/nixn/repos","events_url":"https://api.github.com/users/nixn/events{/privacy}","received_events_url":"https://api.github.com/users/nixn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kelseyhightower/confd/labels/docs","name":"docs","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-21T13:28:23Z","updated_at":"2016-02-23T14:49:59Z","closed_at":"2016-02-23T14:49:59Z","body":"I'm not completely sure about this, but it seems like when confd updates a file (result file) and runs `check_cmd`, which fails, then it won't replace it any more with neither the old version nor a new version (e.g. corrected template or corrected value). This leads to endless failing checks afterwards (once each interval). One must replace the result file with a \"clean\" (non-failing) version, then confd picks up the changes from the template or backend on the next check.\r\n\r\nIs `check_cmd` possibly called before a new result file was written, resulting in the error?"},"comment":{"url":"https://api.github.com/repos/kelseyhightower/confd/issues/comments/187726765","html_url":"https://github.com/kelseyhightower/confd/issues/275#issuecomment-187726765","issue_url":"https://api.github.com/repos/kelseyhightower/confd/issues/275","id":187726765,"user":{"login":"kelseyhightower","id":1123322,"avatar_url":"https://avatars.githubusercontent.com/u/1123322?v=3","gravatar_id":"","url":"https://api.github.com/users/kelseyhightower","html_url":"https://github.com/kelseyhightower","followers_url":"https://api.github.com/users/kelseyhightower/followers","following_url":"https://api.github.com/users/kelseyhightower/following{/other_user}","gists_url":"https://api.github.com/users/kelseyhightower/gists{/gist_id}","starred_url":"https://api.github.com/users/kelseyhightower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelseyhightower/subscriptions","organizations_url":"https://api.github.com/users/kelseyhightower/orgs","repos_url":"https://api.github.com/users/kelseyhightower/repos","events_url":"https://api.github.com/users/kelseyhightower/events{/privacy}","received_events_url":"https://api.github.com/users/kelseyhightower/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T14:49:59Z","updated_at":"2016-02-23T14:49:59Z","body":"Unfortunately we cannot change the behavior on this one. confd writes configs to a temp file to ensure we don't change configs unless they pass any checks. Backend up the target file, then running the check runs the possibility of leaving the system in a broken state. The goal rename the proposed config file after ensuring it's ready to go.\r\n\r\nconfd does not support the slightly more complex use cases required by sites enabled, where a top level configuration file needs to import other files to complete the configuration. This is where I would say confd is the wrong tool for the job and maybe a more general configuration management tool like Puppet or Chef would be a better fit."}}