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

Enlisted machine's status is not exposed in the maas_machine data source #234

Open
vishvikkrishnan opened this issue Aug 26, 2024 · 1 comment

Comments

@vishvikkrishnan
Copy link

It's currently not possible to determine the status of machines enlisted in MAAS to base workflows on the machine status. For instance, in this open issue where it's impossible to maintain idempotency in block storage configurations for MAAS-enlisted nodes, the workaround is to manually (local-exec) remove the filesystems, partitions, and disks from each node and then start from a clean slate to apply desired storage and network configurations. However, these operations require that the machines being actioned upon are all in Ready state. If even one node is in Error/Deployed (non-Ready) state, the resources (like maas_block_device or maas_network_interface_physical) error out and subsequent resources in the plan are never applied (rightfully so).

To avoid getting into this situation, it's necessary to filter enlisted machines based on their status, which is currently not exposed in the maas_machine datasource. It would be nice to have this field exposed to avoid complicated JSON-parsing with MAAS CLI command outputs.

Copy link

This issue is stale because it has been open for 30 days with no activity.

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

2 participants