Unable to apply State files on Salt











up vote
0
down vote

favorite












Having issues applying state files to minions on salt, they're just basic test ones, nothing complicated.



In my master config file I have the following file roots definition:



file_roots:
base:
- /srv/salt/


My /srv/salt/top.sls file looks like this:



base:
'*':
- vim


Then at /srv/salt/vim/init.sls I have the following:



vim:
pkg.installed


So, that should be applied to all minions when applied, so I run the following:



sudo salt '*' state.apply


I get the following output, and it's not applied, as it seems to not be detecting the top.sls file?



salt-master-1:
----------
ID: states
Function: no.None
Result: False
Comment: No Top file or master_tops data matches found.
Changes:

Summary for salt-master-1
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 0.000 ms
dev-docker-1:
----------
ID: states
Function: no.None
Result: False
Comment: No Top file or master_tops data matches found.
Changes:

Summary for dev-docker-1
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 0.000 ms
ERROR: Minions returned with non-zero exit code


If I look at the logs for the minion, dev-docker-1 nothing is logged as an error, all that I see is this.



2018-11-08 18:33:12,993 [salt.minion      :1429][INFO    ][4883] User sudo_salt Executing command state.apply with jid 20181108183312990343
2018-11-08 18:33:13,015 [salt.minion :1564][INFO ][5438] Starting a new job with PID 5438
2018-11-08 18:33:13,331 [salt.state :933 ][INFO ][5438] Loading fresh modules for state activity
2018-11-08 18:33:13,448 [salt.minion :1863][INFO ][5438] Returning information for job: 20181108183312990343


Any help greatly appreciated as I'm a bit lost as to why this isn't working . . .



Edit 1



I have enabled verbose logging on the minion, and I see the following, seems it can't see the top.sls file



[DEBUG   ] Could not find file 'salt://top.sls' in saltenv 'base'
[DEBUG ] No contents loaded for saltenv 'base'
[DEBUG ] No contents found in top file. If this is not expected, verify that the 'file_roots' specified in 'etc/master' are accessible. The 'file_roots' configuration is: {u'base': }









