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

Openstack COS: Issue metrics even if runner creation fails #297

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

cbartz
Copy link
Collaborator

@cbartz cbartz commented Jun 10, 2024

Applicable spec: n/a

Overview

  1. Output runner/reconciliation metrics even if runner creation fails
  2. Increase server timeout to 5 minutes.
  3. Also refactor the big reconcile method a bit.

Rationale

  1. Otherwise there is no observability
  2. 2 minutes may be too short
  3. method was too complex (linter also complained)

Juju Events Changes

n/a

Module Changes

openstack_cloud.openstack_manager.OpenstackRunnerManager.reconcile has been refactored

Library Changes

Checklist

@cbartz cbartz added bug Something isn't working trivial labels Jun 10, 2024
@cbartz cbartz requested a review from a team as a code owner June 10, 2024 07:44
@@ -794,7 +796,7 @@ def _create_runner(args: _CreateRunnerArgs) -> None:
security_groups=[SECURITY_GROUP_NAME],
userdata=cloud_userdata_str,
auto_ip=False,
timeout=120,
timeout=CREATE_SERVER_TIMEOUT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: when it fails by timeout, the server creation is aborted? Or could it fail by timeout but the server is still being created and at some point, is done and ready?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will not be cancelled, this is also the reason why we have a cleanup mechanism in those cases, but perhaps @yhaliaw can confirm.

@cbartz cbartz merged commit 2e06c5f into feat/openstack-integration Jun 11, 2024
3 of 9 checks passed
@cbartz cbartz deleted the fix/issue-reconcile-on-error branch June 11, 2024 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants