Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Fix race condition in subnet deletion API #663

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9645772
Documentation update
pkommoju May 12, 2021
183c36a
Apply changes suggested in review
pkommoju May 22, 2021
4896515
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju May 26, 2021
f170e1e
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju May 28, 2021
bcbf7b1
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju May 29, 2021
efc5b6e
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 1, 2021
c785697
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 8, 2021
d213c03
Merge branch 'master' of https://github.com/pkommoju/alcor
Jun 8, 2021
0f56454
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 8, 2021
4a2a382
Merge branch 'master' of https://github.com/pkommoju/alcor
pkommoju Jun 9, 2021
7f93fe3
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 10, 2021
8d6dd0e
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 15, 2021
b19d428
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
kevin-zhonghao Jun 16, 2021
539d0c0
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jun 22, 2021
6a9a1c6
Merge branch 'master' of https://github.com/pkommoju/alcor
pkommoju Jun 22, 2021
19430b2
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 1, 2021
1d7ef7e
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 2, 2021
cd1fec6
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 6, 2021
e079a44
Fix race condition in VPC Mgr delete subnet API
Jul 9, 2021
4831ad6
Set subnset ip version as IPv4
Jul 9, 2021
3c378e0
Merge branch 'master' into fix/subnet_concurrent_delete_issue
Jul 9, 2021
4cb934e
Fix varible type
Jul 9, 2021
ad62ef0
Add some logs
Jul 9, 2021
f756eef
Add more logs
Jul 9, 2021
8160d4a
Revert the wrong fix to the non-gateway port count check
Jul 9, 2021
639a0cd
Fix commit transaction from different thread issue
Jul 9, 2021
85de8fb
Update ignite config xml to support transaction in VpcRepository
Jul 9, 2021
d6ed075
Fix Ip mgr ignite misconfiguration
Jul 13, 2021
e57abe4
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 20, 2021
1b63054
Add missing file
pkommoju Jul 21, 2021
fe81008
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 21, 2021
016aaf5
Add create ignite client with cache config and support in ip mgr
Jul 22, 2021
118dd53
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Jul 23, 2021
7d9a2e5
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Aug 2, 2021
3884a44
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Aug 4, 2021
0b5cd11
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Aug 6, 2021
2ae9045
Merge from master
Aug 20, 2021
257ef71
Make all currently used caches transactional
pkommoju Aug 26, 2021
c303e0b
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
pkommoju Aug 26, 2021
46b79f8
Merge branch 'master' into all_txn
pkommoju Aug 26, 2021
c7809b3
Make more caches to Transactional atomicity to fix subnet deletion pr…
pkommoju Aug 26, 2021
70e9251
Address code review comments
pkommoju Aug 27, 2021
06bc414
Merge branch 'all_txn' into fix/subnet_concurrent_delete_issue
pkommoju Aug 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 98 additions & 98 deletions kubernetes/services/ignite_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,104 +45,104 @@ Copyright(c) 2020 Futurewei Cloud

<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.web.entity.vpc.VpcEntity"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="dpm_nodeinfo_cache"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalPorts"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalSubnets"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalSubnetPorts"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.GatewayInfo"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="ncm_nodeinfo_cache"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.netwconfigmanager.entity.ResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.netwconfigmanager.entity.VpcResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="java.lang.Object"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.VpcResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.web.entity.vpc.VpcEntity"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="dpm_nodeinfo_cache"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Best to actually try to start Ignite with this change, one can never be sure about XML nestings and Ignite's naming oddities.

<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalPorts"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalSubnets"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.InternalSubnetPorts"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.GatewayInfo"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="ncm_nodeinfo_cache"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.netwconfigmanager.entity.ResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.netwconfigmanager.entity.VpcResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="java.lang.Object"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.dataplane.entity.VpcResourceMeta"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
</list>
</property>

Expand Down
33 changes: 33 additions & 0 deletions kubernetes/services/ignite_ip_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,42 @@ Copyright(c) 2020 Futurewei Cloud
</bean>
</property>
<property name="storagePath" value="/opt/ip"/>
<property name="walPath" value="/db/wal"/>
<property name="walArchivePath" value="/db/wal/archive"/>
</bean>
</property>

<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.privateipmanager.entity.IpAddrAlloc"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.privateipmanager.entity.IpAddrRange"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.privateipmanager.entity.VpcIpRange"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
Expand Down
39 changes: 39 additions & 0 deletions kubernetes/services/ignite_port_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,45 @@ Copyright(c) 2020 Futurewei Cloud
</bean>
</property>


<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.privateipmanager.entity.IpAddrRange"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>

<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.portmanager.entity.PortNeighbors"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.web.entity.port.PortEntity"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set the cache name. -->
<property name="name" value="com.futurewei.alcor.portmanager.entity.SubnetPortIds"/>
<!-- Set the cache mode. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache parameters. -->
<property name="cacheMode" value="PARTITIONED"/>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
Expand Down
Loading