bug fix: endpoint register, import and devstack broken issues.
1. amend keyston endpoint register info Service type should acceleration instead of cyborg. For cyborg is just the service name. We do not support uwsgi at present, so we must indicate service port explicitly. 2. Fix package import error Add full path to import module, so that the reference can be resolved. Story: 2001887 Task: 14368 3. devstack broken TypeError: launch_service() got an unexpected keyword argument 'restart_method' When initialize cyborg api service launcher, we already pass restart_method. So no need to pass restart_method to launcher.launch_service, and it has not restart_method argument. Co-Authored-By: jiapei <jiapei2@lenovo.com> Co-Authored-By: Zhipeng Huang <huangzhipeng@huawei.com> Change-Id: Ic69e76b7bf86bbd1382aff07694ea9fbafd0862a
This commit is contained in:
parent
ce0b6e5a95
commit
a308525d38
|
@ -17,7 +17,7 @@
|
|||
Cyborg Generic driver implementation.
|
||||
"""
|
||||
|
||||
from modules import generic
|
||||
from cyborg.accelerator.drivers.modules import generic
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
|
|
|
@ -32,6 +32,5 @@ def main():
|
|||
# Build and start the WSGI app
|
||||
launcher = cyborg_service.process_launcher()
|
||||
server = cyborg_service.WSGIService('cyborg_api', CONF.api.enable_ssl_api)
|
||||
launcher.launch_service(server, workers=server.workers,
|
||||
restart_method='mutate')
|
||||
launcher.launch_service(server, workers=server.workers)
|
||||
launcher.wait()
|
||||
|
|
|
@ -40,6 +40,7 @@ CYBORG_CONF_FILE=$CYBORG_CONF_DIR/cyborg.conf
|
|||
CYBORG_ROOTWRAP_CONF=$CYBORG_CONF_DIR/rootwrap.conf
|
||||
CYBORG_POLICY_JSON=$CYBORG_CONF_DIR/policy.json
|
||||
CYBORG_SERVICE_HOST=${CYBORG_SERVICE_HOST:-$SERVICE_HOST}
|
||||
CYBORG_SERVICE_PORT=${CYBORG_SERVICE_PORT:-6666}
|
||||
CYBORG_SERVICE_PROTOCOL=${CYBORG_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
if [[ -d ${CYBORG_DIR}/bin ]]; then
|
||||
CYBORG_BIN_DIR=${CYBORG_DIR}/bin
|
||||
|
@ -99,12 +100,12 @@ function configure_cyborg_dirs {
|
|||
# service cyborg admin
|
||||
function create_cyborg_accounts {
|
||||
create_service_user "cyborg" "admin"
|
||||
get_or_create_service "cyborg" "cyborg" "Cyborg Accelerators Service"
|
||||
get_or_create_service "cyborg" "acceleration" "Cyborg Accelerators Service"
|
||||
get_or_create_endpoint "cyborg" \
|
||||
"$REGION_NAME" \
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1" \
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1" \
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1"
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}:${CYBORG_SERVICE_PORT}/v1" \
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}:${CYBORG_SERVICE_PORT}/v1" \
|
||||
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}:${CYBORG_SERVICE_PORT}/v1"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue