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_loadbalancer_load_balancer not updating shape #205

Closed
romuloslv opened this issue Feb 22, 2023 · 6 comments
Closed

oci_loadbalancer_load_balancer not updating shape #205

romuloslv opened this issue Feb 22, 2023 · 6 comments

Comments

@romuloslv
Copy link

romuloslv commented Feb 22, 2023

Issue Report

Describe the issue

When trying to update an existing flexible load balancer of private type no changes are made.

Expected behavior

An update in mbps of the flexible shape of the private type on the specified load balancer.

Environment

  • OS version:

Ubuntu 20.10 5.15.49-linuxkit

  • Ansible version:

ansible 2.10.14
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 10.3.0]

  • OCI Python SDK version:

2.45.1

  • OCI Ansible Modules version:

4.13.0

Ansible playbook to reproduce the issue

PLAYBOOK

Note: The environment var OCI_USE_NAME_AS_IDENTIFIER was set with true.

- hosts: localhost
  gather_facts: no
  collections:
    - oracle.oci
  tasks:
    - name: "Update bandwidth to 500Mbps"
      oci_loadbalancer_load_balancer:
        compartment_id: "{{ compartment_id }}"
        display_name: "TEST-LB-ANSIBLE"
        is_private: yes
        state: present
        shape_name: "flexible"
        shape_details:
          minimum_bandwidth_in_mbps: 500
          maximum_bandwidth_in_mbps: 500
      register: result
    - debug:
        msg: "{{ result }}"

OUTPUT

ok: [localhost] => {
    "msg": {
        "changed": false,
        "failed": false,
        "load_balancer": {
            "backend_sets": {
                "bs_lb_2023-0222-0942": {
                    "backends": [],
                    "health_checker": {
                        "interval_in_millis": 10000,
                        "port": 80,
                        "protocol": "HTTP",
                        "response_body_regex": "",
                        "retries": 3,
                        "return_code": 200,
                        "timeout_in_millis": 3000,
                        "url_path": "/"
                    },
                    "lb_cookie_session_persistence_configuration": null,
                    "name": "bs_lb_2023-0222-0942",
                    "policy": "ROUND_ROBIN",
                    "session_persistence_configuration": null,
                    "ssl_configuration": null
                }
            },
            "certificates": {},
            "compartment_id": "ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx",
            "defined_tags": {},
            "display_name": "TEST-LB-ANSIBLE",
            "freeform_tags": {},
            "hostnames": {},
            "id": "ocid1.loadbalancer.oc1.sa-saopaulo-1.xxxxxxxxxxxxxxxxxxxxxxxxxx",
            "ip_addresses": [
                {
                    "ip_address": "x.x.x.x",
                    "is_public": false,
                    "reserved_ip": null
                }
            ],
            "is_private": true,
            "lifecycle_state": "ACTIVE",
            "listeners": {
                "listener_lb_2023-0222-0942": {
                    "connection_configuration": {
                        "backend_tcp_proxy_protocol_version": null,
                        "idle_timeout": 60
                    },
                    "default_backend_set_name": "bs_lb_2023-0222-0942",
                    "hostname_names": null,
                    "name": "listener_lb_2023-0222-0942",
                    "path_route_set_name": null,
                    "port": 80,
                    "protocol": "HTTP",
                    "routing_policy_name": null,
                    "rule_set_names": [],
                    "ssl_configuration": null
                }
            },
            "network_security_group_ids": [],
            "path_route_sets": {},
            "routing_policies": {},
            "rule_sets": {},
            "shape_details": {
                "maximum_bandwidth_in_mbps": 10,
                "minimum_bandwidth_in_mbps": 10
            },
            "shape_name": "flexible",
            "ssl_cipher_suites": {},
            "subnet_ids": [
                "ocid1.subnet.oc1.sa-saopaulo-1.xxxxxxxxxxxxxxxxxxxxxxxxxx"
            ],
            "system_tags": {},
            "time_created": "2023-02-22T12:44:08.185000+00:00"
        },
        "oci_ansible_logs": [
            "2023-02-22,13:11:53 DEBUG config.py:194 Config file found at ~/.oci/config",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:43 Python Version: 3.8.10",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:33 OCI-Python-Sdk version: 2.45.1",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:52 Ansible Version: 2.10.14",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:61 OCI-Ansible-Collections installed Version: 4.13.0",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:94 OCI-Python-Sdk path: ['/usr/local/lib/python3.8/dist-packages/oci']",
            "2023-02-22,13:11:54 DEBUG oci_version_utils.py:104 Ansible module python path: ['/tmp/ansible_oci_loadbalancer_load_balancer_payload_pn3_8snh/ansible_oci_loadbalancer_load_balancer_payload.zip/ansible', '/usr/local/lib/python3.8/dist-packages/ansible']",
            "2023-02-22,13:11:54 INFO base_client.py:507  2023-02-22 13:11:54.016452: Request: GET https://iaas.sa-saopaulo-1.oraclecloud.com/20170115/loadBalancers",
            "2023-02-22,13:11:54 DEBUG connectionpool.py:976 Starting new HTTPS connection (1): iaas.sa-saopaulo-1.oraclecloud.com:443",
            "2023-02-22,13:11:54 DEBUG oci_log_utils.py:84 send: b'GET /20170115/loadBalancers?compartmentId=ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx&displayName=TEST-LB-ANSIBLE HTTP/1.1\\r\\nuser-agent: Oracle-PythonSDK/2.45.1 (python 3.8.10; x86_64-Linux) Oracle-Ansible/4.13.0\\r\\naccept-encoding: gzip, deflate\\r\\naccept: application/json\\r\\nconnection: keep-alive\\r\\ncontent-type: application/json\\r\\nopc-client-info: Oracle-PythonSDK/2.45.1\\r\\nopc-request-id: 60A8FF9344C4411A9B5C34D785983848\\r\\ndate: Wed, 22 Feb 2023 13:11:54 GMT\\r\\nhost: iaas.sa-saopaulo-1.oraclecloud.com\\r\\nauthorization: Signature algorithm=\"rsa-sha256\",headers=\"date (request-target) host\",keyId=\"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx/ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxx\",signature=\"xxxxxxxxxxxxxxxxxxxxxxxxxx\",version=\"1\"\\r\\n\\r\\n'",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 reply: 'HTTP/1.1 200 OK\\r\\n'",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Date: Wed, 22 Feb 2023 13:11:55 GMT",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: opc-request-id: 60A8FF9344C4411A9B5C34D785983848/A8CDC35BAF634519EEF1D36B17D646EF/A682EA5D5EE40C52A12EB9931C68A672",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Content-Type: application/json",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: X-Content-Type-Options: nosniff",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Content-Length: 1625",
            "2023-02-22,13:11:55 DEBUG connectionpool.py:457 https://iaas.sa-saopaulo-1.oraclecloud.com:443 \"GET /20170115/loadBalancers?compartmentId=ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx&displayName=TEST-LB-ANSIBLE HTTP/1.1\" 200 1625",
            "2023-02-22,13:11:55 DEBUG base_client.py:530  2023-02-22 13:11:55.076082: time elapsed for request 60A8FF9344C4411A9B5C34D785983848: 1.059092666982906",
            "2023-02-22,13:11:55 DEBUG base_client.py:532  2023-02-22 13:11:55.080585: time elapsed in response: 0:00:01.039848",
            "2023-02-22,13:11:55 DEBUG base_client.py:539  2023-02-22 13:11:55.081085: Response status: 200",
            "2023-02-22,13:11:55 DEBUG base_client.py:749  2023-02-22 13:11:55.095082: python SDK time elapsed for deserializing: 0.012879874993814155",
            "2023-02-22,13:11:55 DEBUG base_client.py:556  2023-02-22 13:11:55.096566: Response returned",
            "2023-02-22,13:11:55 DEBUG base_client.py:429 time elapsed for request: 1.0805318749917205",
            "2023-02-22,13:11:55 INFO base_client.py:507  2023-02-22 13:11:55.098486: Request: GET https://iaas.sa-saopaulo-1.oraclecloud.com/20170115/loadBalancers",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 send: b'GET /20170115/loadBalancers?compartmentId=ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx&displayName=TEST-LB-ANSIBLE HTTP/1.1\\r\\nuser-agent: Oracle-PythonSDK/2.45.1 (python 3.8.10; x86_64-Linux) Oracle-Ansible/4.13.0\\r\\naccept-encoding: gzip, deflate\\r\\naccept: application/json\\r\\nconnection: keep-alive\\r\\ncontent-type: application/json\\r\\nopc-client-info: Oracle-PythonSDK/2.45.1\\r\\nopc-request-id: 9A5DC3C3716A4D73A424F2643E7DC22E\\r\\ndate: Wed, 22 Feb 2023 13:11:55 GMT\\r\\nhost: iaas.sa-saopaulo-1.oraclecloud.com\\r\\nauthorization: Signature algorithm=\"rsa-sha256\",headers=\"date (request-target) host\",keyId=\"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx/ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxx\",signature=\"xxxxxxxxxxxxxxxxxxxxxxxxxx\",version=\"1\"\\r\\n\\r\\n'",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 reply: 'HTTP/1.1 200 OK\\r\\n'",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Date: Wed, 22 Feb 2023 13:11:55 GMT",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: opc-request-id: 9A5DC3C3716A4D73A424F2643E7DC22E/BA28E687A5820104B1588D80AFF603E9/290F8CF2A9010D7DB443246E2BB1C29A",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Content-Type: application/json",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: X-Content-Type-Options: nosniff",
            "2023-02-22,13:11:55 DEBUG oci_log_utils.py:84 header: Content-Length: 1625",
            "2023-02-22,13:11:55 DEBUG connectionpool.py:457 https://iaas.sa-saopaulo-1.oraclecloud.com:443 \"GET /20170115/loadBalancers?compartmentId=ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxx&displayName=TEST-LB-ANSIBLE HTTP/1.1\" 200 1625",
            "2023-02-22,13:11:55 DEBUG base_client.py:530  2023-02-22 13:11:55.358822: time elapsed for request 9A5DC3C3716A4D73A424F2643E7DC22E: 0.2599403339845594",
            "2023-02-22,13:11:55 DEBUG base_client.py:532  2023-02-22 13:11:55.361273: time elapsed in response: 0:00:00.242288",
            "2023-02-22,13:11:55 DEBUG base_client.py:539  2023-02-22 13:11:55.362181: Response status: 200",
            "2023-02-22,13:11:55 DEBUG base_client.py:749  2023-02-22 13:11:55.368934: python SDK time elapsed for deserializing: 0.005432791978819296",
            "2023-02-22,13:11:55 DEBUG base_client.py:556  2023-02-22 13:11:55.370008: Response returned",
            "2023-02-22,13:11:55 DEBUG base_client.py:429 time elapsed for request: 0.27199608299997635",
            "2023-02-22,13:11:55 DEBUG oci_resource_utils.py:874 is update necessary for load_balancer: False"
        ]
    }
}
@dineshsuthar786
Copy link
Member

@romuloslv Thanks for reporting this. We are checking on it and will update you.

@dineshsuthar786
Copy link
Member

@romuloslv We will fix the issue in next release.

@romuloslv
Copy link
Author

@dineshsuthar786 Thanks. Any predictions for this release?

@dineshsuthar786
Copy link
Member

@romuloslv Next release is on Thursday, 2nd March.

@nikhiban
Copy link
Member

nikhiban commented Mar 2, 2023

@romuloslv In release v4.15.0, We have fixed the issue to update shape_details. Kindly check and let us know if you still face the issue.

@romuloslv
Copy link
Author

I'm closing this issue, it's ok now guys. Thanks for the support @dineshsuthar786 @nikhiban.

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

3 participants