{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/37235","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/37235/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/37235/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/37235/events","html_url":"https://github.com/saltstack/salt/issues/37235","id":185185293,"number":37235,"title":"highstate falsely claims top.sls does not exist - or is somehow unable to load it","user":{"login":"jwhite530","id":1134216,"avatar_url":"https://avatars.githubusercontent.com/u/1134216?v=3","gravatar_id":"","url":"https://api.github.com/users/jwhite530","html_url":"https://github.com/jwhite530","followers_url":"https://api.github.com/users/jwhite530/followers","following_url":"https://api.github.com/users/jwhite530/following{/other_user}","gists_url":"https://api.github.com/users/jwhite530/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhite530/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhite530/subscriptions","organizations_url":"https://api.github.com/users/jwhite530/orgs","repos_url":"https://api.github.com/users/jwhite530/repos","events_url":"https://api.github.com/users/jwhite530/events{/privacy}","received_events_url":"https://api.github.com/users/jwhite530/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-25T17:40:49Z","updated_at":"2016-10-25T21:04:58Z","closed_at":null,"body":"### Description of Issue/Question\r\nHad Salt working fine for nearly a year.  Renamed my top.sls to top.sls.disabled as I worked on things and didn't want minions doing anything yet.  I then renamed it back top.sls and I'm unable to run a highstate on my minions as they respond with:\r\n\r\n```\r\ncn32:\r\n----------\r\n          ID: states\r\n    Function: no.None\r\n      Result: False\r\n     Comment: No Top file or external nodes data matches found.\r\n     Started: \r\n    Duration: \r\n     Changes:   \r\n\r\nSummary for cn32\r\n------------\r\nSucceeded: 0\r\nFailed:    1\r\n------------\r\nTotal states run:     1\r\nTotal run time:   0.000 ms\r\n```\r\n\r\nHowever the file sure does exist:\r\n\r\n```\r\n# ls -l /srv/salt/top.sls\r\n-rw-r--r-- 1 root root 2053 Oct 25 10:25 /srv/salt/top.sls\r\n```\r\n\r\nRunning salt-master with strace shows that it does in fact open the file:\r\n\r\n```\r\n# strace -f -e open /usr/bin/salt-master 2>&1 | grep top.sls\r\n[pid 10632] open(\"/srv/pillar/top.sls\", O_RDONLY) = 47\r\n[pid 10632] open(\"/srv/pillar/top.sls\", O_RDONLY) = 47\r\n[pid 10629] open(\"/var/cache/salt/master/roots/hash/base/top.sls.hash.md5\", O_RDONLY) = 46\r\n[pid 10629] open(\"/srv/salt/top.sls\", O_RDONLY) = 46\r\n[pid 10629] open(\"/var/cache/salt/master/roots/hash/base/top.sls.hash.md5\", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 46\r\n[pid 10628] open(\"/srv/salt/top.sls\", O_RDONLY) = 47\r\n[pid 10632] open(\"/srv/salt/top.sls\", O_RDONLY) = 47\r\n[pid 10630] open(\"/srv/pillar/top.sls\", O_RDONLY <unfinished ...>\r\n[pid 10630] open(\"/srv/pillar/top.sls\", O_RDONLY) = 46\r\n[pid 10630] open(\"/var/cache/salt/master/roots/hash/base/top.sls.hash.md5\", O_RDONLY) = 46\r\n[pid 10630] open(\"/srv/salt/top.sls\", O_RDONLY) = 46\r\n[pid 10630] open(\"/var/cache/salt/master/roots/hash/base/top.sls.hash.md5\", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 46\r\n[pid 10631] open(\"/srv/salt/top.sls\", O_RDONLY) = 46\r\n[pid 10629] open(\"/srv/salt/top.sls\", O_RDONLY) = 47\r\n```\r\n\r\nRestart salt-master, ran a `saltutil.sync_all` on the minions, same result.  So now what?\r\n\r\n### Versions Report\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2016.3.3\r\n\r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 1.5\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.7.2\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.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.5 (default, Nov 20 2015, 02:00:19)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.7.0\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n\r\nSystem Versions:\r\n           dist: centos 7.2.1511 Core\r\n        machine: x86_64\r\n        release: 3.10.0-327.4.5.el7.x86_64\r\n         system: Linux\r\n        version: CentOS Linux 7.2.1511 Core\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/256175461","html_url":"https://github.com/saltstack/salt/issues/37235#issuecomment-256175461","issue_url":"https://api.github.com/repos/saltstack/salt/issues/37235","id":256175461,"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-10-25T21:04:58Z","updated_at":"2016-10-25T21:04:58Z","body":"@jwhite530 nice find. Yes I was able to replicate this behavior. When runing state.highstate with `-ldebug` I did see the correct error that there is conflicting IDs:\r\n\r\n```\r\n[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/top.sls:\r\nbase:\r\n  '*':\r\n    - issues.35989\r\n  '*':\r\n    - test\r\n\r\n[ERROR   ] Unable to render top file: Conflicting ID '*'\r\n[DEBUG   ] LazyLoaded config.option\r\n[DEBUG   ] LazyLoaded highstate.output\r\nlocal:\r\n----------\r\n          ID: states\r\n    Function: no.None\r\n      Result: False\r\n     Comment: No Top file or external nodes data matches found.\r\n     Started: \r\n    Duration: \r\n     Changes:   \r\n\r\nSummary for local\r\n------------\r\nSucceeded: 0\r\nFailed:    1\r\n------------\r\nTotal states run:     1\r\nTotal run time:   0.000 ms\r\n```\r\n\r\nBut of course we need to add a more useful error then  no top file in that outpu. It would have been more useful i'm sure in your situation to see the Conflicting ID error instead. There is an issue open at #31680 which is currently tracking the addition of better error reporting when there are yaml errors within the top file. I just wanted to mention this issue because it is related but I don't see them as a duplciate. we will keep this one open to ensure there is better error reporting specifically when there are conflicting IDs in the top file. Thanks we will need to improve the error reporting here."}}
{"actor":{"display_login":"Ch3LL"}}