This appears to be the same issue as reported in 
https://github.com/hashicorp/packer/issues/7171.  The problem is in 
GetInstancePort() and the default to return the default interface.  

I've coded up a patch https://github.com/hashicorp/packer/pull/7884

The ssh_interface doesn't look like it will work.  The code shows it 
supports these values [public|private]_[ip|dns] which aren't really in the 
direction we are looking.

On Wednesday, July 17, 2019 at 1:14:58 PM UTC-5, Rickard von Essen wrote:
>
> Did you try using the 
> https://packer.io/docs/builders/openstack.html#ssh_interface option? It 
> might solve your problem. 
>
> On Wed, Jul 17, 2019, 16:37 John-Paul Robinson <[email protected] 
> <javascript:>> wrote:
>
>> hi folks
>>
>> we are learning packer and enjoying it's utility in combo with terraform. 
>> :) 
>>
>> Running into a slight issue when trying to build an image for an instance 
>> in our local openstack that has two networks attached (one to a vlan that 
>> can have floating ips assigned and one for an internal vlan that can't). 
>> When packer goes to assign the floating ip it seems to request the instance 
>> nics and then assigns to the first one returned. When it's the "public" nic 
>> the assignment works. When its the "private" nic it fails. with the 
>> following 
>>
>> "==> openstack: Associating floating IP 
>> 'ba40e54d-535f-4dfe-93dc-f3b2f5072e11' (192.168.16.143) with instance 
>> port...
>> openstack: Error associating floating IP 
>> 'ba40e54d-535f-4dfe-93dc-f3b2f5072e11' (192.168.16.143) with instance port 
>> '4c9c4aa0-6af5-497a-a423-20d0aed0324f': Resource not found"
>>
>> his first returned behavior seems to come from GetInstancePort() in 
>> networks.go, not sure how we might be able to control this 
>> https://github.com/hashicorp/packer/blob/master/builder/openstack/networks.go#L69
>>
>> I'm looking to test a parameter that will set a preferred_net for the 
>> floating ip assignment but was wondering if there was an alternate 
>> recomeded solution.
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/c1b943dc-afe5-426f-8c5f-af92178076f7%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/c1b943dc-afe5-426f-8c5f-af92178076f7%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/28e0985f-034d-481b-a1a6-6dc5ff51985c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to