Skip to content
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

Conversation

dhrubo-os
Copy link
Collaborator

@dhrubo-os dhrubo-os commented Oct 23, 2024

…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

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@@ -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));
Copy link
Contributor

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.

Comment on lines 288 to 291
// if (mlFeatureEnabledSetting.isMultiTenancyEnabled()) {
// listener.onResponse(new MLDeployModelResponse(taskId, MLTaskType.DEPLOY_MODEL, MLTaskState.CREATED.name()));
// return;
// }
Copy link
Contributor

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.

Copy link
Collaborator Author

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,
Copy link
Contributor

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]>
@dhrubo-os dhrubo-os merged commit 5cac357 into opensearch-project:feature/multi_tenancy Oct 24, 2024
4 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants