[SOLVED] 5.8.2 some IP leases dropped after operation fsck

Hi All!

Noticed the bug:
After execute the following command was mark some IPs as free, which have been reserved for network:

$onedb fsck -S localhost -u user_db  -d  database_name

get:

[UNREPAIRED] VNet A AR 0 has a wrong lease for VNet B. IP does not match: xxx.xxx.xxx.33 != xxx.xxx.xxx.30. This can't be fixed
VNet A AR 0 has leased xxx.xxx.xxx.31 to VNet B, but it is actually free
VNet A AR 0 has leased xxx.xxx.xxx.32 to VNet B, but it is actually free
VNet A AR 0 has leased xxx.xxx.xxx.33 to VNet B, but it is actually free

Vnet “B” have 4 IP which was reserve from Vnet “A”

Before “fsck” operation
VNET A has list of leases IP’s:

$onevnet show A
       .....
LEASES                                                                          
AR  OWNER                         MAC              IP                        IP6
...
0   V:ID_VM          xx:xx:xx:xx:xx:1d    xxx.xxx.xxx.29                          -
0   N:B            xx:xx:xx:xx:xx:1e    xxx.xxx.xxx..30                          -
0   N:B            xx:xx:xx:xx:xx:1f    xxx.xxx.xxx.31                          -
0   N:B            xx:xx:xx:xx:xx::20    xxx.xxx.xxx.32                          -
0   N:B            xx:xx:xx:xx:xx:21    xxx.xxx.xxx.33                          -
0   V:ID_VM         xx:xx:xx:xx:xx:22    xxx.xxx.xxx.34                          -
...

After “fsck” operation:

$onevnet show A
       .....
LEASES                                                                          
AR  OWNER                         MAC              IP                        IP6
...
0   V:ID_VM          xx:xx:xx:xx:xx:1d    xxx.xxx.xxx.29                          -
0   N:B            xx:xx:xx:xx:xx:1e    xxx.xxx.xxx.30                          -
0   V:ID_VM         xx:xx:xx:xx:xx:22    xxx.xxx.xxx.34                          -
..

After “fsck” operation Vnet B have 4 IP’s also:

$onevnet show  B
       .....
ADDRESS RANGE POOL                                                              
AR 0                                                                            
SIZE           : 4                   
LEASES         : 4                   

RANGE                                   FIRST                               LAST
MAC                         xx:xx:xx:xx:xx:1e                  xx:xx:xx:xx:xx:21
IP                               xxx.xxx.xxx.30                       xxx.xxx.xxx.33


LEASES                                                                          
AR  OWNER                         MAC              IP                        IP6
0   V:ID_VM         xx:xx:xx:xx:xx:1e    xxx.xxx.xxx.30                          -
0   V:ID_VM         xx:xx:xx:xx:xx:1f    xxx.xxx.xxx.31                          -
0   V:ID_VM         xx:xx:xx:xx:xx:20    xxx.xxx.xxx.32                          -
0   V:ID_VM         xx:xx:xx:xx:xx:21    xxx.xxx.xxx.33                          -

Now from this bug, opennebula can to assign reserved IP which was assigned for Vnet “B” earlier, if user will be choosed IP’s from pool Vnet “A”, because now this IPs marked as free for Vnet “A”.

Is It possible this bug associated with this issue?:[SOLVED] 5.8.2 onedb fsck error

Hello @telecast

I have done more changes in FSCK related with networks https://github.com/OpenNebula/one/pull/3398 there was a bug related with reserved networks, so please try it and let me know if it works. If the bug persists, please open a ticket in GitHub so we can fix it.

We are refactoring the FSCK and trying to fix as much as possible bugs, so thanks for your feedback.

1 Like

Hello @ahuertas

Thank you for your help!
For first look now fsck worked correctly. Nothing to lost.
I will check everything in detail again, and be sure to report about the results.

Thanks a lot! If anything just tell me.

Hello @ahuertas
Sorry for delay.
I checked, it’s seem fsck is working fine. I didn’t find bugs, any.
Thank you again!
solved

Thanks for your feedback @telecast!