-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applying multi-tenancy for forward request which is important for deploy request #3158
applying multi-tenancy for forward request which is important for deploy request #3158
Conversation
…loy request Signed-off-by: Dhrubo Saha <[email protected]>
@@ -186,7 +186,8 @@ private void indexAndCreateController( | |||
String errorMessage = getErrorMessage("Model controller saved into index, result:{}", modelId, isHidden); | |||
log.info(errorMessage, indexResponse.getResult()); | |||
if (indexResponse.getResult() == DocWriteResponse.Result.CREATED) { | |||
mlModelManager.updateModel(modelId, isHidden, Map.of(MLModel.IS_CONTROLLER_ENABLED_FIELD, true)); | |||
mlModelManager | |||
.updateModel(modelId, mlModel.getTenantId(), isHidden, Map.of(MLModel.IS_CONTROLLER_ENABLED_FIELD, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to not add tenant ID to controller action. We are now adding multi tenancy to create controller but not to delete controller.
// if (mlFeatureEnabledSetting.isMultiTenancyEnabled()) { | ||
// listener.onResponse(new MLDeployModelResponse(taskId, MLTaskType.DEPLOY_MODEL, MLTaskState.CREATED.name())); | ||
// return; | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these commented? Remove them if they are no longer required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I meant to remove. I'll remove this in next rev
@@ -302,6 +302,7 @@ private void deployModel( | |||
() -> updateModelDeployStatusAndTriggerOnNodesAction( | |||
modelId, | |||
taskId, | |||
tenantId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a multi node setting, how will the model be deployed across all nodes?
Signed-off-by: Dhrubo Saha <[email protected]>
Signed-off-by: Dhrubo Saha <[email protected]>
5cac357
into
opensearch-project:feature/multi_tenancy
…loy request
Description
[applying multi-tenancy for forward request which is important for deploy request
purpose of TransportForwardAction.java is to forward the request to other nodes in a multi-node cluster
Also at the same time, currently in multi-tenancy, if a model is deployed, the status is not being updated in the index. Because that update wasn't happening through sdkclient.
]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.