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

This exporter crashes if pointed at a Teraslice custer without state indices #8

Open
godber opened this issue Jun 1, 2021 · 1 comment

Comments

@godber
Copy link
Member

godber commented Jun 1, 2021

When this exporter is bundled in a k8s pod with teraslice and that Teraslice cluster is new, there is no state cluster, this container will crash with the following error and delay the pod startup:

> @0.2.0 start /app/source
> node dist/index.js
(node:20) UnhandledPromiseRejectionWarning: Error: Added label "error" is not included in initial labelset: [
  'arch',
  'clustering_type',
  'name',
  'node_version',
  'platform',
  'teraslice_version',
  'url',
  'name'
]
    at /app/source/node_modules/prom-client/lib/validation.js:26:10
    at Array.forEach (<anonymous>)
    at validateLabel (/app/source/node_modules/prom-client/lib/validation.js:24:22)
    at /app/source/node_modules/prom-client/lib/gauge.js:211:3
    at Gauge.set (/app/source/node_modules/prom-client/lib/gauge.js:79:32)
    at Object.updateTerasliceMetrics (/app/source/dist/metrics.js:403:30)
    at main (/app/source/dist/index.js:51:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:20) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I think this is because there is no state indices on the initial teraslice pod startup. Possible fixes would be to look at this code and see if it can be fixed here, or wait to stat this container up until sometime after the teraslice container comes up.

@godber
Copy link
Member Author

godber commented Jan 4, 2024

I'm not sure if this error still exists. But it could have been fixed by this change:

#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant