saltstack / salt-bootstrap

Generic Salt Bootstrap Script
Other
928 stars 550 forks source link

Windows bootstrap script defaults RootDir to c:\salt #1950

Closed UtahDave closed 1 year ago

UtahDave commented 1 year ago

Description of Issue/Question

The Windows bootstrap script defaults the RootDir to c:\salt. If c:\salt exists, then the minion continues to use c:\salt for everything, which is confusing because the minion configs should all be in the ProgramData directory now.

The bootstrap script creates all the files under c:\salt

Setup

I installed the 3006.1 Salt minion on a Windows 2016 server using the bootstrap script available at https://winbootstrap.saltproject.io/. The only config changed was the "master" option pointing to my master.

Steps to Reproduce Issue

use grains.set to set a grain and then you'll find the grains file in c:\salt\conf\grains You'll also see all the other config files will be found in c:\salt as well.

If you do a fresh install of Salt 3006.1 on Windows and DO NOT use the bootstrap script, but use the installer exe itself, you'll find that everything is configured to use c:\ProgramData\Salt Project\Salt\conf. The grains file will be created in that directory as expected.

I'm guessing that vRA / Aria Automation is using the bootstrap script when configuring new VMs, which is causing the problems to show up. I could be wrong on that, but that's my best guess.

Versions and Systems

root@localmaster:~# salt vagrant.lan test.versions
vagrant.lan:
    Salt Version:
              Salt: 3006.1

    Python Version:
            Python: 3.10.11 (heads/main:408ea86, May  5 2023, 02:40:17) [MSC v.1934 64 bit (AMD64)]

    Dependency Versions:
              cffi: 1.14.6
          cherrypy: 18.6.1
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: 4.0.7
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.10.1
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 5.4.1
             PyZMQ: 25.0.2
            relenv: 0.12.3
             smmap: 4.0.0
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

    System Versions:
              dist:   
            locale: cp1252
           machine: AMD64
           release: 2016Server
            system: Windows
           version: 2016Server 10.0.14393 SP0 Multiprocessor Free

The latest bootstrap script for windows from https://winbootstrap.saltproject.io/

UtahDave commented 1 year ago

Thanks for the fix! When should we expect this to show up in the file downloaded from winbootstrap.saltproject.io ? Is there some kind of release process for that?

twangboy commented 1 year ago

https://github.com/saltstack/salt-bootstrap/releases/tag/v2023.08.03 It should be there now