-
-
Save danudey/e82784456e0fe4e8b692 to your computer and use it in GitHub Desktop.
A strange bug I ran into today. And only today. And not before.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The problem happens on line 12 (which is actually salt/fileserver/roots.py:153). fp_.read().split(':') returns [''] | |
# | |
# Why this is weird: | |
# | |
# 1. The file actually does have the appropriate content when checked before/after (hash:mtime) | |
# 2. This always happens to the same specific servers when I 'salt * state.highstate' | |
# 3. If I state.highstate that server only, it works fine | |
# if we have a cache, serve that if the mtime hasn't changed | |
if os.path.exists(cache_path): | |
with salt.utils.fopen(cache_path, 'rb') as fp_: | |
hsum, mtime = fp_.read().split(':') | |
if os.path.getmtime(path) == mtime: | |
# check if mtime changed | |
ret['hsum'] = hsum | |
return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment