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

[Bug]: servicegroup_servicegroupmember_binding inside of netscaler.adc.servicegroup module won't let me add binding members, only remove #376

Open
sscottkeefe opened this issue Mar 4, 2024 · 4 comments
Assignees
Labels

Comments

@sscottkeefe
Copy link

Summary

When I try to add binding members to an existing service group in desired mode, it's giving me a 409 error and won't let the additional members get added; however, I can remove members from an existing service group in the same way when altering my variable value.

Issue Type

Bug Report

Component Name

servicegroup module; servicegroup_servicegroupmember_binding section

Python Version

$ python --version # or python3 --version
3.10.12

Ansible Version

$ ansible --version
2.16.3

Ansible Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = /home/default/ansible/ansible.cfg
DEFAULT_ASK_PASS(/home/default/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/home/default/ansible/ansible.cfg) = False

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
2.5.0

Target NetScaler Version

> show ns version
NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)

Equivalent NetScaler CLI Command

bind serviceGroup SG_newhostname-dev.placeholder.com 172.20.1.1 443
bind serviceGroup SG_newhostname-dev.placeholder.com 172.20.1.2 443

Steps to Reproduce

        - name: Create SG Binding Members Output
          ansible.builtin.set_fact:
            servicegroup_servicegroupmember_bindings:
              ip: "{{ item }}"
              port: 443
              servicegroupname: "{{ netscaler_servicegroup }}"
          loop: "{{ netscaler_serverip.split(', ') }}"
          register: setfact_output

        - name: Service Group (SG) Configuration
          netscaler.adc.servicegroup:
            nsip: "{{ netscaler_ip }}"
            nitro_user: "{{ netscaler_user }}"
            nitro_pass: "{{ netscaler_password }}"
            servicegroupname: "{{ netscaler_servicegroup }}"
            servicetype: SSL
            cip: ENABLED
            cipheader: X-Forwarded-For
            tcpprofilename: "{{ netscaler_tcpprofilename }}"
            servicegroup_servicegroupmember_binding:
              binding_members: "{{ setfact_output.results | map(attribute='ansible_facts.servicegroup_servicegroupmember_bindings') | list }}"

netscaler_servicegroup: SG_newhostname-dev.placeholder.com
netscaler_serverip: 172.20.1.1, 172.20.1.2

Expected Results

I would expect it to add the additional member IPs rather than error out about a conflict of existence.

Actual Results

<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: default
<127.0.0.1> EXEC /bin/sh -c 'echo ~default && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/default/.ansible/tmp `"&& mkdir "` echo /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930 `" && echo ansible-tmp-1709565663.0287366-12012-266616891385930="` echo /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930 `" ) && sleep 0'
Using module file /home/default/.ansible/collections/ansible_collections/netscaler/adc/plugins/modules/servicegroup.py
<127.0.0.1> PUT /home/default/.ansible/tmp/ansible-local-11942ae0oi5vl/tmppiqvmdtx TO /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930/AnsiballZ_servicegroup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930/ /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930/AnsiballZ_servicegroup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930/AnsiballZ_servicegroup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/default/.ansible/tmp/ansible-tmp-1709565663.0287366-12012-266616891385930/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_path": "nitro/v1/config",
            "appflowlog": null,
            "autodelayedtrofs": null,
            "autodisabledelay": null,
            "autodisablegraceful": null,
            "autoscale": null,
            "cacheable": null,
            "cachetype": null,
            "cip": "ENABLED",
            "cipheader": "X-Forwarded-For",
            "cka": null,
            "clttimeout": null,
            "cmp": null,
            "comment": null,
            "customserverid": null,
            "dbsttl": null,
            "delay": null,
            "downstateflush": null,
            "dup_weight": null,
            "graceful": null,
            "hashid": null,
            "healthmonitor": null,
            "httpprofilename": null,
            "includemembers": null,
            "maxbandwidth": null,
            "maxclient": null,
            "maxreq": null,
            "memberport": null,
            "monconnectionclose": null,
            "monitor_name_svc": null,
            "monthreshold": null,
            "nameserver": null,
            "netprofile": null,
            "newname": null,
            "nitro_auth_token": null,
            "nitro_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nitro_protocol": "https",
            "nitro_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nsip": "placeholder.netscalerendpoint.com",
            "order": null,
            "pathmonitor": null,
            "pathmonitorindv": null,
            "port": null,
            "rtspsessionidremap": null,
            "save_config": false,
            "serverid": null,
            "servername": null,
            "servicegroup_lbmonitor_binding": null,
            "servicegroup_servicegroupmember_binding": {
                "binding_members": [
                    {
                        "ip": "172.20.1.1",
                        "port": 443,
                        "servicegroupname": "SG_newhostname-dev.placeholder.com"
                    },
                    {
                        "ip": "172.20.1.2",
                        "port": 443,
                        "servicegroupname": "SG_newhostname-dev.placeholder.com"
                    }
                ],
                "mode": "desired"
            },
            "servicegroupname": "SG_newhostname-dev.placeholder.com",
            "servicetype": "SSL",
            "sp": null,
            "state": "present",
            "svrtimeout": null,
            "tcpb": null,
            "tcpprofilename": "nstcp_default_tcp_lan",
            "td": null,
            "useproxyport": null,
            "usip": null,
            "validate_certs": true,
            "weight": null
        }
    },
    "loglines": [
        "DEBUG: Initializing ModuleExecutor for resource servicegroup",
        "TRACE: ENTRY: common.get_valid_desired_states() called with ('servicegroup',), {}",
        "TRACE: EXIT: common.get_valid_desired_states() returned {'absent', 'present', 'disabled', 'enabled', 'unset'}",
        "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {}",
        "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'nsversion'), {}",
        "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys",
        "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: client.url_builder() returned https://placeholder.netscalerendpoint.com/nitro/v1/config/nsversion",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'GET', 'https://placeholder.netscalerendpoint.com/nitro/v1/config/nsversion'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f873eae2170>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
        "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://placeholder.netscalerendpoint.com/nitro/v1/config/nsversion', 'status': 200, 'date': 'Mon, 04 Mar 2024 15:21:01 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}",
        "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)', 'mode': '1'}})",
        "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)', 'mode': '1'}})",
        "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)', 'mode': '1'}]), {}",
        "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)', 'mode': '1'}]",
        "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.21.nc, Date: Dec 14 2023, 03:37:25   (64-bit)', 'mode': '1'}])",
        "TRACE: EXIT: common.get_netscaler_version() returned (13.0, 92.21)",
        "INFO: NetScaler version: 13.0-92.21",
        "DEBUG: All params (including non module-specific params) are: {'nsip': 'placeholder.netscalerendpoint.com', 'nitro_user': '********', 'nitro_pass': '********', 'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan', 'servicegroup_servicegroupmember_binding': {'binding_members': [{'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}, {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}], 'mode': 'desired'}, 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowlog': None, 'autodelayedtrofs': None, 'autodisabledelay': None, 'autodisablegraceful': None, 'autoscale': None, 'cacheable': None, 'cachetype': None, 'cka': None, 'clttimeout': None, 'cmp': None, 'comment': None, 'customserverid': None, 'dbsttl': None, 'delay': None, 'downstateflush': None, 'dup_weight': None, 'graceful': None, 'hashid': None, 'healthmonitor': None, 'httpprofilename': None, 'includemembers': None, 'maxbandwidth': None, 'maxclient': None, 'maxreq': None, 'memberport': None, 'monconnectionclose': None, 'monitor_name_svc': None, 'monthreshold': None, 'nameserver': None, 'netprofile': None, 'newname': None, 'order': None, 'pathmonitor': None, 'pathmonitorindv': None, 'port': None, 'rtspsessionidremap': None, 'serverid': None, 'servername': None, 'servicegroup_lbmonitor_binding': None, 'sp': None, 'svrtimeout': None, 'tcpb': None, 'td': None, 'useproxyport': None, 'usip': None, 'weight': None}",
        "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "DEBUG: self.module.params: {'nsip': 'placeholder.netscalerendpoint.com', 'nitro_user': '********', 'nitro_pass': '********', 'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan', 'servicegroup_servicegroupmember_binding': {'binding_members': [{'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}, {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}], 'mode': 'desired'}, 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowlog': None, 'autodelayedtrofs': None, 'autodisabledelay': None, 'autodisablegraceful': None, 'autoscale': None, 'cacheable': None, 'cachetype': None, 'cka': None, 'clttimeout': None, 'cmp': None, 'comment': None, 'customserverid': None, 'dbsttl': None, 'delay': None, 'downstateflush': None, 'dup_weight': None, 'graceful': None, 'hashid': None, 'healthmonitor': None, 'httpprofilename': None, 'includemembers': None, 'maxbandwidth': None, 'maxclient': None, 'maxreq': None, 'memberport': None, 'monconnectionclose': None, 'monitor_name_svc': None, 'monthreshold': None, 'nameserver': None, 'netprofile': None, 'newname': None, 'order': None, 'pathmonitor': None, 'pathmonitorindv': None, 'port': None, 'rtspsessionidremap': None, 'serverid': None, 'servername': None, 'servicegroup_lbmonitor_binding': None, 'sp': None, 'svrtimeout': None, 'tcpb': None, 'td': None, 'useproxyport': None, 'usip': None, 'weight': None}",
        "DEBUG: Desired `servicegroup` module specific params are: {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}",
        "TRACE: EXIT: module_executor._filter_resource_module_params() returned None",
        "TRACE: ENTRY: module_executor._filter_desired_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "DEBUG: Desired `servicegroup` module specific bindings are: {'servicegroup_servicegroupmember_binding': {'binding_members': [{'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}, {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}], 'mode': 'desired'}}",
        "TRACE: EXIT: module_executor._filter_desired_bindings() returned None",
        "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'resource_name': 'servicegroup', 'resource_id': 'SG_newhostname-dev.placeholder.com', 'resource_module_params': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}}",
        "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'resource': 'servicegroup', 'id': 'SG_newhostname-dev.placeholder.com', 'args': {}}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'servicegroup'), {'id': 'SG_newhostname-dev.placeholder.com', 'args': {}, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: client.url_builder() returned https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'GET', 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f873eae2170>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
        "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com', 'status': 200, 'date': 'Mon, 04 Mar 2024 15:21:01 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '1545', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (1545 bytes)'}",
        "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}]})",
        "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}]})",
        "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('servicegroup', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}]), {}",
        "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}]",
        "TRACE: EXIT: common.get_resource() returned (True, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}])",
        "TRACE: EXIT: module_executor.get_existing_resource() returned {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}",
        "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "TRACE: ENTRY: module_executor.create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {'existing': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Mon Mar  4 15:20:04 2024', 'statechangetimemsec': '590', 'tickssincelaststatechange': '5741', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'tcpprofilename': 'nstcp_default_tcp_lan', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0'}, 'desired': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}}",
        "TRACE: EXIT: module_executor.update_diff_list() returned None",
        "TRACE: ENTRY: module_executor.is_resource_identical() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'servicegroupname', 'SG_newhostname-dev.placeholder.com', 'SG_newhostname-dev.placeholder.com'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'servicetype', 'SSL', 'SSL'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'cip', 'ENABLED', 'ENABLED'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'cipheader', 'X-Forwarded-For', 'X-Forwarded-For'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'tcpprofilename', 'nstcp_default_tcp_lan', 'nstcp_default_tcp_lan'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: EXIT: module_executor.is_resource_identical() returned True",
        "INFO: Resource `servicegroup:SG_newhostname-dev.placeholder.com` exists and is identical. No change required.",
        "TRACE: EXIT: module_executor.create_or_update() returned None",
        "TRACE: ENTRY: module_executor.sync_all_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {}",
        "TRACE: ENTRY: module_executor.sync_single_binding() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, 'servicegroup_servicegroupmember_binding'), {}",
        "TRACE: ENTRY: common.get_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'binding_name': 'servicegroup_servicegroupmember_binding', 'binding_id': 'SG_newhostname-dev.placeholder.com', 'resource_module_params': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}}",
        "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'resource_name': 'servicegroup_servicegroupmember_binding', 'resource_id': 'SG_newhostname-dev.placeholder.com', 'resource_module_params': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}}",
        "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'resource': 'servicegroup_servicegroupmember_binding', 'id': 'SG_newhostname-dev.placeholder.com', 'filter': {}}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'servicegroup_servicegroupmember_binding'), {'id': 'SG_newhostname-dev.placeholder.com', 'args': None, 'attrs': None, 'filter': {}}",
        "TRACE: EXIT: client.url_builder() returned https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding/SG_newhostname-dev.placeholder.com",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'GET', 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding/SG_newhostname-dev.placeholder.com'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f873eae2170>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
        "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding/SG_newhostname-dev.placeholder.com', 'status': 200, 'date': 'Mon, 04 Mar 2024 15:21:02 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '512', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (512 bytes)'}",
        "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup_servicegroupmember_binding': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}]})",
        "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup_servicegroupmember_binding': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}]})",
        "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('servicegroup_servicegroupmember_binding', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_tcp_lan'}, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}]), {}",
        "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}]",
        "TRACE: EXIT: common.get_resource() returned (True, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}])",
        "TRACE: EXIT: common.get_bindings() returned (True, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}])",
        "DEBUG: Existing `servicegroup_servicegroupmember_binding` bindings: [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}]",
        "INFO: Binding mode is `desired`",
        "DEBUG: Desired binding members: [{'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}, {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}]",
        "TRACE: ENTRY: common.get_bindprimary_key() called with ('servicegroup_servicegroupmember_binding', {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}), {}",
        "TRACE: EXIT: common.get_bindprimary_key() returned ip",
        "TRACE: ENTRY: common.get_bindprimary_key() called with ('servicegroup_servicegroupmember_binding', {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}), {}",
        "TRACE: EXIT: common.get_bindprimary_key() returned ip",
        "TRACE: ENTRY: common.get_bindprimary_key() called with ('servicegroup_servicegroupmember_binding', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'ip': '172.20.1.1', 'port': 443, 'svrstate': 'DOWN', 'statechangetimesec': 'Mon Mar  4 15:20:05 2024', 'tickssincelaststatechange': '5719', 'weight': '1', 'servername': '172.20.1.1', 'customserverid': 'None', 'serverid': '0', 'state': 'ENABLED', 'hashid': '0', 'graceful': 'NO', 'delay': 0, 'delay1': 0, 'nameserver': '0.0.0.0', 'dbsttl': 0}), {}",
        "TRACE: EXIT: common.get_bindprimary_key() returned servername",
        "DEBUG: Existing binding members bindprimary keys: {'172.20.1.1'}",
        "DEBUG: Desired binding members bindprimary keys: {'172.20.1.1', '172.20.1.2'}",
        "INFO: to_be_deleted_bindprimary_keys bindings: set()",
        "INFO: to_be_added_bindprimary_keys bindings: {'172.20.1.2'}",
        "INFO: to_be_updated_bindprimary_keys bindings: {'172.20.1.1'}",
        "TRACE: ENTRY: module_executor.add_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>,), {'binding_name': 'servicegroup_servicegroupmember_binding', 'desired_bindings': [{'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}, {'ip': '172.20.1.2', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}]}",
        "TRACE: ENTRY: common.bind_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'binding_name': 'servicegroup_servicegroupmember_binding', 'binding_module_params': {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}}",
        "TRACE: ENTRY: common.update_resource() called with (), {'client': <ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'resource_name': 'servicegroup_servicegroupmember_binding', 'resource_module_params': {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}}",
        "TRACE: ENTRY: common._check_update_resource_params() called with ('servicegroup_servicegroupmember_binding', {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}), {}",
        "TRACE: EXIT: common._check_update_resource_params() returned (True, None, {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'})",
        "TRACE: ENTRY: client.put() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>,), {'put_data': {'servicegroup_servicegroupmember_binding': {'ip': '172.20.1.1', 'port': 443, 'servicegroupname': 'SG_newhostname-dev.placeholder.com'}}, 'resource': 'servicegroup_servicegroupmember_binding'}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'servicegroup_servicegroupmember_binding'), {'id': None}",
        "TRACE: EXIT: client.url_builder() returned https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f873eae19f0>, 'PUT', 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding', '{\"servicegroup_servicegroupmember_binding\": {\"ip\": \"172.20.1.1\", \"port\": 443, \"servicegroupname\": \"SG_newhostname-dev.placeholder.com\"}}'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f873eae2170>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}",
        "DEBUG: fetch_url()-resonse-info= PUT: {'url': 'https://placeholder.netscalerendpoint.com/nitro/v1/config/servicegroup_servicegroupmember_binding', 'status': 409, 'date': 'Mon, 04 Mar 2024 15:21:02 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '79', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'msg': 'HTTP Error 409: Conflict', 'body': b'{ \"errorcode\": 273, \"message\": \"Resource already exists\", \"severity\": \"ERROR\" }'}",
        "TRACE: EXIT: client.send() returned (409, {'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'})",
        "TRACE: EXIT: client.put() returned (409, {'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'})",
        "TRACE: ENTRY: common.return_response() called with (), {'status_code': 409, 'response_body': {'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}, 'operation': 'update_resource', 'resource_name': 'servicegroup_servicegroupmember_binding'}",
        "ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}",
        "TRACE: EXIT: common.return_response() returned (False, \"ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}\")",
        "TRACE: EXIT: common.update_resource() returned (False, \"ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}\")",
        "TRACE: EXIT: common.bind_resource() returned (False, \"ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}\")",
        "TRACE: ENTRY: module_executor.return_failure() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f873eb7eaa0>, \"ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}\"), {}"
    ],
    "msg": "ERROR: update_resource FAILED; status_code: 409; Reason:{'errorcode': 273, 'message': 'Resource already exists', 'severity': 'ERROR'}"
}

Additioinal Notes

There's a typo in "Additional" in this section header, FYI.

@sscottkeefe
Copy link
Author

To add some clarity to this, I can add as many brand new binding members as I want during an initial run, but once they exist, I can only remove or stay with the same number; trying to add more results in the above conflict error.

@sscottkeefe
Copy link
Author

As an additional note, I did upgrade the netscaler.adc collection to 2.5.1 and try it again just to cover my bases, and it still fails.

@sumanth-lingappa
Copy link
Collaborator

@sscottkeefe, I am unable to reproduce your case.
Can you please help me a step by step approach to get to your bug?

@sscottkeefe
Copy link
Author

sscottkeefe commented Mar 21, 2024

Sure, using the Ansible that's in the "Steps to Reproduce" section, I:

  1. Create the new service group with two (or more) server IPs for the binding per the netscaler_serverip variable's value (e.g. "172.20.1.1, 172.20.1.2").
  2. Initial creation succeeds with both binding members present, and then I attempt to add an additional IP via the variable value (e.g. "172.20.1.1, 172.20.1.2, 172.20.1.3"), and it will fail with the 409 error above (even though the additional IP ["172.20.1.3"] does not exist in the binding).
  3. If I take out an IP from the original variable value (e.g. "172.20.1.1"), it will gladly remove the binding member that was taken out (e.g. "172.20.1.2").

Rinse and repeat on any additional new service groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants