Closed ephracis closed 4 years ago
Thanks for the report!
Could you do me a favor and post the output of ansible-playbook --diff --check 728.yml
in your environment?
TASK [foreman : Create subnets] ************************************************
Thursday 12 March 2020 16:37:21 +0100 (0:00:00.033) 0:00:11.945 ********
--- before
+++ after
@@ -4,6 +4,7 @@
"boot_mode": "DHCP",
"cidr": 24,
"dhcp_id": 1,
+ "discovery_id": 1,
"domain_ids": [
1
],
changed: [localhost] => (item=Production)
Cool, thanks! So that means discovery has a similar bug as REX (which we fixed in #428).
Can't repro on a 1.22/3.12 setup, will try on 1.24/3.14 in a moment.
nope, same. so it's not only the discovery proxy.
and also not reproducible with the whole playbook you posted. super weird.
just checking, the discovery version you're running is tfm-rubygem-foreman_discovery-16.0.1?
could you provide us the raw output of curl -k -u admin:YOURPASSWORD https://10.110.0.219/api/subnets/SUBNET_ID
Oh, and does it also happen when you erase ~/.cache/apypie/
on the system your Ansible runs on? It might have a badly cached apidoc, even tho 0.2.1 should work fine in that regard.
Or is there no discovery plugin installed?
Nope, not installed. Is it a requirement for the subnet module?
No, but then setting discovery_proxy: "{{ item.discovery_proxy }}
seems odd? And that breaks it as it tries to set it every run, but as it's not installed, it's not mentioned in the api documentation and then the module tries to submit an empty request leading to that error.
Oh, right! That was a copy and paste from another environment. I guess I never thought of removing that line.
Well then I guess I can solve this problem on my end. Thanks for all the help!
I actually think the module should have caught that and have an idea how, so reopened
SUMMARY
I am still seeing #428 on 071e59c1cc8a52574a9ab45d675b2bbd486e67c6.
ISSUE TYPE
ANSIBLE VERSION
KATELLO/FOREMAN VERSION
APYPIE VERSION
STEPS TO REPRODUCE
Run the task
foreman_subnet
twice. First time is fine but second time, and every retry gives the same error.Task file inside role:
Variable used during tests:
EXPECTED RESULTS
A successful run first time, every time.
ACTUAL RESULTS
Here's the output with
-vvvv
: