-
Notifications
You must be signed in to change notification settings - Fork 71
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
Print cloud-init logs when a deployment fails #1060
Comments
You mean that we have colored output? |
hahaha nono These files can give as very useful information about the deployment failure. (I will not oppose to colors in any case 😆 ) |
See an example of the information they provide:
|
@srbarrios we don't control the log from the sumaform side. That would need changes to the terraform libvirt provider. |
@rjmateus it's true we do not control it, still we could just echo it from salt script (if ever we get to that stage) |
@moio Good point. Do you think we should echo that always, and should by the first state to apply (since cloud-init runs at start-up)? |
Please try and take a look, if you find it too verbose it could be behind a flag. |
I'm not sure this is possible at libvirt provider side: it has no idea whether cloud-init is used or not. Even with the assumption that cloud-init is used, the provider would need access inside the VM to check for the logs. And we are precisely in a situation where it is impossible to access inside the VM, be it via the network or via qemu-agent... |
@rjmateus Can we print cloud-init logs when a deployment fails in that way?
Maybe we must contribute in the libvirt provider for it? Somewhere here?
https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/libvirt/resource_libvirt_domain.go
https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/libvirt/resource_libvirt_cloud_init.go
https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/libvirt/cloudinit_def.go
The idea is to append it to this error message:
The text was updated successfully, but these errors were encountered: