Skip to content

Commit

Permalink
fix: http_ip warn vs err
Browse files Browse the repository at this point in the history
Updates `ValidateHTTPAddress` to simply log a warning if the `http_ip` is not bound to an interface instead of error.

Ref: #474

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam committed Oct 9, 2024
1 parent 5e944bc commit 3fae513
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builder/vsphere/common/http_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package common

import (
"fmt"
"log"
"net"
)

Expand All @@ -24,7 +25,7 @@ func ValidateHTTPAddress(httpAddress string) error {
return fmt.Errorf("invalid IP address format: %s", httpAddress)
}
if !IsIPInInterfaces(httpAddress) {
return fmt.Errorf("%s is not assigned to an interface", httpAddress)
log.Printf("[WARN] %s is not assigned to an interface", httpAddress)
}
return nil
}
Expand Down

0 comments on commit 3fae513

Please sign in to comment.