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

Terminating the exporter causes Python traceback to be shown when running in Docker #305

Open
andy-maier opened this issue Mar 28, 2023 · 0 comments
Labels
area: code type: bug Something isn't working
Milestone

Comments

@andy-maier
Copy link
Member

andy-maier commented Mar 28, 2023

When running the exporter in a Docker container on macos, stopping it with Ctrl-C creates a traceback, as shown:

Exporter is up and running on port 9291
^CExporter interrupted after server start.
Cleaning up metrics context on HMC
Cleaning up notification subscription on HMC
  File "/usr/local/bin/zhmc_prometheus_exporter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/zhmc_prometheus_exporter/zhmc_prometheus_exporter.py", line 1731, in main
    cleanup(session, context, resources)
  File "/usr/local/lib/python3.9/site-packages/zhmc_prometheus_exporter/zhmc_prometheus_exporter.py", line 715, in cleanup
    res.disable_auto_update()
  File "/usr/local/lib/python3.9/site-packages/zhmcclient/_resource.py", line 556, in disable_auto_update
    session.unsubscribe_auto_update()
  File "/usr/local/lib/python3.9/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/usr/local/lib/python3.9/site-packages/zhmcclient/_logging.py", line 227, in log_api_call
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/zhmcclient/_session.py", line 1343, in unsubscribe_auto_update
    self._resource_updater.close()
  File "/usr/local/lib/python3.9/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/usr/local/lib/python3.9/site-packages/zhmcclient/_logging.py", line 227, in log_api_call
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/zhmcclient/_resource_updater.py", line 108, in close
    self._conn.disconnect()
  File "/usr/local/lib/python3.9/site-packages/stomp/connect.py", line 172, in disconnect
    Protocol11.disconnect(self, receipt, headers, **keyword_headers)
  File "/usr/local/lib/python3.9/site-packages/stomp/protocol.py", line 351, in disconnect
    traceback.print_stack()
Closing session with HMC

Environment for the above case:

  • zhmc-prometheus-exporter: 1.4.0
  • stomp.py: 6.0.0
  • Python environment: Python 3.9.16 in debian in Docker container on macos

This does not happen when the exporter is run on macos directly (in a virtualenv).

Exporter is up and running on port 9291
^CExporter interrupted after server start.
Cleaning up metrics context on HMC
Cleaning up notification subscription on HMC
Closing session with HMC

Environment for the above case:

  • zhmc-prometheus-exporter: 1.4.0
  • stomp.py: 6.0.0
  • Python environment: Python 3.9.16 in virtualenv on macos
@andy-maier andy-maier added type: bug Something isn't working area: code labels Mar 28, 2023
@andy-maier andy-maier added this to the 1.5.0 milestone Mar 28, 2023
@andy-maier andy-maier modified the milestones: 1.5.0, 1.6.0 Nov 9, 2023
@andy-maier andy-maier modified the milestones: 1.6.0, 1.7.0 Apr 2, 2024
@andy-maier andy-maier modified the milestones: 1.7.0, 2.0.0 Jul 30, 2024
@andy-maier andy-maier modified the milestones: 2.0.0, 2.1.0 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: code type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant