-
Notifications
You must be signed in to change notification settings - Fork 46
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
(v1.0.0) JSON error when attempting to import an existing machine. #16
Comments
Hello, I came here to report the same issue and I'm now I see that there is a ticket for this since July 2022 🙂 I'm having this same issue on 1.1.0 with Terraform 1.4.0
Interestingly, I was able to import a couple of machines with the exact same versions of the provider and TF but it looks like I am no longer able to. This can totally be because of specifics with other machines triggering this error, of course. Importing of instances appears to work. Any help to solve this would be greatly appreciated. Without the ability to import machines, any machines configured outside of TF must be rebuilt if we wanted them added to TF. Thanks for your help! |
Hi both, With this PR #92, the new version of gomaasclient is used by the provider, which includes a fix on the parsing of a couple of machine fields. I am closing this ticket but please re-open if you hit the issue again so as to eliminate any remaining erroneous field. |
Hey @skatsaounis unfortunately it appears this bug still exists. Not OP but encountering it on my own instance of MaaS.
From my own digging into this (with limited Go knowledge) I tracked it down to the gomaasclient
This properly get the JSON from the MaaS API, however when it attempts to unmarshal into a I did attempt to fix this on my own however with my limited Go experience I couldn't find a clean solution. From what I could tell, changing this return to Sorry for all this info dump. I just wanted to help out but don't have the GO knowledge to put any real changes in place ._. |
Hi @UnknownTy You were right on your investigation findings and thank you very much for your time. Indeed, the problematic power parameter is the Since this one requires changes to both |
Thanks @skatsaounis for the quick turnaround on that! Always a wonder to see someone take an idea and do it much better than I could in a language I'm still learning ;) |
I see #96 was merged into Main.
Checking Thanks again @skatsaounis! |
I'm getting this error when attempting to import a machine using Maas v3.2 and Provider v1.0.0:
The text was updated successfully, but these errors were encountered: