You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/09/08 08:18:54 UTC

[GitHub] [cloudstack] Rubueno opened a new issue, #6715: ControlNetworkGuru does not take into account custom CIDR when assigning System VM link local IP address

Rubueno opened a new issue, #6715:
URL: https://github.com/apache/cloudstack/issues/6715

   ##### ISSUE TYPE
    * Bug Report
   
   ##### COMPONENT NAME
   ~~~
   Management, SystemVM
   ~~~
   
   ##### CLOUDSTACK VERSION
   ~~~
   4.16.1
   ~~~
   
   ##### CONFIGURATION
   In database:
   ```
   MariaDB [cloud]> select name,value from configuration where name = 'control.cidr';
   +--------------+------------------+
   | name         | value            |
   +--------------+------------------+
   | control.cidr | 169.254.240.0/20 |
   +--------------+------------------+
   MariaDB [cloud]> select name,value from configuration where name = 'control.gateway';
   +-----------------+---------------+
   | name            | value         |
   +-----------------+---------------+
   | control.gateway | 169.254.240.1 |
   +-----------------+---------------+
   MariaDB [cloud]> select count(*) from op_dc_link_local_ip_address_alloc;
   +----------+
   | count(*) |
   +----------+
   |    65533 |
   +----------+
   ```
   On agent:
   ```
   root@hv-04-02-21:~# grep control.cidr /etc/cloudstack/agent/agent.properties
   control.cidr=169.254.240.0/20
   ```
   
   ##### SUMMARY
   When having set a `control.cidr` different from the norm (`168.254.0.0/16`) and the database table `op_dc_link_local_ip_address_alloc` is already populated with all the addresses in the default cidr, then allocating an IP to a System VM does not take into account the requested CIDR, thus allocating an IP address in the wrong range.
   
   https://github.com/apache/cloudstack/blob/main/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java#L52 should take this into account. This function is called in https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/network/guru/ControlNetworkGuru.java#L134
   
   ##### STEPS TO REPRODUCE
   - Install new management server
   - After kickstart, disable the zone to prevent any system vm deploys
   - In mysql database: `select count(*) from op_dc_link_local_ip_address_alloc;`, it would return `65533`
   - Connect agents
   - Configure `control.cidr` on the manager and agents, and `control.gateway` on the manager, ie:
   ```
   control.cidr=169.254.240.0/20
   control.gateway=169.254.240.1
   ```
   - Enable the zone, check the system vm link local address
   
   ##### EXPECTED RESULTS
   - The System VMs should receive an IP address in the configured CIDR.
   - In mysql database: `select count(*) from op_dc_link_local_ip_address_alloc;`, it should return `4093`
   
   ##### ACTUAL RESULTS
   - System VMs receive an IP address in the default `169.254.0.0/16` range
   ```
   2022-09-07 22:45:35,338 DEBUG [o.a.c.e.o.NetworkOrchestrator] (Work-Job-Executor-3:ctx-b1c76634 job-149/job-150 ctx-224681ec) (logid:32608415) Network id=201 is already implemented
   2022-09-07 22:45:35,524 DEBUG [c.c.n.g.ControlNetworkGuru] (Work-Job-Executor-3:ctx-b1c76634 job-149/job-150 ctx-224681ec) (logid:32608415) Reserved NIC for v-18-VM [ipv4:169.254.167.69 netmask:255.255.240.0 gateway:169.254.240.1]
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] weizhouapache commented on issue #6715: ControlNetworkGuru does not take into account custom CIDR when assigning System VM link local IP address

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #6715:
URL: https://github.com/apache/cloudstack/issues/6715#issuecomment-1612631983

   this seems to be related to https://github.com/apache/cloudstack/pull/7580


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ControlNetworkGuru does not take into account custom CIDR when assigning System VM link local IP address [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6715:
URL: https://github.com/apache/cloudstack/issues/6715#issuecomment-4523869448

   This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org