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

oci_compute_instance source_details.boot_volume_size_in_gbs break idempotency #295

Open
LCerebo opened this issue Nov 13, 2024 · 0 comments

Comments

@LCerebo
Copy link

LCerebo commented Nov 13, 2024

Issue Report

If I specify the parameter source_details.boot_volume_size_in_gbs in oracle.oci.oci_compute_instance and run the task twice, the second time it breaks the idempotency giving a 500 Internal server error trying to update the resource.

"2024-11-13,11:58:26 DEBUG oci_log_utils.py:84 reply: 'HTTP/1.1 500 Internal Server Error\\r\\n'",

In the ansible debug log, launched with -vvvvvv I see the following lines:

"2024-11-13,11:58:26 DEBUG oci_common_utils.py:352 dict is not subset because attribute 'boot_volume_size_in_gbs' value in source does not match target",
"2024-11-13,11:58:26 DEBUG oci_resource_utils.py:936 is update necessary for instance: True",

Expected behavior

The expected behavior is to do nothing since no parameters are changed.

Environment

  • OS version: ubuntu 22.04 on wsl2

  • Ansible version:
    ansible [core 2.17.5]
    python version = 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (/usr/bin/python3)
    jinja version = 3.1.4
    libyaml = True

  • OCI Python SDK version: 2.137.0

  • OCI Ansible Modules version: oracle.oci 5.3.0

Ansible playbook to reproduce the issue

---
#debug.yml
- name: Debug test
  hosts: localhost
  collections:
    - oracle.oci
  environment:
    OCI_USE_NAME_AS_IDENTIFIER: true
  tasks:
    - name: create compute instance
      oracle.oci.oci_compute_instance:
        availability_domain: "CDcn:EU-MILAN-1-AD-1"
        compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
        create_vnic_details:
          private_ip: "10.0.0.4"
          subnet_id: "ocid1.subnet.oc1..xxxxxxEXAMPLExxxxxx
        display_name: "test"
        shape: "VM.Standard.E4.Flex"
        shape_config:
          memory_in_gbs: 32
          ocpus: 4
        source_details:
          boot_volume_size_in_gbs: 100
          boot_volume_vpus_per_gb: 10
          image_id: "ocid1.image.oc1.eu-milan-1.aaaaaaaal7eqmrskc7nmrg6i65va26lxqnz3pzz3fkqqwpsts2emrhogkigq"
          source_type: "image"
        state: "present"

Command used to execute the playbook:

ansible-playbook -vvvvvv debug.yml
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

No branches or pull requests

1 participant