Skip to content

Commit 506602d

Browse files
authored
fix: increase default timeout to 20 minutes (#126)
Also updates Ubuntu template versions from 20.04 to 24.04 in tests and examples.
1 parent fdb2a09 commit 506602d

File tree

11 files changed

+21
-16
lines changed

11 files changed

+21
-16
lines changed

.web-docs/components/builder/upcloud/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The upcloud builder is used to generate storage templates on UpCloud.
3838

3939
- `storage_name` (string) - The name of the storage that will be used to find the first matching storage in the list of existing templates.
4040

41-
Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 20.04").
41+
Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 24.04").
4242

4343
- `template_prefix` (string) - The prefix to use for the generated template title. Defaults to `custom-image`.
4444
You can use this option to easily differentiate between different templates.
@@ -55,7 +55,7 @@ The upcloud builder is used to generate storage templates on UpCloud.
5555
- `storage_tier` (string) - The storage tier to use. Available options are `maxiops`, `archive`, and `standard`. Defaults to `maxiops`.
5656
For most production workloads, MaxIOPS is recommended for best performance.
5757

58-
- `state_timeout_duration` (duration string | ex: "1h5m2s") - The amount of time to wait for resource state changes. Defaults to `5m`.
58+
- `state_timeout_duration` (duration string | ex: "1h5m2s") - The amount of time to wait for resource state changes. Defaults to `20m`.
5959

6060
- `boot_wait` (duration string | ex: "1h5m2s") - The amount of time to wait after booting the server. Defaults to '0s'
6161

@@ -141,7 +141,7 @@ source "upcloud" "test" {
141141
username = "${var.username}"
142142
password = "${var.password}"
143143
zone = "nl-ams1"
144-
storage_name = "ubuntu server 20.04"
144+
storage_name = "ubuntu server 24.04"
145145
template_prefix = "ubuntu-server"
146146
# uncomment to use standard tier storage
147147
# storage_tier = "standard
@@ -201,7 +201,7 @@ source "upcloud" "test" {
201201
username = "${var.username}"
202202
password = "${var.password}"
203203
zone = "nl-ams1"
204-
storage_name = "ubuntu server 20.04"
204+
storage_name = "ubuntu server 24.04"
205205
template_prefix = "ubuntu-server"
206206
207207
network_interfaces {

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
### Changed
9+
10+
- Increase default timeout to `20m`.
11+
812
## [1.9.1] - 2025-08-29
913

1014
### Fixed

builder/upcloud/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
DefaultSSHUsername = "root"
2727
DefaultCommunicator = "ssh"
2828
DefaultStorageSize = 25
29-
DefaultTimeout = 5 * time.Minute
29+
DefaultTimeout = 20 * time.Minute
3030
DefaultStorageTier = upcloud.StorageTierMaxIOPS
3131
InterfaceTypePublic InterfaceType = upcloud.IPAddressAccessPublic
3232
InterfaceTypeUtility InterfaceType = upcloud.IPAddressAccessUtility
@@ -81,7 +81,7 @@ type Config struct {
8181

8282
// The name of the storage that will be used to find the first matching storage in the list of existing templates.
8383
//
84-
// Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 20.04").
84+
// Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 24.04").
8585
StorageName string `mapstructure:"storage_name"`
8686

8787
// The prefix to use for the generated template title. Defaults to `custom-image`.
@@ -103,7 +103,7 @@ type Config struct {
103103
// For most production workloads, MaxIOPS is recommended for best performance.
104104
StorageTier string `mapstructure:"storage_tier"`
105105

106-
// The amount of time to wait for resource state changes. Defaults to `5m`.
106+
// The amount of time to wait for resource state changes. Defaults to `20m`.
107107
Timeout time.Duration `mapstructure:"state_timeout_duration"`
108108

109109
// The amount of time to wait after booting the server. Defaults to '0s'

builder/upcloud/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,14 @@ func TestConfig_StorageName(t *testing.T) {
372372
"username": "testuser",
373373
"password": "testpass",
374374
"zone": "fi-hel1",
375-
"storage_name": "Ubuntu Server 20.04",
375+
"storage_name": "Ubuntu Server 24.04",
376376
},
377377
}
378378

379379
warns, err := c.Prepare(raws...)
380380
assert.NoError(t, err)
381381
assert.Empty(t, warns)
382-
assert.Equal(t, "Ubuntu Server 20.04", c.StorageName)
382+
assert.Equal(t, "Ubuntu Server 24.04", c.StorageName)
383383
assert.Empty(t, c.StorageUUID)
384384
}
385385

builder/upcloud/test-fixtures/hcl2/storage-name.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
source "upcloud" "storage-name" {
33
ssh_username = "root"
4-
storage_name = "ubuntu server 20.04"
4+
storage_name = "ubuntu server 24.04"
55
storage_size = "20"
66
template_prefix = "test-builder"
77
zone = "pl-waw1"

builder/upcloud/test-fixtures/json/networking.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"builders": [{
33
"type": "upcloud",
44
"zone": "nl-ams1",
5-
"storage_name": "ubuntu server 20.04",
5+
"storage_name": "ubuntu server 24.04",
66
"ssh_username": "root",
77
"template_prefix": "test-builder",
88
"storage_size": "20",

builder/upcloud/test-fixtures/json/storage-name.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"builders": [{
33
"type": "upcloud",
44
"zone": "nl-ams1",
5-
"storage_name": "ubuntu server 20.04",
5+
"storage_name": "ubuntu server 24.04",
66
"ssh_username": "root",
77
"template_prefix": "test-builder",
88
"storage_size": "20"

docs-partials/builder/upcloud/Config-not-required.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
- `storage_name` (string) - The name of the storage that will be used to find the first matching storage in the list of existing templates.
1010

11-
Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 20.04").
11+
Note that `storage_uuid` parameter has higher priority. You should use either `storage_uuid` or `storage_name` for not strict matching (e.g "ubuntu server 24.04").
1212

1313
- `template_prefix` (string) - The prefix to use for the generated template title. Defaults to `custom-image`.
1414
You can use this option to easily differentiate between different templates.
@@ -25,7 +25,7 @@
2525
- `storage_tier` (string) - The storage tier to use. Available options are `maxiops`, `archive`, and `standard`. Defaults to `maxiops`.
2626
For most production workloads, MaxIOPS is recommended for best performance.
2727

28-
- `state_timeout_duration` (duration string | ex: "1h5m2s") - The amount of time to wait for resource state changes. Defaults to `5m`.
28+
- `state_timeout_duration` (duration string | ex: "1h5m2s") - The amount of time to wait for resource state changes. Defaults to `20m`.
2929

3030
- `boot_wait` (duration string | ex: "1h5m2s") - The amount of time to wait after booting the server. Defaults to '0s'
3131

docs-partials/config/builder/upcloud/interfaces.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ source "upcloud" "test" {
3030
username = "${var.username}"
3131
password = "${var.password}"
3232
zone = "nl-ams1"
33-
storage_name = "ubuntu server 20.04"
33+
storage_name = "ubuntu server 24.04"
3434
template_prefix = "ubuntu-server"
3535

3636
network_interfaces {

example/build.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ source "upcloud" "test" {
3030
username = "${var.username}"
3131
password = "${var.password}"
3232
zone = "nl-ams1"
33-
storage_name = "ubuntu server 20.04"
33+
storage_name = "ubuntu server 24.04"
3434
template_prefix = "ubuntu-server"
3535
# uncomment to use standard tier storage
3636
# storage_tier = "standard

0 commit comments

Comments
 (0)