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

Can't set static private IP #181

Open
trenta opened this issue Nov 13, 2023 · 6 comments
Open

Can't set static private IP #181

trenta opened this issue Nov 13, 2023 · 6 comments
Assignees

Comments

@trenta
Copy link

trenta commented Nov 13, 2023

This is related to https://community.theforeman.org/t/azure-vm-deployment-with-static-private-ip-not-setting-static/35589

Foreman and Proxy versions:
3.8

Foreman and Proxy plugin versions:
foreman_azure_rm - 2.2.10

I've tried everything I can think of but every vm I create the Nic is dynamic and not static. Happy to provide any further info if required.

Cheers

Trent

@trenta
Copy link
Author

trenta commented Dec 20, 2023

I've definitely had the Static Private IP box ticked. When I check the logs on the azure side I get this part which shows it's requested a Dynamic address.
"properties": { "requestbody": "{\"location\":\"redacted\",\"properties\":{\"ipConfigurations\":[{\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":

@trenta
Copy link
Author

trenta commented Dec 20, 2023

And this from the foreman logs
"interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"test-az-01", "domain_id"=>"1", "subnet_id"=>"19", "ip"=>"10.210.0.221", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"network"=>"/subscriptions/redacted/resourceGroups/Az_Infra/providers/Microsoft.Network/virtualNetworks/vnet01/subnets/webservers", "public_ip"=>"None", "private_ip"=>""}}},
I'm leaving the ip in because it doesn't disclose anything but it looks like this module isn't passing the ip to the network call.

@trenta
Copy link
Author

trenta commented Dec 20, 2023

So private_ip should be true or false rather than an empty string right?

@chris1984
Copy link
Member

You are right it should be a Boolean value instead of a string or empty string in this case. @stejskalleos do you want to add this to your radar to fix or want me to add it to our team sprint?

@chris1984 chris1984 self-assigned this Dec 20, 2023
@stejskalleos
Copy link
Contributor

@chris1984 feel free to proceed on your own

@chris1984
Copy link
Member

I am back to work now, will get this added to this sprint and start working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants