{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/37523","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/37523/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/37523/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/37523/events","html_url":"https://github.com/saltstack/salt/issues/37523","id":187817065,"number":37523,"title":"file.comment should not create .bak files, should use salt minion backup system per minion config","user":{"login":"rubinlinux","id":1413897,"avatar_url":"https://avatars.githubusercontent.com/u/1413897?v=3","gravatar_id":"","url":"https://api.github.com/users/rubinlinux","html_url":"https://github.com/rubinlinux","followers_url":"https://api.github.com/users/rubinlinux/followers","following_url":"https://api.github.com/users/rubinlinux/following{/other_user}","gists_url":"https://api.github.com/users/rubinlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/rubinlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubinlinux/subscriptions","organizations_url":"https://api.github.com/users/rubinlinux/orgs","repos_url":"https://api.github.com/users/rubinlinux/repos","events_url":"https://api.github.com/users/rubinlinux/events{/privacy}","received_events_url":"https://api.github.com/users/rubinlinux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-07T20:22:08Z","updated_at":"2016-11-07T22:01:02Z","closed_at":null,"body":"### Description of Issue/Question\r\nWhen using file.comment, it creates .bak files in the same directory as target file, and does it by default.\r\nThis is inconsistent.  It should use the same mechanism as the file.managed state uses, where files are backed up to the minion backup location and available to the minion_backup module.\r\n\r\n.bak files getting created in, say, a foo.d/ directory are not always ignored, and often ignored with a warning. For example, commenting a line from a logrotate.d/file will cause emails to be generated because of duplicate entries from the .bak file.\r\n\r\nSalt has a nice backup system designed to avoid these problems, every module should use it exclusively.\r\n\r\n### Setup\r\n  /etc/logrotate.d/exim4-paniclog:\r\n    file.comment:\r\n      - regex: ^\\s+size.*$\r\n\r\n### Steps to Reproduce Issue\r\nrun state.apply on a node with above rule. Observe /etc/logrotate.d/exim4-paniclog.bak gets created, and used by the system (Just 1 example of how this can cause unexpected behavior)\r\n\r\n### Versions Report\r\n(Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)\r\nThe master is running debian7 but the minions are on debian8, salt version 2016.3.4+ds-1\r\nSalt Version:\r\n           Salt: 2016.3.3\r\n \r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: 3.2.2\r\n       dateutil: 1.5\r\n          gitdb: 0.5.4\r\n      gitpython: 0.3.2 RC1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.6\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.3.0\r\n   mysql-python: 1.2.3\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.3 (default, Jun 21 2016, 18:38:19)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.10\r\n          PyZMQ: 13.1.0\r\n           RAET: Not Installed\r\n          smmap: 0.8.2\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 3.2.3\r\n \r\nSystem Versions:\r\n           dist: debian 7.11 \r\n        machine: x86_64\r\n        release: 3.2.0-4-amd64\r\n         system: Linux\r\n        version: debian 7.11 \r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/258976911","html_url":"https://github.com/saltstack/salt/issues/37523#issuecomment-258976911","issue_url":"https://api.github.com/repos/saltstack/salt/issues/37523","id":258976911,"user":{"login":"Ch3LL","id":6886822,"avatar_url":"https://avatars.githubusercontent.com/u/6886822?v=3","gravatar_id":"","url":"https://api.github.com/users/Ch3LL","html_url":"https://github.com/Ch3LL","followers_url":"https://api.github.com/users/Ch3LL/followers","following_url":"https://api.github.com/users/Ch3LL/following{/other_user}","gists_url":"https://api.github.com/users/Ch3LL/gists{/gist_id}","starred_url":"https://api.github.com/users/Ch3LL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ch3LL/subscriptions","organizations_url":"https://api.github.com/users/Ch3LL/orgs","repos_url":"https://api.github.com/users/Ch3LL/repos","events_url":"https://api.github.com/users/Ch3LL/events{/privacy}","received_events_url":"https://api.github.com/users/Ch3LL/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T22:01:02Z","updated_at":"2016-11-07T22:01:02Z","body":"@rubinlinux looks like we are tracking this issue here: #3551\r\n\r\nAre you okay tracking this issue in that issue instead of here?"}}
{"actor":{"display_login":"Ch3LL"}}