{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/47763","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/47763/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/47763/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/47763/events","html_url":"https://github.com/saltstack/salt/issues/47763","id":325246700,"number":47763,"title":"saltutil.sync_XXX doesn't sync items which are not available in base","user":{"login":"dhs-rec","id":7554110,"avatar_url":"https://avatars0.githubusercontent.com/u/7554110?v=4","gravatar_id":"","url":"https://api.github.com/users/dhs-rec","html_url":"https://github.com/dhs-rec","followers_url":"https://api.github.com/users/dhs-rec/followers","following_url":"https://api.github.com/users/dhs-rec/following{/other_user}","gists_url":"https://api.github.com/users/dhs-rec/gists{/gist_id}","starred_url":"https://api.github.com/users/dhs-rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhs-rec/subscriptions","organizations_url":"https://api.github.com/users/dhs-rec/orgs","repos_url":"https://api.github.com/users/dhs-rec/repos","events_url":"https://api.github.com/users/dhs-rec/events{/privacy}","received_events_url":"https://api.github.com/users/dhs-rec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T11:11:08Z","updated_at":"2018-05-22T16:18:22Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description of Issue/Question\r\nWe're using gitfs for providing the environments served by our Salt master. Now, when a new custom grain, module, state, etc. is added to the Git repository on a branch (in _grains, _states, ...), a following `salt-call saltutil.sync_all saltenv=thebranch` doesn't actually sync the new item to the minion. It only starts doing so once the item is available in the base environment, too (after the branch has been merged into master, for example).\r\n### Setup\r\n```\r\nfileserver_backend:\r\n  - git\r\n  - roots\r\ngitfs_remotes:\r\n  - <Repository URL>:\r\n    - root: states\r\n```\r\n### Steps to Reproduce Issue\r\n1. Create new branch in repository\r\n1. Add new custom state to _states\r\n1. Commit and push\r\n1. Wait for master to pull from Git repository\r\n1. Run `salt-call saltutil.sync_all saltenv=<branch name>` on a minion\r\n### Versions Report\r\n```\r\n# salt --versions-report\r\nSalt Version:\r\n           Salt: 2017.7.5\r\n\r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 2.4.2\r\n      docker-py: Not Installed\r\n          gitdb: 0.6.4\r\n      gitpython: 1.0.1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: 1.0.3\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n   pycryptodome: Not Installed\r\n         pygit2: Not Installed\r\n         Python: 2.7.12 (default, Dec  4 2017, 14:50:18)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.2.0\r\n           RAET: Not Installed\r\n          smmap: 0.9.0\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.1.4\r\n\r\nSystem Versions:\r\n           dist: Ubuntu 16.04 xenial\r\n         locale: UTF-8\r\n        machine: x86_64\r\n        release: 4.4.0-1060-aws\r\n         system: Linux\r\n        version: Ubuntu 16.04 xenial\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/391051852","html_url":"https://github.com/saltstack/salt/issues/47763#issuecomment-391051852","issue_url":"https://api.github.com/repos/saltstack/salt/issues/47763","id":391051852,"user":{"login":"gtmanfred","id":732321,"avatar_url":"https://avatars0.githubusercontent.com/u/732321?v=4","gravatar_id":"","url":"https://api.github.com/users/gtmanfred","html_url":"https://github.com/gtmanfred","followers_url":"https://api.github.com/users/gtmanfred/followers","following_url":"https://api.github.com/users/gtmanfred/following{/other_user}","gists_url":"https://api.github.com/users/gtmanfred/gists{/gist_id}","starred_url":"https://api.github.com/users/gtmanfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtmanfred/subscriptions","organizations_url":"https://api.github.com/users/gtmanfred/orgs","repos_url":"https://api.github.com/users/gtmanfred/repos","events_url":"https://api.github.com/users/gtmanfred/events{/privacy}","received_events_url":"https://api.github.com/users/gtmanfred/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T16:18:22Z","updated_at":"2018-05-22T16:18:22Z","author_association":"MEMBER","body":"I am unable to replicate this.\r\n\r\n```\r\n[root@3bc37f834fd2 gitrepo]# salt \\* cp.list_master\r\n3bc37f834fd2:\r\n    - _modules/README.md\r\n[root@3bc37f834fd2 gitrepo]# salt \\* cp.list_master saltenv=branch\r\n3bc37f834fd2:\r\n    - _modules/README.md\r\n    - _modules/testmod.py\r\n[root@3bc37f834fd2 gitrepo]# salt \\* saltutil.sync_modules\r\n3bc37f834fd2:\r\n[root@3bc37f834fd2 gitrepo]# salt \\* saltutil.sync_modules saltenv=branch\r\n3bc37f834fd2:\r\n    - modules.testmod\r\n[root@3bc37f834fd2 gitrepo]# salt \\* testmod.ping\r\n3bc37f834fd2:\r\n    True\r\n```\r\n\r\nI only have testmod.py in the `branch` branch, and not in `master`, but when I set the saltenv for the sync_modules it syncs fine.\r\n\r\nCan you provide me with a setup and git repository that is able to replicate this?\r\n\r\nThanks,\r\nDaniel"}}
{"actor":{"display_login":"gtmanfred"}}