Skip to content

Commit

Permalink
chore: release v2.4.16
Browse files Browse the repository at this point in the history
  • Loading branch information
pycook committed Dec 6, 2024
1 parent f65c5a8 commit 47ebe55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions cmdb-api/api/lib/cmdb/ipam/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ def list_ip_address(parent_id):

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

Expand Down Expand Up @@ -92,7 +93,7 @@ def assign_ips(self, ips, subnet_id, cidr, **kwargs):
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 = []
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 47ebe55

Please sign in to comment.