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

Error in comparison/serialize #301

Closed
hvanderheide opened this issue Mar 14, 2024 · 4 comments · May be fixed by #302
Closed

Error in comparison/serialize #301

hvanderheide opened this issue Mar 14, 2024 · 4 comments · May be fixed by #302

Comments

@hvanderheide
Copy link

There is an error in the serialize logic when running a task in diff mode, introduced in 4477112

The full traceback is:
Traceback (most recent call last):
File "", line 107, in
File "", line 99, in ansiballz_main
File "", line 47, in invoke_module
File "", line 226, in run_module
File "", line 98, in run_module_code
File "", line 88, in run_code
File "/var/folders/k
/5ttlkcg17zv48nxy_288yc_c0000gp/T/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload_svvknff2/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_vpn_ipsec_phase1_interface.py", line 2581, in
File "/var/folders/k
/5ttlkcg17zv48nxy_288yc_c0000gp/T/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload_svvknff2/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_vpn_ipsec_phase1_interface.py", line 2547, in main
File "/var/folders/k
/5ttlkcg17zv48nxy_288yc_c0000gp/T/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload_svvknff2/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_vpn_ipsec_phase1_interface.py", line 1755, in fortios_vpn_ipsec
File "/var/folders/k_/5ttlkcg17zv48nxy_288yc_c0000gp/T/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload_svvknff2/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_vpn_ipsec_phase1_interface.py", line 1692, in vpn_ipsec_phase1_interface
File "/var/folders/k_/5ttlkcg17zv48nxy_288yc_c0000gp/T/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload_svvknff2/ansible_fortinet.fortios.fortios_vpn_ipsec_phase1_interface_payload.zip/ansible_collections/fortinet/fortios/plugins/module_utils/fortios/comparison.py", line 124, in serialize
KeyError: 0

@Alabate
Copy link

Alabate commented Mar 18, 2024

Same issue for a simple

- fortinet.fortios.fortios_system_admin:
    vdom: "{{ fortigate_vdom }}"
    state: present
    system_admin:
      name: "{{ fortigate_admin_username}}"
      accprofile: super_admin

In check mode we get the same error.

We don't have the issue on version 2.3.4, so we rolled back the collection to this version for now.

@JieX19
Copy link

JieX19 commented Mar 19, 2024

Hi @hvanderheide,

Thank you so much for bringing up the issue and dedicating time to debugging! We have a policy that prohibits merging code from external sources, so I will fix and test it from our side. Thank you again for your time!

Jie

@hvanderheide
Copy link
Author

Hi @JieX19, that doesn't seem like a very productive policy, but I guess that's up to you. How do you propose we provide you with patches? I have a number of other small fixes to the check/diff logic, so it would help if this is documented somewhere.

@JieX19
Copy link

JieX19 commented Apr 4, 2024

Hi @hvanderhei

Thank you very much for your feedback. I apologize for any inconvenience caused. If you have patches or fixes to contribute, you can provide them as you did for the last pull request, and I'll do my best to assist you with reviewing and integrating the changes. If you have multiple fixes, providing them one by one would be helpful for clarity and organization. Additionally, you can specify any particular areas or files where the fixes apply to ensure accurate integration. Let me know how you'd like to proceed, and I'll be glad to assist you further.

Thanks,
Jie

@JieX19 JieX19 closed this as completed Aug 20, 2024
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

Successfully merging a pull request may close this issue.

3 participants