Skip to content

Support fixed IP addresses for nodes #643

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

Merged
merged 10 commits into from
Jun 13, 2025
Merged

Support fixed IP addresses for nodes #643

merged 10 commits into from
Jun 13, 2025

Conversation

priteau
Copy link
Member

@priteau priteau commented Apr 4, 2025

Add support for optional fixed IP addresses via opentofu variable control_ip_addresses and parameter ip_addresses for compute and login node groups.

Example:

cluster_networks = [
    {
        network = "foo"
        subnet = "bar"
    }
]
control_ip_addresses = {
   foo = "192.168.0.10"
}
login = {
    interactive = {
        nodes = ["login-0"]
        ...
        ip_addresses = {
            foo = ["192.168.0.20"]
        }
compute = {
    standard = {
        nodes = ["standard-0", "standard-1"]
        ...
        ip_addresses = {
            foo = ["192.168.0.30", "192.168.0.31"]
        }
}

Closes #642.

@priteau priteau self-assigned this Apr 4, 2025
@priteau priteau requested a review from a team as a code owner April 4, 2025 08:43
@sjpb sjpb force-pushed the control-ip-addresses branch from b3f0147 to bf7eb74 Compare May 29, 2025 14:22
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this isn't right - logic should be that iff the network key isn't in the map, we default to null, rather than the condition being that the map is empty. So its probably a lookup not a ternary.

priteau and others added 6 commits June 6, 2025 10:35
@sjpb sjpb force-pushed the control-ip-addresses branch from 427e2c1 to 9b5ed88 Compare June 6, 2025 10:35
m-bull
m-bull previously requested changes Jun 6, 2025
@sjpb sjpb requested review from m-bull and sjpb June 11, 2025 08:42
sjpb
sjpb previously approved these changes Jun 11, 2025
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sjpb sjpb changed the title Support fixed IP addresses for control node Support fixed IP addresses for nodes Jun 11, 2025
@sjpb
Copy link
Collaborator

sjpb commented Jun 13, 2025

Tested on smslabs. Works. Correct IPs set in metadata on all nodes. site playbook running ok.

@bertiethorpe bertiethorpe self-requested a review June 13, 2025 12:55
Copy link
Member

@bertiethorpe bertiethorpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@m-bull m-bull dismissed their stale review June 13, 2025 14:27

Stale

@sjpb sjpb merged commit 87bfefc into main Jun 13, 2025
2 checks passed
@sjpb sjpb deleted the control-ip-addresses branch June 13, 2025 14:30
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

Successfully merging this pull request may close these issues.

Production variable control_ip_address is not implemented
4 participants