Open ArtsiomMusin opened 1 year ago
@ArtsiomMusin Can you please clarify this?
Tower 3.8.6, AAP 4.2.1
What is the involvement of 3.8.6 in all of this? Version 4.2.1 is a version of Controller, which is the project formerly known as Tower. The associated version of AAP for Controller 4.2.1 would be 2.2 something.
yes, I just realized Tower is not related here. We just have Tower and AAP deployed on the same env. Anyway, we can ignore Tower.
For AAP, I took the version from here. Not very familiar 4.2.1 is the version of controller or AAP itself. Sorry for inaccuracy. :sweat_smile:
Hello, i've the exact same problem, i can't import inventory sources that are scheduled on my new AWX instance (21.10.2).
I've tried the API and the awx.awx.import module, i'm always having : Bad Request (400) received - {'inventory': ['Field is not allowed on launch.']}
.
Am i doing something wrong or is this a bug ?
@maximerobine I'm pretty sure it is a bug, having to do with the recent expansion in "prompt on launch" capabilities.
I'd love to fix that as this is one missing thing for us during export/import activities. If someone can guide me to the right path to fix that, I will contribute here.
Here just some findings from my side so far. I saw this issue before and I tried to add a small fix(just a kind of hack) some time ago for awxkit: Basically just to skip that "prompt on launch" field from a schedule object during export. So on import schedule would be added correctly. It's not very good but worked well...
Also I haven't noticed why this field is required for schedules at all. Is this a part of some new upcoming feature? Wondering if it was added for schedules by a mistake or no longer needed... Can we maybe remove this field from the schedule table? @AlanCoding could you help here to answer as I saw in git history you are the author of those changes?
@ArtsiomMusin we have a dev already assigned to this. This bug comes up in more contexts than just import/export.
Great! Will wait for a fix then. Thanks
Hello, is there any news on this ? I've encountered a new problem that looks related to this issue.
When I import a job_template (freshly exported from another AWX), I get the following error : Bad Request (400) received - {'inventory': ['Must either set a default value or ask to prompt on launch.']}.
But when i look in the json of the job template, there clearly is an inventory defined :
...
"inventory": {
"name": "localhost",
"organization": {
"name": "Default",
"type": "organization"
},
"type": "inventory"
},
...
Both AWX are in the same version (22.0.0) and using awx.awx collection version 22.0.0
About my last message, the user i was using to import jobs didnt have sufficient permissions on my localhost inventory. Thus, it is not related at all to this issue, sorry for the inconvenience.
Please confirm the following
Bug Summary
This is related to export/import PR I opened here #13090
As discussed with @jbradberry in this comment(https://github.com/ansible/awx/pull/13132#issuecomment-1297150532), it might be a real bug related to the launch option or something. This is mainly affecting export/import functionality for awx cli.
AWX version
Tower 3.8.6, AAP 4.2.1
Select the relevant components
Installation method
openshift
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
No response
Steps to reproduce
Two scenarios where this issue occurs
Steps to reproduce via API:
Result:
Steps to reproduce via awx cli:
Result: Failed with this error:
Expected results
Import for schedules created for inventory sources/job templates is working fine
Actual results
Above in the steps to reproduce
Additional information
No response