Skip to content

Commit

Permalink
coreos-cloudinit: fix Equinix Metal cloudinit
Browse files Browse the repository at this point in the history
This has been raised on Slack:
```
Aug 08 19:03:33 shoot-79548-jlptk bash[1678]: 2024/08/08 19:03:33 Checking availability of "packet-metadata-service"
Aug 08 19:04:03 shoot-79548-jlptk bash[1678]: 2024/08/08 19:04:03 Checking availability of "packet-metadata-service"
Aug 08 19:04:33 shoot-79548-jlptk bash[1678]: 2024/08/08 19:04:33 Checking availability of "packet-metadata-service"
Aug 08 19:05:03 shoot-79548-jlptk bash[1678]: 2024/08/08 19:05:03 Checking availability of "packet-metadata-service"
Aug 08 19:05:33 shoot-79548-jlptk bash[1678]: 2024/08/08 19:05:33 Checking availability of "packet-metadata-service"
Aug 08 19:06:03 shoot-79548-jlptk bash[1678]: 2024/08/08 19:06:03 Checking availability of "packet-metadata-service"
Aug 08 19:06:09 shoot-79548-jlptk bash[1678]: 2024/08/08 19:06:09 No datasources available in time
Aug 08 19:06:09 shoot-79548-jlptk systemd[1]: oem-cloudinit.service: Main process exited, code=exited, status=1/FAILURE
Aug 08 19:06:09 shoot-79548-jlptk systemd[1]: oem-cloudinit.service: Failed with result 'exit-code'.
Aug 08 19:06:09 shoot-79548-jlptk systemd[1]: Failed to start oem-cloudinit.service - Run cloudinit.
```

The check for metadata endpoint availability (`curl https://metadata.packet.net/`) returns a 404 so it fails.

Signed-off-by: Mathieu Tortuyaux <[email protected]>
  • Loading branch information
tormath1 committed Aug 9, 2024
1 parent 5c7d3fe commit 3a853ce
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 39cd2a3347adc0decb361fd7b4bc7ffdb9646f14 Mon Sep 17 00:00:00 2001
From: Rick Rackow <[email protected]>
Date: Fri, 9 Aug 2024 16:54:45 +0200
Subject: [PATCH] fix(metadata/packet): adjust packet metadata url and
apiVersion for new equinix api

---
datasource/metadata/packet/metadata.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/datasource/metadata/packet/metadata.go b/datasource/metadata/packet/metadata.go
index 3f2b78c..360a3ef 100644
--- a/datasource/metadata/packet/metadata.go
+++ b/datasource/metadata/packet/metadata.go
@@ -24,8 +24,8 @@ import (
)

const (
- DefaultAddress = "https://metadata.packet.net/"
- apiVersion = ""
+ DefaultAddress = "https://metadata.platformequinix.com/"
+ apiVersion = "metadata"
userdataUrl = "userdata"
metadataPath = "metadata"
)
@@ -50,7 +50,7 @@ type NetworkData struct {
DNS []net.IP `json:"dns"`
}

-// Metadata that will be pulled from the https://metadata.packet.net/metadata only. We have the opportunity to add more later.
+// Metadata that will be pulled from the https://metadata.platformequinix.com/metadata only. We have the opportunity to add more later.
type Metadata struct {
Hostname string `json:"hostname"`
SSHKeys []string `json:"ssh_keys"`

0 comments on commit 3a853ce

Please sign in to comment.