Skip to content

[BUG] Custom winrepo_dir_ng value breaks pkg.refresh_db #60607

Closed as not planned

Description

@cavepopo

Description
When using a custom winrepo_dir_ng I cannot get the package list to get updated :

salt -G 'os:windows' pkg.refresh_db

windows-01:
    ----------
    failed:
        0
    success:
        0
    total:
        0

Setup
Salt master main config :

root@salt-master-01:/srv/dev/salt_states/win/repo# cat /etc/salt/master
interface: 0.0.0.0

jinja_env:
  trim_blocks: True
  lstrip_blocks: True
jinja_sls_env:
  trim_blocks: True
  lstrip_blocks: True

winrepo_dir_ng: /srv/dev/salt_states/win/repo/
winrepo_remotes: []

Salt master fileserver config :

root@salt-master-01:/srv/dev/salt_states/win/repo# cat /etc/salt/master.d/gitfs.conf 
fileserver_backend:
  - gitfs
  - roots

# ----------------- GLOBAL CONF -----------------------#
gitfs_global_lock: False
gitfs_privkey: [REDACTED]
gitfs_pubkey: [REDACTED]
gitfs_provider: pygit2
gitfs_update_interval: 60
gitfs_base: main

# ----------------- gitfs CONF -----------------------#
file_roots:
  base:
    - /srv/salt_states
    - /srv/dev/salt_states

gitfs_remotes:
  - [REDACTED]:
    - mountpoint: salt://


# ----------------- ext_pillars CONF -----------------------#
git_pillar_provider: pygit2
git_pillar_base: main

pillar_roots:
  base:
      - /srv/salt_pillars

ext_pillar:
  - git:
    - main [REDACTED]:
      - root:  [REDACTED]
      - pubkey: [REDACTED]
      - privkey: [REDACTED]

Steps to Reproduce the behavior
Try to set a custom winrepo_dir_ng in master config as well as in fileserver_root section

Expected behavior
The ability to define a custom dir where win repo files could be sync'ed

Versions Report
Minion :

windows-01:
    Salt Version:
              Salt: 3003.1
     
    Dependency Versions:
              cffi: 1.14.5
          cherrypy: 18.6.0
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: 4.0.5
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: 1.1.4
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: 2.20
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
            Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
      python-gnupg: 0.4.6
            PyYAML: 5.4.1
             PyZMQ: 18.0.1
             smmap: 3.0.4
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.1
     
    System Versions:
              dist:   
            locale: cp1252
           machine: AMD64
           release: 10
            system: Windows
           version: 10 10.0.19041 SP0

Master :

Salt Version:
          Salt: 3003.1
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: Not Installed
      dateutil: 2.7.3
     docker-py: Not Installed
         gitdb: 2.0.5
     gitpython: 2.1.11
        Jinja2: 2.10
       libgit2: 1.1.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: 2.6.1
  pycryptodome: 3.6.1
        pygit2: 1.6.1
        Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.1.2
         smmap: 2.0.5
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.1
 
System Versions:
          dist: debian 10 buster
        locale: utf-8
       machine: x86_64
       release: 5.4.124-1-pve
        system: Linux
       version: Debian GNU/Linux 10 buster

Additional context
I tried to use this doc : https://docs.saltproject.io/en/latest/topics/windows/windows-package-manager.html
But I obviously failed, some insight would be great.

Thanks

Activity

  1. added
    bug
    on Jul 23, 2021
  2. twangboy commented on Jul 23, 2021

    @twangboy
    Contributor

    https://docs.saltproject.io/en/latest/topics/windows/windows-package-manager.html#winrepo-dir-ng

    The warning says that the winrepo_dir_ng location must be inside the file_roots, otherwise, the minion can't see it. I see you have defined winrepo_dir_ng: /srv/dev/salt_states/win/repo/ which is a location outside of the default file_roots of /srv/salt. Unless you have also changed the file_roots to /srv/dev. But I don't see that in the master config you posted above.

  3. knine commented on Jul 22, 2022

    @knine

    I just ran into this, I tried to make the directory /srv/salt/winrepo and failed with the same issue.

    Master:

    Salt Version:
              Salt: 3004.2
     
    Dependency Versions:
              cffi: 1.11.5
          cherrypy: Not Installed
          dateutil: 2.6.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.10.1
           libgit2: 0.28.4
          M2Crypto: 0.35.2
              Mako: Not Installed
           msgpack: 0.6.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: 2.14
          pycrypto: Not Installed
      pycryptodome: Not Installed
            pygit2: 1.0.3
            Python: 3.6.8 (default, Jan 14 2022, 11:04:20)
      python-gnupg: Not Installed
            PyYAML: 3.12
             PyZMQ: 19.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: rhel 8.6 Ootpa
            locale: UTF-8
           machine: x86_64
           release: 4.18.0-372.9.1.el8.x86_64
            system: Linux
           version: Red Hat Enterprise Linux 8.6 Ootpa
    

    Minion:

        Salt Version:
                  Salt: 3004.1
         
        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: 2.10.1
               libgit2: Not Installed
              M2Crypto: Not Installed
                  Mako: 1.1.4
               msgpack: 0.6.2
          msgpack-pure: Not Installed
          mysql-python: Not Installed
             pycparser: 2.20
              pycrypto: Not Installed
          pycryptodome: 3.10.1
                pygit2: Not Installed
                Python: 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)]
          python-gnupg: 0.4.7
                PyYAML: 5.4.1
                 PyZMQ: 19.0.0
                 smmap: 4.0.0
               timelib: 0.2.4
               Tornado: 4.5.3
                   ZMQ: 4.3.2
         
        System Versions:
                  dist:   
                locale: cp1252
               machine: AMD64
               release: 10
                system: Windows
               version: 10 10.0.19041 SP0 Multiprocessor Free
    
  4. added
    documentation
    on Mar 29, 2023
  5. added this to the Chlorine v3007.0 milestone on Mar 29, 2023
  6. added
    severity-medium
    on Oct 16, 2026
  7. dwoz commented on Oct 16, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

  8. dwoz commented on Oct 28, 2026

    @dwoz
    Contributor

    Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Windowsbugdocumentationseverity-mediumstale

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions