Skip to content

Commit

Permalink
increase create server timeout to 5 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Jun 10, 2024
1 parent 7709bef commit bc4b89b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
23 changes: 12 additions & 11 deletions src-docs/openstack_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Module for handling interactions with OpenStack.
- **SECURITY_GROUP_NAME**
- **BUILD_OPENSTACK_IMAGE_SCRIPT_FILENAME**
- **MAX_METRICS_FILE_SIZE**
- **CREATE_SERVER_TIMEOUT**

---

<a href="../src/openstack_cloud/openstack_manager.py#L345"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L347"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `build_image`

Expand Down Expand Up @@ -56,7 +57,7 @@ Build and upload an image to OpenStack.

---

<a href="../src/openstack_cloud/openstack_manager.py#L404"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L406"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `create_instance_config`

Expand Down Expand Up @@ -92,7 +93,7 @@ Create an instance config from charm data.

---

<a href="../src/openstack_cloud/openstack_manager.py#L118"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L120"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `InstanceConfig`
The configuration values for creating a single runner instance.
Expand Down Expand Up @@ -131,7 +132,7 @@ __init__(

---

<a href="../src/openstack_cloud/openstack_manager.py#L193"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L195"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ProxyStringValues`
Wrapper class to proxy values to string.
Expand All @@ -150,7 +151,7 @@ Wrapper class to proxy values to string.

---

<a href="../src/openstack_cloud/openstack_manager.py#L301"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L303"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `OpenstackUpdateImageError`
Represents an error while updating image on Openstack.
Expand All @@ -161,7 +162,7 @@ Represents an error while updating image on Openstack.

---

<a href="../src/openstack_cloud/openstack_manager.py#L498"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L500"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `GithubRunnerRemoveError`
Represents an error removing registered runner from Github.
Expand All @@ -172,7 +173,7 @@ Represents an error removing registered runner from Github.

---

<a href="../src/openstack_cloud/openstack_manager.py#L506"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L508"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `OpenstackRunnerManager`
Runner manager for OpenStack-based instances.
Expand All @@ -185,7 +186,7 @@ Runner manager for OpenStack-based instances.
- <b>`unit_num`</b>: The juju unit number.
- <b>`instance_name`</b>: Prefix of the name for the set of runners.

<a href="../src/openstack_cloud/openstack_manager.py#L515"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L517"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `__init__`

Expand Down Expand Up @@ -214,7 +215,7 @@ Construct OpenstackRunnerManager object.

---

<a href="../src/openstack_cloud/openstack_manager.py#L1386"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L1388"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `flush`

Expand All @@ -231,7 +232,7 @@ Flush Openstack servers.

---

<a href="../src/openstack_cloud/openstack_manager.py#L874"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L876"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `get_github_runner_info`

Expand All @@ -248,7 +249,7 @@ Get information on GitHub for the runners.

---

<a href="../src/openstack_cloud/openstack_manager.py#L1216"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/openstack_cloud/openstack_manager.py#L1218"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `reconcile`

Expand Down
4 changes: 3 additions & 1 deletion src/openstack_cloud/openstack_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
PRE_JOB_SCRIPT = RUNNER_APPLICATION / "pre-job.sh"
MAX_METRICS_FILE_SIZE = 1024

CREATE_SERVER_TIMEOUT = 5 * 60


class _PullFileError(Exception):
"""Represents an error while pulling a file from the runner instance."""
Expand Down Expand Up @@ -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,
wait=True,
)
except openstack.exceptions.ResourceTimeout as err:
Expand Down

0 comments on commit bc4b89b

Please sign in to comment.