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

Can't add backend server to existing Load Balancer #143

Closed
ColorlessHuman opened this issue Dec 27, 2018 · 2 comments
Closed

Can't add backend server to existing Load Balancer #143

ColorlessHuman opened this issue Dec 27, 2018 · 2 comments

Comments

@ColorlessHuman
Copy link

ColorlessHuman commented Dec 27, 2018

Been trying to add an ECS instance to an existing LB
Using this task:

- name: set backend server
      ali_slb_server:
        alicloud_access_key: '{{ alicloud_access_key }}'
        alicloud_secret_key: '{{ alicloud_secret_key }}'
        load_balancer_id: '{{ load_balancer_id }}'
        backend_servers:
          - server_id: '{{ instance_id }}'
            weight: 100

All i get is this huge error

fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "No handlers could be found for logger \"footmark\"\nTraceback (most recent call last):\n  File \"/home/kavach/.ansible/tmp/ansible-tmp-15
45898022.28-2372019141370/AnsiballZ_ali_slb_server.py\", line 113, in <module>\n    _ansiballz_main()\n  File \"/home/kavach/.ansible/tmp/ansible-tmp-1545898022.28-2372019141370/AnsiballZ_ali_slb_server.py
\", line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/kavach/.ansible/tmp/ansible-tmp-1545898022.28-2372019141370/AnsiballZ_ali_slb_server.py\", line
48, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/tmp/ansible_ali_slb_server_payload_DyCSp9/__main__.py\", line 436, in <module>\n  File \"/tmp/ansible_ali_slb_server_
payload_DyCSp9/__main__.py\", line 396, in main\n  File \"/tmp/ansible_ali_slb_server_payload_DyCSp9/__main__.py\", line 193, in add_set_backend_servers\n  File \"/home/kavach/.virtualenvs/ansible/local/li
b/python2.7/site-packages/footmark/slb/connection.py\", line 1006, in describe_load_balancer_attribute\n    return self.get_object('DescribeLoadBalancerAttribute', params, LoadBalancer)\n  File \"/home/kav
ach/.virtualenvs/ansible/local/lib/python2.7/site-packages/footmark/connection.py\", line 269, in get_object\n    raise e\naliyunsdkcore.acs_exception.exceptions.ServerException: HTTP Status: 404 Error:Inv
alidLoadBalancerId.NotFound The specified LoadBalancerId does not exist. RequestID: 6797EB12-80F0-4A32-9BA6-15D532158CD7\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact err
or", "rc": 1}

This InvalidLoadBalancerId.NotFound makes no sense because the LB exists and the id is valid.

Tried gathering slb server facts with the same LB ID and it doesn't throw any error, proving that the LB exists.

- name: Find all backend server health status in specified region
      ali_slb_server_facts:
        alicloud_access_key: '{{ alicloud_access_key }}'
        alicloud_secret_key: '{{ alicloud_secret_key }}'
        alicloud_region: '{{ alicloud_region }}'
        load_balancer_id: '{{ load_balancer_id }}'
      register: all_backend_server
    - debug: var=all_backend_server
@lixue323
Copy link
Contributor

I am sorry to reply so late. Do you still have this issue?

@ColorlessHuman
Copy link
Author

No. The issue can be closed. While I figured out my issue, I don't remember how I fixed it. It's been an year and I'm working on something else now.

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

2 participants