Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 sr sanity crashes when a pid file exists but the config doesn't #1144

Closed
reidsunderland opened this issue Aug 2, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working crasher Crashes entire app. likely-fixed likely fix is in the repository, success not confirmed yet. Priority 3 - Important worrisome impact... should study carefully v2only only affects v2 branches.

Comments

@reidsunderland
Copy link
Member

I marked this v2 only, but haven't yet confirmed that sr3 handles this situation any better.

When a pid file exists in the .cache directory, but the corresponding config file has been removed, sr sanity crashes.

We're observing it on 2.21.4 but I don't see any changes in the related code, so I don't think it was fixed.

sanity: missing: [['sender', 'configname', 1]]
starting them up...
Traceback (most recent call last):
  File "/usr/bin/sr", line 11, in <module>
    load_entry_point('metpx-sarracenia==2.21.4', 'console_scripts', 'sr')()
  File "/usr/lib/python3/dist-packages/sarra/sr.py", line 1094, in main
    gs.sanity()
  File "/usr/lib/python3/dist-packages/sarra/sr.py", line 766, in sanity
    self._start_missing()
  File "/usr/lib/python3/dist-packages/sarra/sr.py", line 728, in _start_missing
    self._launch_instance(component_path, c, cfg, i)
  File "/usr/lib/python3/dist-packages/sarra/sr.py", line 90, in _launch_instance
    s = self.configs[c][cfg]['options'].statehost.lower()
KeyError: 'configname'
@reidsunderland reidsunderland added bug Something isn't working Priority 3 - Important worrisome impact... should study carefully v2only only affects v2 branches. crasher Crashes entire app. labels Aug 2, 2024
@reidsunderland
Copy link
Member Author

I reproduced the bug on the v2_dev branch, so it wasn't fixed.

@reidsunderland
Copy link
Member Author

with my fix, we get this:

sanity: missing: [['sarra', 'get_copernicus', 1]]
starting them up...
sarra get_copernicus is not a known config, cannot start it. Maybe the config file is missing?
killing strays...

$? = 0

instead of

sanity: missing: [['sarra', 'get_copernicus', 1]]
starting them up...
Traceback (most recent call last):
  File "/net/local/home/sunderlandr/.local/bin/sr", line 33, in <module>
    sys.exit(load_entry_point('metpx-sarracenia', 'console_scripts', 'sr')())
  File "/net/local/home/sunderlandr/sarra_v2/sarra/sr.py", line 1106, in main
    gs.sanity()
  File "/net/local/home/sunderlandr/sarra_v2/sarra/sr.py", line 778, in sanity
    self._start_missing()
  File "/net/local/home/sunderlandr/sarra_v2/sarra/sr.py", line 740, in _start_missing
    self._launch_instance(component_path, c, cfg, i)
  File "/net/local/home/sunderlandr/sarra_v2/sarra/sr.py", line 91, in _launch_instance
    s = self.configs[c][cfg]['options'].statehost.lower()
KeyError: 'get_copernicus'

$? = 1

petersilva added a commit that referenced this issue Aug 3, 2024
Fix for #1144 - don't crash when the config doesn't exist for a missing instance
@petersilva petersilva added the likely-fixed likely fix is in the repository, success not confirmed yet. label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crasher Crashes entire app. likely-fixed likely fix is in the repository, success not confirmed yet. Priority 3 - Important worrisome impact... should study carefully v2only only affects v2 branches.
Projects
None yet
Development

No branches or pull requests

2 participants