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

bigiq_as3_deploy got multiple values for argument 'data' #78

Open
andreas-jacobi opened this issue Nov 16, 2023 · 1 comment
Open

bigiq_as3_deploy got multiple values for argument 'data' #78

andreas-jacobi opened this issue Nov 16, 2023 · 1 comment
Labels
Backlog Added to JIRA board bug Something isn't working

Comments

@andreas-jacobi
Copy link

andreas-jacobi commented Nov 16, 2023

COMPONENT NAME

bigiq_as3_deploy

Environment

ANSIBLE VERSION
ansible-playbook [core 2.13.4]
  config file = /runner/project/ansible.cfg
  configured module search path = ['/runner/project/library/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/runner/project/collections:/home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.7 (default, Sep 13 2021, 08:18:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 3.0.3
  libyaml = True
BIGIP/BigIQ VERSION

BigIP:

Sys::Version
Main Package
  Product     BIG-IP
  Version     15.1.5.1
  Build       0.0.14
  Edition     Point Release 1
  Date        Sun Mar 27 23:23:42 PDT 2022

BigIQ:

Sys::Version
Main Package
  Product     BIG-IQ
  Version     8.3.0
  Build       0.0.118
  Edition     Final
  Date        Thu Apr  6 11:04:10 PDT 2023
CONFIGURATION
[defaults]
retry_files_enabled = False
host_key_checking = False
library = library/modules
module_utils = library/module_utils
action_plugins = library/plugins/action
terminal_plugins = library/plugins/terminal
collections_paths = collections
roles_path = roles
network_group_modules = bigip, bigiq
display_skipped_hosts = no
OS / ENVIRONMENT

Ansible Tower

SUMMARY

Unable to send as3 declaration to BigIQ, results in error:

"send() got multiple values for argument 'data'"
STEPS TO REPRODUCE

Playbook:

- name: Deploy as3 config
  hosts: all
  gather_facts: False
  collections:
    - f5networks.f5_bigip
  connection: httpapi

  vars:
    ansible_user: "user"
    ansible_httpapi_password: "secret"
    ansible_network_os: "f5networks.f5_bigip.bigiq"
    ansible_httpapi_use_ssl: "yes"
    ansible_httpapi_validate_certs: "no"

  tasks:
  - block:
    - name: as3 task modified
      bigiq_as3_deploy:
        content: "{{ lookup('file', 'myAwesomeApp1/myAwesomeApp1.json') }}"
        timeout: "300"

as3 declaration:

{
    "action": "deploy",
    "class": "AS3",
    "declaration": {
        "myAwesomeApp1": {
            "class": "Tenant",
            "myApp": {
                "class": "Application",
                "myApp": {
                    "class": "Service_TCP",
                    "defaultRouteDomain": 22,
                    "pool": "myApp_pool",
                    "profileAnalyticsTcp": {
                        "bigip": "/Common/tcp-analytics"
                    },
                    "virtualAddresses": [
                        {
                            "use": "myApp_virtualAddress"
                        }
                    ],
                    "virtualPort": 81
                },
                "myApp_pool": {
                    "class": "Pool",
                    "loadBalancingMode": "round-robin",
                    "members": [
                        {
                            "adminState": "enable",
                            "ratio": 9,
                            "serverAddresses": [
                                "10.100.10.10",
                                "10.100.10.20"
                            ],
                            "servicePort": 33002
                        },
                        {
                            "adminState": "disable",
                            "ratio": 1,
                            "serverAddresses": [
                                "10.100.10.11",
                                "10.100.10.21"
                            ],
                            "servicePort": 33003
                        }
                    ],
                    "monitors": [
                        "http"
                    ]
                },
                "myApp_virtualAddress": {
                    "class": "Service_Address",
                    "icmpEcho": "selective",
                    "routeAdvertisement": "selective",
                    "virtualAddress": "10.80.0.12"
                }
            },
            "myApp2": {
                "class": "Application",
                "myApp2": {
                    "class": "Service_HTTPS",
                    "clientTLS": {
                        "bigip": "/Common/serverssl"
                    },
                    "defaultRouteDomain": 10,
                    "pool": "myApp2_pool",
                    "profileAnalytics": {
                        "bigip": "/Common/analytics"
                    },
                    "profileHTTP": {
                        "bigip": "/Common/http"
                    },
                    "serverTLS": "myApp2_clientssl",
                    "virtualAddresses": [
                        {
                            "use": "myApp2_virtualAddress"
                        }
                    ],
                    "virtualPort": 443
                },
                "myApp2_cert": {
                    "certificate": {
                        "bigip": "/Common/default.crt"
                    },
                    "class": "Certificate",
                    "privateKey": {
                        "bigip": "/Common/default.key"
                    }
                },
                "myApp2_clientssl": {
                    "certificates": [
                        {
                            "certificate": "myApp2_cert"
                        }
                    ],
                    "ciphers": "!TLSv1:!TLSv1_1:!EXPORT:!DHE+AES-GCM:!DHE+AES:ECDHE+AES-GCM:ECDHE+AES:-MD5:-SSLv3:-RC4:!3DES",
                    "class": "TLS_Server"
                },
                "myApp2_pool": {
                    "class": "Pool",
                    "loadBalancingMode": "least-connections-member",
                    "members": [
                        {
                            "adminState": "enable",
                            "connectionLimit": 500,
                            "ratio": 9,
                            "serverAddresses": [
                                "10.200.20.10",
                                "10.200.20.20"
                            ],
                            "servicePort": 33012
                        },
                        {
                            "adminState": "enable",
                            "connectionLimit": 50,
                            "ratio": 1,
                            "serverAddresses": [
                                "10.200.20.11",
                                "10.200.20.21"
                            ],
                            "servicePort": 33012
                        }
                    ],
                    "monitors": [
                        "tcp"
                    ]
                },
                "myApp2_virtualAddress": {
                    "class": "Service_Address",
                    "icmpEcho": "selective",
                    "routeAdvertisement": "selective",
                    "virtualAddress": "10.80.80.11"
                }
            }
        },
        "class": "ADC",
        "id": "e27df6d0a-d7ee-5adf-aa5e-7edc4b5df969",
        "label": "myAwesomeApp1",
        "remark": "Region x and Environment LAB",
        "schemaVersion": "3.30.0",
        "target": {
            "address": "1.1.1.1"
        }
    }
}

Sending the as3 declaration using Postman to BigIQ works as expected.

EXPECTED RESULTS

Deploy declaration to BigIQ and target BigIP

ACTUAL RESULTS

Unable to send as3 declaration to BigIQ, results in error:

"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/modules/bigiq_as3_deploy.py\", line 348, in <module>\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/modules/bigiq_as3_deploy.py\", line 341, in main\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/modules/bigiq_as3_deploy.py\", line 207, in exec_module\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/modules/bigiq_as3_deploy.py\", line 219, in upsert\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/modules/bigiq_as3_deploy.py\", line 253, in upsert_on_device\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/module_utils/client.py\", line 24, in wrap\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible_collections/f5networks/f5_bigip/plugins/module_utils/client.py\", line 57, in post\n  File \"/tmp/ansible_bigiq_as3_deploy_payload_btcobam2/ansible_bigiq_as3_deploy_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: send() got multiple values for argument 'data'
@andreas-jacobi andreas-jacobi added the bug Something isn't working label Nov 16, 2023
@pgouband
Copy link

Hi,

Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1382.

@pgouband pgouband added the Backlog Added to JIRA board label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Added to JIRA board bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants