chore: release v2.4.16

This commit is contained in:
pycook 2024-12-06 16:52:13 +08:00
parent f65c5a8c56
commit 47ebe55291
2 changed files with 10 additions and 9 deletions

View File

@ -31,10 +31,11 @@ class IpAddressManager(object):
return numfound, result
def _get_cis(self, ips):
response, _, _, _, _, _ = SearchFromDB(
"_type:{},{}:({})".format(self.type_id, IPAddressBuiltinAttributes.IP, ";".join(ips or [])),
count=10000000, parent_node_perm_passed=True).search()
def _get_cis(self, subnet_id, ips):
q = "_type:{},{}:({})".format(self.type_id, IPAddressBuiltinAttributes.IP, ";".join(ips or []))
response, _, _, _, _, _ = RelationSearch([subnet_id], level=[1], query=q, count=1000000).search()
return response
@ -92,7 +93,7 @@ class IpAddressManager(object):
return abort(400, ErrFormat.ipam_address_model_not_found)
with (redis_lock.Lock(rd.r, "IPAM_ASSIGN_ADDRESS_{}".format(subnet_id))):
cis = self._get_cis(ips)
cis = self._get_cis(subnet_id, ips)
ip2ci = {ci[IPAddressBuiltinAttributes.IP]: ci for ci in cis}
ci_ids = []

View File

@ -41,7 +41,7 @@ services:
- redis
cmdb-api:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:2.4.15
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:2.4.16
container_name: cmdb-api
env_file:
- .env
@ -64,14 +64,14 @@ services:
gunicorn --workers=4 autoapp:app -b 0.0.0.0:5000 -D
celery -A celery_worker.celery worker -E -Q one_cmdb_async --autoscale=4,1 --logfile=one_cmdb_async.log -D
celery -A celery_worker.celery worker -E -Q acl_async --logfile=one_acl_async.log --autoscale=2,1 -D
celery -A celery_worker.celery worker -E -Q acl_async --logfile=one_acl_async.log --autoscale=4,1 -D
nohup flask cmdb-trigger > trigger.log 2>&1 &
flask cmdb-init-cache
flask cmdb-init-acl
flask init-import-user-from-acl
flask init-department
nohup flask cmdb-patch -v 2.4.15 &
nohup flask cmdb-patch -v 2.4.16 &
flask cmdb-counter > counter.log 2>&1
networks:
new:
@ -84,7 +84,7 @@ services:
test: "ps aux|grep -v grep|grep -v '1 root'|grep gunicorn || exit 1"
cmdb-ui:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.4.15
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.4.16
container_name: cmdb-ui
depends_on:
cmdb-api: