Skip to content

ListInternalLoadBalancerVMs api call is not working and also the ui doesn't list the internal lb vm's #7266

Closed

Description

@kiranchavala
ISSUE TYPE
  • Bug report
COMPONENT NAME
Componet:UI
Componet:api
CLOUDSTACK VERSION
4.18 nightly
4.17.2

SUMMARY

ListInternalLoadBalancerVMs api call is not working and also the ui doesn't list the internal lb vm's

Steps to reproduce the issue

  1. Created a vpc with offering (Default VPC offering)

  2. Create a tier 1 with network offering > DefaultIsolatedNetworkOfferingForVpcNetworks

  3. Launch a vm in tier1

  4. Acquire a public ip and add a loadbalancer rule to the vm in tier1

  5. Create a tier 2 with network offering > DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB

  6. Launch a vm in tier2

  7. Created a internal loadbalancing rules in tier 2 (vpc> tier2 > add Internal LB rule)

  8. Execute the api call

https://cloudstack.apache.org/api/apidocs-4.17/apis/listInternalLoadBalancerVMs.html

There is no response

  1. The internal lb rules are not displaying under infrastructure > Internal LB

Logs and db entries


MariaDB [cloud]> select * from load_balancing_rules;
+----+---------+-------------+--------------------+------------------+------------+-------------------+------------------------------+----------+-------------+-----------+
| id | name    | description | default_port_start | default_port_end | algorithm  | source_ip_address | source_ip_address_network_id | scheme   | lb_protocol | cidr_list |
+----+---------+-------------+--------------------+------------------+------------+-------------------+------------------------------+----------+-------------+-----------+
|  3 | test    | NULL        |                 81 |               81 | roundrobin | NULL              |                         NULL | Public   | tcp         | 0.0.0.0/0 |
|  4 | testLB  | NULL        |                 81 |               81 | Source     | 192.168.1.121     |                          212 | Internal | NULL        | NULL      |
|  5 | testlb2 | NULL        |                 25 |               25 | Source     | 192.168.1.99      |                          212 | Internal | NULL        | NULL      |
+----+---------+-------------+--------------------+------------------+------------+-------------------+------------------------------+----------+-------------+-----------+
3 rows in set (0.00 sec)


MariaDB [cloud]> select * from load_balancer_vm_map;
+----+------------------+-------------+--------+-------+--------------+
| id | load_balancer_id | instance_id | revoke | state | instance_ip  |
+----+------------------+-------------+--------+-------+--------------+
|  2 |                3 |          13 |      0 | NULL  | 192.168.0.72 |
+----+------------------+-------------+--------+-------+--------------+
1 row in set (0.00 sec)


when list internalloadbalancervms api call 

api log 

2023-02-20 09:38:17,677 INFO  [a.c.c.a.ApiServlet] (qtp1239807799-4140:ctx-0a535c8e ctx-01cc557a ctx-9f3f81bb) (logid:c1b85835) (userId=2 accountId=2 sessionId=null) 10.0.3.251 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=listInternalLoadBalancerVMs&response=json&signature=lW7wfEzPsXGMKUC3JNAY3r5L1kc%3D 200 {"listinternallbvmsresponse":{}}

Management server log 

2023-02-20 09:36:11,925 DEBUG [c.c.a.ApiServlet] (qtp1239807799-3604:ctx-31533184) (logid:1bdef100) ===START===  10.0.3.251 -- GET  apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=listInternalLoadBalancerVMs&response=json&signature=lW7wfEzPsXGMKUC3JNAY3r5L1kc%3D
2023-02-20 09:36:11,928 DEBUG [c.c.a.ApiServer] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82) (logid:1bdef100) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"68dce122-b0df-11ed-ae6f-1e00cd000195"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2023-02-20 09:36:11,929 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82) (logid:1bdef100) Account [Account [{"accountName":"admin","id":2,"uuid":"68dce122-b0df-11ed-ae6f-1e00cd000195"}]] is Root Admin or Domain Admin, all APIs are allowed.
2023-02-20 09:36:11,931 WARN  [o.a.c.a.ProjectRoleBasedApiAccessChecker] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82) (logid:1bdef100) Project is null, ProjectRoleBasedApiAccessChecker only applies to projects, returning API [listInternalLoadBalancerVMs] for user [User {"username":"admin","uuid":"4470021d-48c8-4e5b-913d-150b84cf48d8"}.] as allowed.
2023-02-20 09:36:11,931 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82) (logid:1bdef100) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2023-02-20 09:36:11,932 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82) (logid:1bdef100) API rate limiting is disabled. We will not use ApiRateLimitService.
2023-02-20 09:36:11,933 DEBUG [c.c.a.ApiServlet] (qtp1239807799-3604:ctx-31533184 ctx-a63e9d82 ctx-8fc22062) (logid:1bdef100) ===END===  10.0.3.251 -- GET  apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=listInternalLoadBalancerVMs&response=json&signature=lW7wfEzPsXGMKUC3JNAY3r5L1kc%3D


EXPECTED RESULTS
The api call should work 

https://cloudstack.apache.org/api/apidocs-4.17/apis/listInternalLoadBalancerVMs.html

The Internal LB rules should be visible under (Infrastructure > Internal LB)
ACTUAL RESULTS
The api call is not working

https://cloudstack.apache.org/api/apidocs-4.17/apis/listInternalLoadBalancerVMs.html

The Internal LB rules should be visible under (Infrastructure > Internal LB)

internallb2

internallb

Activity

  1. kiranchavala commented on Feb 21, 2023

    @kiranchavala
    MemberAuthor

    @borisstoyanov Could you please add the required labels

  2. added this to the 4.18.1.0 milestone on Jun 22, 2023
  3. weizhouapache commented on Aug 28, 2023

    @weizhouapache
    Member

    @rohityadavcloud @DaanHoogland
    I will have a look

  4. weizhouapache commented on Aug 28, 2023

    @weizhouapache
    Member

    @kiranchavala
    I cannot reproduce the issue with 4.18 nightly
    both API and UI work

    (localcloud) 🐱 > list internalloadbalancervms filter=id,name
    {
      "count": 2,
      "internalloadbalancervm": [
        {
          "id": "18860134-76f6-42b2-8555-60993ce7eefe",
          "name": "b-78-VM"
        },
        {
          "id": "6fbcad0a-5d9b-4200-8e26-dd62b94744ff",
          "name": "b-79-VM"
        }
      ]
    }
    

    on UI
    image

    2023-08-28 06:47:45,035 DEBUG [c.c.a.ApiServlet] (qtp1955920234-13:ctx-5afb1fac) (logid:1e6f4b7a) ===START===  10.0.3.251 -- GET  listall=true&projectid=-1&page=1&pagesize=20&command=listInternalLoadBalancerVMs&response=json
    2023-08-28 06:47:45,035 DEBUG [c.c.a.ApiServlet] (qtp1955920234-13:ctx-5afb1fac) (logid:1e6f4b7a) Two factor authentication is already verified for the user 2, so skipping
    2023-08-28 06:47:45,041 DEBUG [c.c.a.ApiServer] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"19d46742-417f-11ee-bf06-1e007c0000fc"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
    2023-08-28 06:47:45,043 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) Account [Account [{"accountName":"admin","id":2,"uuid":"19d46742-417f-11ee-bf06-1e007c0000fc"}]] is Root Admin or Domain Admin, all APIs are allowed.
    2023-08-28 06:47:45,044 WARN  [o.a.c.a.ProjectRoleBasedApiAccessChecker] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) Project is null, ProjectRoleBasedApiAccessChecker only applies to projects, returning API [listInternalLoadBalancerVMs] for user [User {"username":"admin","uuid":"19d55e1b-417f-11ee-bf06-1e007c0000fc"}.] as allowed.
    2023-08-28 06:47:45,045 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
    2023-08-28 06:47:45,046 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) API rate limiting is disabled. We will not use ApiRateLimitService.
    2023-08-28 06:47:45,066 DEBUG [c.c.a.ApiServlet] (qtp1955920234-13:ctx-5afb1fac ctx-975f411d) (logid:1e6f4b7a) ===END===  10.0.3.251 -- GET  listall=true&projectid=-1&page=1&pagesize=20&command=listInternalLoadBalancerVMs&response=json
    
  5. DaanHoogland commented on Sep 22, 2023

    @DaanHoogland
    Contributor

    @kiranchavala closing as per @weizhouapache 's report. Please reopen with more information if you feel this is at fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions