From 28d0e25bbc14f16d88379338ae13e4a8b9172978 Mon Sep 17 00:00:00 2001 From: Tom Kretschmann Date: Wed, 20 Nov 2024 11:59:40 +0100 Subject: [PATCH] ensure curl connection timeout of 5 seconds --- providers/os/id/azcompute/azcompute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/os/id/azcompute/azcompute.go b/providers/os/id/azcompute/azcompute.go index 890447a626..c7fff619ae 100644 --- a/providers/os/id/azcompute/azcompute.go +++ b/providers/os/id/azcompute/azcompute.go @@ -57,7 +57,7 @@ func (m *commandInstanceMetadata) Identify() (Identity, error) { var instanceDocument string switch { case m.platform.IsFamily(inventory.FAMILY_UNIX): - cmd, err := m.conn.RunCommand("curl --retry 5 --retry-delay 1 --max-time 5 --noproxy '*' -H Metadata:true " + identityUrl) + cmd, err := m.conn.RunCommand("curl --retry 5 --retry-delay 1 --connect-timeout 1 --retry-max-time 5 --max-time 10 --noproxy '*' -H Metadata:true " + identityUrl) if err != nil { return Identity{}, err }