Skip to content

Conversation

sjpb
Copy link
Collaborator

@sjpb sjpb commented Jan 21, 2025

When a compute group has compute_init_enable set/non-empty:

  • Using the ansible variable image_id templated out using the compute group tf var of the same name, into the TF-templated ansible inventory for that compute group.

    • This means that ansible will have image_id for each compute node, and the compute_init:export.yml task will write that out into the /exports/cluster/hostvars.
  • Add a lifecycle block to the openstack_compute_instance_v2 resource so that subsequent changes to the tf cluster_image variable for that compute group don’t actually result in a change via tf plan/apply. This is done with the meta-argument "ignore_changes"

    • In practice this isn't possible due to meta-arguments (e.g. lifecycle and its contents) only taking static values, so duplication of the openstack_compute_instance_v2 is necessary with some gated condition on which is used.

@sjpb sjpb requested a review from a team as a code owner January 21, 2025 13:47
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

@bertiethorpe bertiethorpe marked this pull request as draft January 22, 2025 09:19
@sjpb
Copy link
Collaborator Author

sjpb commented Jan 23, 2025

Only done to demo a workaround.

@sjpb sjpb closed this Jan 23, 2025
@bertiethorpe bertiethorpe deleted the experiment/tf-image-ignore branch September 10, 2025 14:29
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.

2 participants