saltstack / saltstack/salt

[BUG] Custom winrepo_dir_ng value breaks pkg.refresh_db

Open
#60,607 2 comments 0 reactions 2 assignees View on GitHub

@xeacott is already working on this.

Since Jul 23, 2021.

bug documentation Windows
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.