JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
修复单独部署runtime的时候报错信息
chen hui1ffccef43f43
diff --git a/deploy/enterprise/check_handler.sh b/deploy/enterprise/check_handler.shindex ba4cce9a47..aec4c422e7 100755--- a/deploy/enterprise/check_handler.sh+++ b/deploy/enterprise/check_handler.sh@@ -329,6 +329,12 @@ check_if_rabbitmq_up() {DEPLOY_VARS["MANAGER_RABBITMQ_URL"]="amqp://${user}:${encoded_password}@${url}"}+check_if_gateway_up() {+ if ! check_k8s_resource_exists "deployment" "${DEPLOY_VARS["GATEWAY_NAME"]}" "${DEPLOY_VARS["NAMESPACE"]}"; then+ error "GATEWAY is not deployed. Please deploy it first with: ./$(basename "$0") up gateway"+ fi+}+check_nfs_up_dependency(){if [ "${DEPLOY_VARS["RENDER_ONLY"]}" == "true" ]; thenreturn@@ -448,6 +454,23 @@ check_proxy_up_dependency() {}check_gateway_up_dependency(){+ check_if_db_up+ check_if_jina_up+ ensure_redis_up+ check_if_obs_up+}++check_web_up_dependency(){+ check_if_db_up+ check_if_obs_up+ check_if_gateway_up+}++check_manager_up_dependency(){+ check_if_db_up+}++check_runtime_up_dependency(){local jiuwenclaw_path="${DEPLOY_VARS["NFS_POD_PATH"]}/jiuwenclaw"local nfs_dname=${DEPLOY_VARS["NFS_NAME"]}@@ -466,25 +489,20 @@ check_gateway_up_dependency(){ficheck_if_db_up- check_if_jina_upensure_redis_up- check_if_obs_up-}-check_web_up_dependency(){- check_if_db_up- check_if_obs_up-- if ! check_k8s_resource_exists "deployment" "${DEPLOY_VARS["GATEWAY_NAME"]}" "${DEPLOY_VARS["NAMESPACE"]}"; then- error "GATEWAY is not deployed. Please deploy it first with: ./$(basename "$0") up gateway"+ if [[ "${DEPLOY_VARS["RENDER_ONLY"]}" != "true" && "${DEPLOY_VARS["APPLY_PATCH"]}" == "true" ]]; then+ check_if_gateway_up+ if [ -n "${DEPLOY_VARS["GATEWAY_CONFIG_HTTP_NODE_PORT"]:-}" ]; then+ info "chenhui: No need to fetch GATEWAY_CONFIG_HTTP_NODE_PORT"+ return+ fi+ local namespace="${DEPLOY_VARS["NAMESPACE"]}"+ local gw_svc="${DEPLOY_VARS["GATEWAY_NAME"]}-nodeport"+ local gw_port=$(kubectl get service "${gw_svc}" -n "${namespace}" -o jsonpath='{.spec.ports[?(@.name=="config-http")].nodePort}')+ if [ -z "${gw_port}" ]; then+ error "Failed to read nodePort (config-http) from service ${gw_svc} in namespace ${namespace}"+ fi+ DEPLOY_VARS["GATEWAY_CONFIG_HTTP_NODE_PORT"]="${gw_port}"fi}--check_manager_up_dependency(){- check_if_db_up-}--check_runtime_up_dependency(){- check_if_db_up- ensure_redis_up-}diff --git a/deploy/enterprise/global_vars.sh b/deploy/enterprise/global_vars.shindex 8dc6fdf2aa..d2f6017b05 100755--- a/deploy/enterprise/global_vars.sh+++ b/deploy/enterprise/global_vars.sh@@ -217,7 +217,6 @@ declare -A DEPLOY_VARS=(["REDIS_NAME"]="jiuwenclaw-redis"["REDIS_PASSWORD"]=""["REDIS_PORT"]="6379"- ["REDIS_MODE"]="standalone"["RENDER_ONLY"]="false"["SECRET_CM_NAME"]="jiuwenclaw-secret-configmap"["SKILL_AUTHORIZATION_ENABLED"]="false"diff --git a/deploy/enterprise/templates/gateway.template.env b/deploy/enterprise/templates/gateway.template.envindex 32a3a802ca..31cd01c878 100644--- a/deploy/enterprise/templates/gateway.template.env+++ b/deploy/enterprise/templates/gateway.template.env@@ -76,6 +76,7 @@ GATEWAY_RUNTIME_MANAGER_URL=http://<<AGENT_RUNTIME_NAME>>:<<AGENT_RUNTIME_PORT>># Gateway多副本模式DEPLOYMENT_MODE=distributedGATEWAY_INSTANCE_ID=<<GATEWAY_NAME>>-<<NAMESPACE>>+REDIS_MODE=<<REDIS_MODE>>REDIS_HOST=<<REDIS_HOST>>REDIS_PORT=<<REDIS_PORT>>REDIS_DB=<<REDIS_DB>>