saltstack / saltstack/salt

file-root is not updated / has old leftovers

Open
#51,970 37 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of Issue/Question

I'm trying to run a state.show_highstate from the local files cache but it fails with conflicting ids due to old cached files.

# /usr/bin/salt-call --local --file-root=/var/cache/salt/minion/files/base/ --pillar-root=/var/cache/salt/minion/pillar/ state.show_highstate
local:
    - Detected conflicting IDs, SLS IDs need to be globally unique.
          The conflicting ID is '/var/qmail/alias/.qmail-ph-otrsqueue' and is found in SLS 'base:service.mail.aliases' and SLS 'base:pkg.qmail.aliases'

If i delete the cache /var/cache/salt/minion/files/base issue a state.apply and try again everything is fine.

A diff afterwards of the old base dir and new base dir shows:

# diff -upr base_old/ /var/cache/salt/minion/files/base/
Only in base/_macros: default_settings.sls
Only in base/_macros: host_settings.sls
Only in base/_macros: role_settings.sls
Only in base/_macros: settings.sls
Only in base/_returners: flasticsearch.py
Only in base/: config
Only in base/install: kernel_reboot.sls
Only in base/install: reboot.sls
Only in base/: ph
Only in base/pkg: btrfs-tools.sls
Only in base/pkg/jailinst: config.sls
Only in base/pkg/jailinst: default_shelllimits.yml
Only in base/pkg/jailinst: init.sls
Only in base/pkg/linux-image: is_supported_and_secure.sls
Only in base/pkg: linux-image.sls
Only in base/pkg/logrotate/files: logrotate
Only in base/pkg: os_base.sls
Only in base/pkg: roundcubemail-ph.sls
Only in base/pkg/salt-minion/files: ph-elastic.conf
Only in base/pkg/salt-minion/files: ph.conf
Only in base/pkg/salt-minion/files: salt-minion.conf
Only in base/pkg/salt-minion/files: salt-minion.service
Only in base/pkg/salt-minion: restart.sls
Only in base/pkg: salt-minion.sls
Only in base/pkg: servercon
Only in base/pkg/systemd/files: timesyncd.conf
Only in base/pkg/systemd/files: timesyncd.conf.jinja
Only in base/pkg: toolkit-ph.sls
Only in base/pkg: zabbix-agent-ph.sls
Only in base/pkg: zabbix-agent.sls
Only in base/repo: apt-update-bug-38090.sls
Only in base/repo/files: ph.pub
Only in base/: run
Only in base/service: mail
Only in base/service: salt
Only in base/service: ssh
Only in base/service: tuning
Only in base/service: zabbix-agent
Only in base/setup: salt_git_deploy_key
Only in base/: startup_states
Versions Report
# salt-call --local --versions-report
Salt Version:
           Salt: 2017.7.4
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.9.4
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.4.3
            ZMQ: 4.2.1
 
System Versions:
           dist: debian 9.4 
         locale: UTF-8
        machine: x86_64
        release: 4.12.0+147-ph
         system: Linux
        version: debian 9.4 

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.

Research direction

Start by reproducing the local state.show_highstate command with the reported --file-root and --pillar-root, then compare the cached files before and after state.apply. Investigate how Salt 2017.7.4 updates /var/cache/salt/minion/files/base/; done means stale files no longer cause conflicting IDs in the highstate output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.