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

Add curl timeout for cloud metadata lookup at unix systems on Azure #4895

Merged
merged 7 commits into from
Nov 20, 2024
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)
chris-rock marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return Identity{}, err
}
Expand Down