Closed AndrewSav closed 1 month ago
In #431 the following was added:
Adds support for http_interface
and http_bind_interface
from the SDK.
- The options
http_bind_address
andhttp_interface
are mutually exclusive, per the SDK.- Both
http_bind_address
andhttp_interface
have higher priority thanhttp_ip
.- The
http_bind_address
is matched against the IP addresses of the host's network interfaces. If no match is found, the plugin will terminate.- Similarly,
http_interface
is compared with the host's network interfaces. If there's no corresponding network interface, the plugin will also terminate.- If neither
http_bind_address
,http_interface
, andhttp_ip
are provided, the plugin will automatically find and use the IP address of the first non-loopback interface forhttp_ip
.- If
http_ip
is provided and the IP address does not exist on any interface, the build will exit.
For now, use v1.3.0 and I'll take a look at resolving this for v1.4.1 or a subsequent patch release whilst I have availability. Essentially, the error handling may simply need to log this as a warning instead of an error and exit.
Ryan
Thank you, it's working again!
Reposting from https://discuss.hashicorp.com/t/1-4-0-breaks-my-workflow/70407since no answer.
Overview of the Issue
There were changes in 1.4.0 that introduced http_interface and http_bind_address. I’m running packer in a container and using vsphere_iso. I use http_ip so that vSphere can talk back to packer. This IP is not available inside the container and is not the bind IP. It’s the IP of the VM the container is running on. This was working before, on 1.3.0
In 1.4.0 I’m getting:
I do not want packer to use this address for binding, so the fact that it is not assigned to an interface is irrelevant. How do I fix my configuration to work with 1.4.0 as it used with 1.3.0?
Reproduction Steps
Run packer inside a container. Use
http_ip
setting and provide the IP of the host.Packer Version
1.11.2
Plugin Version and Builders
1.4.0
Please select the builder.
vsphere-iso
VMware vSphere Version
7.0.3.01900
Guest Operating System
Simplified Packer Buildfile
N/A - all builds using http_ip are failing
Operating System and Environment Details
Run inside a container produced with this Dockerfile:
Log Fragments and
crash.log
FilesIt is difficult to get this log from the environment, and it appears that the cause of the issue is the recent changes. Let me know if you still want me to try and get the logs.