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

resource_unavailable error on packer build #198

Closed
kranurag7 opened this issue Jun 14, 2024 · 5 comments
Closed

resource_unavailable error on packer build #198

kranurag7 opened this issue Jun 14, 2024 · 5 comments
Labels

Comments

@kranurag7
Copy link

Overview of the Issue

This is happening since yesterday i think, I'm getting this very frequently and sometimes when I invoke back to back I get the same message.

==> hcloud: Validating server types: cx41
==> hcloud: Validating snapshot name: packer-1718362350
==> hcloud: Creating temporary RSA SSH key for instance...
==> hcloud: Uploading temporary SSH key for instance...
==> hcloud: Creating server...
==> hcloud: Could not create server: error during placement (resource_unavailable, 6c4be35cf2e8ed9d)
==> hcloud: Deleting temporary SSH key...
Build 'hcloud' errored after 2 seconds 706 milliseconds: Could not create server: error during placement (resource_unavailable, 6c4be35cf2e8ed9d)

==> Wait completed after 2 seconds 706 milliseconds

==> Some builds didn't complete successfully and had errors:
--> hcloud: Could not create server: error during placement (resource_unavailable, 6c4be35cf2e8ed9d)

==> Builds finished but no artifacts were created.

sometimes this seems to go away after a while but I invoke packer build almost say more than 30 times in less than a hour in different projects using terminal multiplexer to do things. This all is wrapped around a make target.
It would be really helpful to me if we have more information than resource_unavailable here. What does it mean? I'm not able to understand the error message as well in this case.

Reproduction Steps

packer build against a packer config. (packer version is 1.9.5 MPL licensed)

Plugin and Packer version

packer version: v1.9.5
packer plugin hcloud version: 1.4.0

Simplified Packer Buildfile

If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format

instead of posting it directly in the issue.

Operating system and Environment details

OS, Architecture, and any other information you can provide about the
environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

@kranurag7 kranurag7 added the bug label Jun 14, 2024
@janiskemper
Copy link
Contributor

@apricote do you have an idea here? this is making things very hard for us right now

@jooola
Copy link
Member

jooola commented Jun 14, 2024

This might be related to the fact that the server type you are requesting is currently unavailable in the location you configured. Some locations (fsn1) are currently experiencing some resources shortages.

Please try a different location.

@kranurag7
Copy link
Author

This might be related to the fact that the server type you are requesting is currently unavailable in the location you configured. Some locations (fsn1) are currently experiencing some resources shortages.

Yes that worked.
we switched the server type from cx41 to cx42 and in terms of region we switched from fsn1 to nbg1

but I think the main problem here is following:

As per the PR here syself/cluster-api-provider-hetzner#1330 and probably the blog as well, the old servers cx21-41 were supposed to be removed on 6th September 2024 but this was removed early.

The dashboard doesn't show the types anymore.

Screenshot few days back:

image

in this image, it is shown the cx41 will be deprecated (I don't recall the date)

screenshot today

image

it was removed today without any notice. I don't know if this will come back later or not but for now it's removed looking at the console.

For now, given we have made the switch to cx42 and nbg1 for region and it's working now.

@apricote
Copy link
Member

The server types are still available through the API, and will continue to be available until the announced date. The error you got today is about limited availability of the specific server type in the location you chose, this can happen at any time depending on demand and availability of additional hardware to service that demand.

As our main focus is to be a "simple cloud" we have removed the server type from the Console, to keep the offering simple for our users. Its still available through the API to avoid breaking any automation:

➜ hcloud server-type list -o columns=id,name | grep cx | grep -v ccx
1     cx11
3     cx21
5     cx31
7     cx41
9     cx51
104   cx22
105   cx32
106   cx42
107   cx52

(I noticed that there is no way to show the deprecation info in the server-type list command: hetznercloud/cli#780)

And if you describe the image you can see the announcement & removal dates:

➜ hcloud server-type describe cx41
ID:			7
Name:			cx41
Description:		CX41
Cores:			4
CPU Type:		shared
Architecture:		x86
Memory:			16.0 GB
Disk:			160 GB
Storage Type:		local
Included Traffic:	20 TB
Deprecation:
  Announced:		Thu Jun  6 10:00:00 CEST 2024 (1 week ago)
  Unavailable After:	Fri Sep  6 02:00:00 CEST 2024 (2 months from now)
Pricings per Location:
  - Location:	fsn1:
    Hourly:	€ 0.0330820000000000
    Monthly:	€ 20.1110000000000000
  - Location:	nbg1:
    Hourly:	€ 0.0330820000000000
    Monthly:	€ 20.1110000000000000
  - Location:	hel1:
    Hourly:	€ 0.0330820000000000
    Monthly:	€ 20.1110000000000000

@jooola
Copy link
Member

jooola commented Jun 14, 2024

Closing, as unrelated to packer, feel free to continue the discussion if needed.

@jooola jooola closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants