Skip to content

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

@kiranchavala

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions