Skip to content

Commit

Permalink
add curl timeout for cloud metadata lookup on unix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtrix committed Nov 20, 2024
1 parent e0e28b9 commit 9e1b2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/os/id/azcompute/azcompute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 --noproxy '*' -H Metadata:true " + identityUrl)
cmd, err := m.conn.RunCommand("curl --max-time 1 --noproxy '*' -H Metadata:true " + identityUrl)
if err != nil {
return Identity{}, err
}
Expand Down

0 comments on commit 9e1b2eb

Please sign in to comment.