Skip to content

Commit

Permalink
Fix broken symlink python3 and unmet dependencies warnings. (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: peppepetra [email protected]
  • Loading branch information
gabrielcocenza committed May 5, 2023
1 parent 27e946e commit e276088
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
8 changes: 2 additions & 6 deletions prometheus-openstack-exporter
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
OpenStack exporter for the prometheus monitoring system.
Expand Down Expand Up @@ -1017,10 +1017,6 @@ class SwiftAccountUsage:
return generate_latest(self.registry)


class ForkingHTTPServer(ForkingMixIn, HTTPServer): # noqa: D101
pass


# This could perhaps be cleverer, but surely not simpler.
COLLECTORS = {
"cinder": Cinder,
Expand Down Expand Up @@ -1141,7 +1137,7 @@ if __name__ == "__main__":
if data_gatherer_needed(config):
data_gatherer = DataGatherer()
data_gatherer.start()
server = ForkingHTTPServer(("", config.get("listen_port")), handler)
server = HTTPServer(("", config.get("listen_port")), handler)
server.timeout = config.get("cache_refresh_interval", 900)
while True:
sleep(0)
Expand Down
13 changes: 13 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ parts:
build-packages:
- build-essential
- liberasurecode-dev
- libncursesw5
- libtinfo5
- libpython3-stdlib
- libpython3.8-minimal
- libpython3.8-stdlib
- python3.8-minimal
- python3-distutils
- python3-minimal
- python3-pkg-resources
- python3-pip
- python3-setuptools
- python3-venv
- python3-wheel
stage-packages:
- libdb5.3
- liberasurecode-dev
Expand Down
2 changes: 1 addition & 1 deletion snap_cmd_wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Copy only if not existing
cp -pn $SNAP/etc/prometheus/prometheus-openstack-exporter.yaml.example $SNAP_DATA/prometheus-openstack-exporter.yaml
test -r $SNAP_DATA/admin.novarc && . $SNAP_DATA/admin.novarc
exec $SNAP/bin/prometheus-openstack-exporter $SNAP_DATA/prometheus-openstack-exporter.yaml
exec $SNAP/bin/python3 $SNAP/bin/prometheus-openstack-exporter $SNAP_DATA/prometheus-openstack-exporter.yaml

0 comments on commit e276088

Please sign in to comment.