share|improve this question




























    up vote
    0
    down vote

    favorite












    Having issues applying state files to minions on salt, they're just basic test ones, nothing complicated.



    In my master config file I have the following file roots definition:



    file_roots:
    base:
    - /srv/salt/


    My /srv/salt/top.sls file looks like this:



    base:
    '*':
    - vim


    Then at /srv/salt/vim/init.sls I have the following:



    vim:
    pkg.installed


    So, that should be applied to all minions when applied, so I run the following:



    sudo salt '*' state.apply


    I get the following output, and it's not applied, as it seems to not be detecting the top.sls file?



    salt-master-1:
    ----------
    ID: states
    Function: no.None
    Result: False
    Comment: No Top file or master_tops data matches found.
    Changes:

    Summary for salt-master-1
    ------------
    Succeeded: 0
    Failed: 1
    ------------
    Total states run: 1
    Total run time: 0.000 ms
    dev-docker-1:
    ----------
    ID: states
    Function: no.None
    Result: False
    Comment: No Top file or master_tops data matches found.
    Changes:

    Summary for dev-docker-1
    ------------
    Succeeded: 0
    Failed: 1
    ------------
    Total states run: 1
    Total run time: 0.000 ms
    ERROR: Minions returned with non-zero exit code


    If I look at the logs for the minion, dev-docker-1 nothing is logged as an error, all that I see is this.



    2018-11-08 18:33:12,993 [salt.minion      :1429][INFO    ][4883] User sudo_salt Executing command state.apply with jid 20181108183312990343
    2018-11-08 18:33:13,015 [salt.minion :1564][INFO ][5438] Starting a new job with PID 5438
    2018-11-08 18:33:13,331 [salt.state :933 ][INFO ][5438] Loading fresh modules for state activity
    2018-11-08 18:33:13,448 [salt.minion :1863][INFO ][5438] Returning information for job: 20181108183312990343


    Any help greatly appreciated as I'm a bit lost as to why this isn't working . . .



    Edit 1



    I have enabled verbose logging on the minion, and I see the following, seems it can't see the top.sls file



    [DEBUG   ] Could not find file 'salt://top.sls' in saltenv 'base'
    [DEBUG ] No contents loaded for saltenv 'base'
    [DEBUG ] No contents found in top file. If this is not expected, verify that the 'file_roots' specified in 'etc/master' are accessible. The 'file_roots' configuration is: {u'base': }









    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Having issues applying state files to minions on salt, they're just basic test ones, nothing complicated.



      In my master config file I have the following file roots definition:



      file_roots:
      base:
      - /srv/salt/


      My /srv/salt/top.sls file looks like this:



      base:
      '*':
      - vim


      Then at /srv/salt/vim/init.sls I have the following:



      vim:
      pkg.installed


      So, that should be applied to all minions when applied, so I run the following:



      sudo salt '*' state.apply


      I get the following output, and it's not applied, as it seems to not be detecting the top.sls file?



      salt-master-1:
      ----------
      ID: states
      Function: no.None
      Result: False
      Comment: No Top file or master_tops data matches found.
      Changes:

      Summary for salt-master-1
      ------------
      Succeeded: 0
      Failed: 1
      ------------
      Total states run: 1
      Total run time: 0.000 ms
      dev-docker-1:
      ----------
      ID: states
      Function: no.None
      Result: False
      Comment: No Top file or master_tops data matches found.
      Changes:

      Summary for dev-docker-1
      ------------
      Succeeded: 0
      Failed: 1
      ------------
      Total states run: 1
      Total run time: 0.000 ms
      ERROR: Minions returned with non-zero exit code


      If I look at the logs for the minion, dev-docker-1 nothing is logged as an error, all that I see is this.



      2018-11-08 18:33:12,993 [salt.minion      :1429][INFO    ][4883] User sudo_salt Executing command state.apply with jid 20181108183312990343
      2018-11-08 18:33:13,015 [salt.minion :1564][INFO ][5438] Starting a new job with PID 5438
      2018-11-08 18:33:13,331 [salt.state :933 ][INFO ][5438] Loading fresh modules for state activity
      2018-11-08 18:33:13,448 [salt.minion :1863][INFO ][5438] Returning information for job: 20181108183312990343


      Any help greatly appreciated as I'm a bit lost as to why this isn't working . . .



      Edit 1



      I have enabled verbose logging on the minion, and I see the following, seems it can't see the top.sls file



      [DEBUG   ] Could not find file 'salt://top.sls' in saltenv 'base'
      [DEBUG ] No contents loaded for saltenv 'base'
      [DEBUG ] No contents found in top file. If this is not expected, verify that the 'file_roots' specified in 'etc/master' are accessible. The 'file_roots' configuration is: {u'base': }









      share|improve this question















      Having issues applying state files to minions on salt, they're just basic test ones, nothing complicated.



      In my master config file I have the following file roots definition:



      file_roots:
      base:
      - /srv/salt/


      My /srv/salt/top.sls file looks like this:



      base:
      '*':
      - vim


      Then at /srv/salt/vim/init.sls I have the following:



      vim:
      pkg.installed


      So, that should be applied to all minions when applied, so I run the following:



      sudo salt '*' state.apply


      I get the following output, and it's not applied, as it seems to not be detecting the top.sls file?



      salt-master-1:
      ----------
      ID: states
      Function: no.None
      Result: False
      Comment: No Top file or master_tops data matches found.
      Changes:

      Summary for salt-master-1
      ------------
      Succeeded: 0
      Failed: 1
      ------------
      Total states run: 1
      Total run time: 0.000 ms
      dev-docker-1:
      ----------
      ID: states
      Function: no.None
      Result: False
      Comment: No Top file or master_tops data matches found.
      Changes:

      Summary for dev-docker-1
      ------------
      Succeeded: 0
      Failed: 1
      ------------
      Total states run: 1
      Total run time: 0.000 ms
      ERROR: Minions returned with non-zero exit code


      If I look at the logs for the minion, dev-docker-1 nothing is logged as an error, all that I see is this.



      2018-11-08 18:33:12,993 [salt.minion      :1429][INFO    ][4883] User sudo_salt Executing command state.apply with jid 20181108183312990343
      2018-11-08 18:33:13,015 [salt.minion :1564][INFO ][5438] Starting a new job with PID 5438
      2018-11-08 18:33:13,331 [salt.state :933 ][INFO ][5438] Loading fresh modules for state activity
      2018-11-08 18:33:13,448 [salt.minion :1863][INFO ][5438] Returning information for job: 20181108183312990343


      Any help greatly appreciated as I'm a bit lost as to why this isn't working . . .



      Edit 1



      I have enabled verbose logging on the minion, and I see the following, seems it can't see the top.sls file



      [DEBUG   ] Could not find file 'salt://top.sls' in saltenv 'base'
      [DEBUG ] No contents loaded for saltenv 'base'
      [DEBUG ] No contents found in top file. If this is not expected, verify that the 'file_roots' specified in 'etc/master' are accessible. The 'file_roots' configuration is: {u'base': }






      salt-stack






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 8 at 18:53

























      asked Nov 8 at 18:36









      Gareth Jeanne

      65821326




      65821326
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Ok so I worked this out, operator error.



          I had enabled gitfs backend in the config file, which has overridden the default base file system, so I just needed to do.



          fileserver_backend:
          - gitfs
          - base


          Doh!






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53214120%2funable-to-apply-state-files-on-salt%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Ok so I worked this out, operator error.



            I had enabled gitfs backend in the config file, which has overridden the default base file system, so I just needed to do.



            fileserver_backend:
            - gitfs
            - base


            Doh!






            share|improve this answer

























              up vote
              0
              down vote













              Ok so I worked this out, operator error.



              I had enabled gitfs backend in the config file, which has overridden the default base file system, so I just needed to do.



              fileserver_backend:
              - gitfs
              - base


              Doh!






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Ok so I worked this out, operator error.



                I had enabled gitfs backend in the config file, which has overridden the default base file system, so I just needed to do.



                fileserver_backend:
                - gitfs
                - base


                Doh!






                share|improve this answer












                Ok so I worked this out, operator error.



                I had enabled gitfs backend in the config file, which has overridden the default base file system, so I just needed to do.



                fileserver_backend:
                - gitfs
                - base


                Doh!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 22 at 8:48









                Gareth Jeanne

                65821326




                65821326






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53214120%2funable-to-apply-state-files-on-salt%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini