question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] salt.states.sync_all does not always work

See original GitHub issue

Description For some reason salt.states.sync_all doesn’t work consistently. I first had the problem because I was originally using module.run with the old deprecated syntax. I switched over to the new syntax for module.run, and then discovered that you guys implemented it as a state.

Setup There’s two environments. One of them is named “base”, the other is named “bootstrap”. The minion is using “bootstrap” and “base” is actually never used. The minion is running the 3000.3 py3 installer.

Steps to Reproduce the behavior This is literally copied and pasted straight out of my terminal.

master salt # salt $m test.ping
jid: 20200612103924174230
HUVp16SeYiPt2L50peVt:
    True


-------------------------------------------
Summary
-------------------------------------------
# of minions targeted: 1
# of minions returned: 1
# of minions that did not return: 0
# of minions with errors: 0
-------------------------------------------
master salt # cat > wtf.sls
wtf:
 saltutil.sync_all:
  - saltenv: bootstrap
master salt # salt $m state.apply wtf
jid: 20200612104023702610
HUVp16SeYiPt2L50peVt:
  Name: wtf - Function: saltutil.sync_all - Result: Clean Started: - 11:40:24.452815 Duration: 1246.684 ms

Summary for HUVp16SeYiPt2L50peVt
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   1.247 s


-------------------------------------------
Summary
-------------------------------------------
# of minions targeted: 1
# of minions returned: 1
# of minions that did not return: 0
# of minions with errors: 0
-------------------------------------------
master salt # salt $m saltutil.sync_all saltenv=bootstrap
jid: 20200612104135151899
HUVp16SeYiPt2L50peVt:
    ----------
    beacons:
    clouds:
    engines:
    executors:
    grains:
    log_handlers:
    matchers:
    modules:
        - modules.chocolatey
        - modules.win_system
    output:
    proxymodules:
    renderers:
    returners:
        - returners.etcd_return
    sdb:
    serializers:
    states:
        - states.git
        - states.win_system
    thorium:
    utils:
        - utils.network
        - utils.win_reg


-------------------------------------------
Summary
-------------------------------------------
# of minions targeted: 1
# of minions returned: 1
# of minions that did not return: 0
# of minions with errors: 0
-------------------------------------------

Expected behavior I’m trying to use this to sync modules that contain bugfixes for things that are broken. I expect this to sync modules into the minion. It unfortunately does not.

Screenshots

Versions Report Salt Version: Salt: 3000.3

Dependency Versions: cffi: 1.12.2 cherrypy: 17.4.1 dateutil: 2.8.0 docker-py: Not Installed gitdb: 2.0.5 gitpython: Not Installed Jinja2: 2.10.1 libgit2: Not Installed M2Crypto: Not Installed Mako: 1.0.7 msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: Not Installed pycparser: 2.19 pycrypto: Not Installed pycryptodome: 3.8.1 pygit2: Not Installed Python: 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:07:06) [MSC v.1900 32 bi t (Intel)] python-gnupg: 0.4.4 PyYAML: 5.1.2 PyZMQ: 18.0.1 smmap: 2.0.5 timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.1

System Versions: dist: locale: cp1252 machine: x86 release: 8.1 system: Windows version: 8.1 6.3.9600 SP0 Multiprocessor Free

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sagetheragecommented, Jun 15, 2020

@arizvisa can we please keep the issue title with Bug instead of alluding to profanity, please?

0reactions
arizvisacommented, Jun 21, 2020

After upgrading to 3001, this issue doesn’t reproduce anymore similar to another issue that I submitted for 3000.3. I downgraded to 3000.3 to confirm my sanity and was still able to reproduce this one as well.

However, I’m closing this as it was fixed by some commit in-between 3000.3 and 3001 and that’s really all I care about. It gets progressively harder and harder to defend usage of this software when its maintenance requires you to be a Python developer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

saltutil.sync_modules is not working as expected inside state
I have a state where i use custom modules. first part of the state for syncing the modules before using it (to make...
Read more >
salt.modules.saltutil - Salt Project Documentation
To sync from more than one environment, pass a comma-separated list. If not passed, then all environments configured in the top files will...
Read more >
Stuck or Clogged Salt Pin Troubleshooting
Empty all salt from the hopper (shake it and bang against your hand to dislodge grains that may be stuck). Drip a few...
Read more >
Patching Salt Modules
sync_* states to do the same. Some module types could be synced to a master (unfortunately, excluding rosters):. % sudo salt-run saltutil.
Read more >
Bug-A-Salt: Basic Operation and Troubleshooting - YouTube
CUSTOMER SERVICE:(310) 392-3288 M-F 9AM-5PM PACIFIC STANDARD TIMEYou can also contact us via email at support@ bugasalt.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found