Skip to content

Commit

Permalink
[PLAT-10860] Node agent installation is skipped
Browse files Browse the repository at this point in the history
Summary: Private IP is initially not set. So, this check is removed.

Test Plan:
1. Create universe and saw that node-agent got installed.

2023-10-13T00:47:59.564Z  [info] dfd43d19-3fd0-4b44-b64e-cd426542fead TaskExecutor.java:1127 [TaskPool-0] com.yugabyte.yw.commissioner.TaskExecutor Adding SubTaskGroup #4: InstallNodeAgent
2023-10-13T00:47:59.573Z  [info] dfd43d19-3fd0-4b44-b64e-cd426542fead TaskExecutor.java:699 [TaskPool-0] com.yugabyte.yw.commissioner.TaskExecutor Setting subtask(InstallNodeAgent) group type to Provisioning

Reviewers: cwang, nbhatia

Reviewed By: cwang

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D29293
  • Loading branch information
nkhogen committed Oct 13, 2023
1 parent 6696948 commit 6bf2d24
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ protected Collection<NodeDetails> filterNodesForInstallNodeAgent(
NodeAgentClient nodeAgentClient = application.injector().instanceOf(NodeAgentClient.class);
Map<UUID, Boolean> clusterSkip = new HashMap<>();
return nodes.stream()
.filter(n -> n.cloudInfo != null && n.cloudInfo.private_ip != null)
.filter(n -> n.cloudInfo != null)
.filter(
n ->
clusterSkip.computeIfAbsent(
Expand Down Expand Up @@ -1233,15 +1233,13 @@ protected void deleteNodeAgent(NodeDetails nodeDetails) {
public SubTaskGroup createWaitForNodeAgentTasks(Collection<NodeDetails> nodes) {
SubTaskGroup subTaskGroup = createSubTaskGroup(WaitForNodeAgent.class.getSimpleName());
NodeAgentClient nodeAgentClient = application.injector().instanceOf(NodeAgentClient.class);
boolean createSubTaskGroup = false;
for (NodeDetails node : nodes) {
if (node.cloudInfo == null) {
continue;
}
Cluster cluster = getUniverse().getCluster(node.placementUuid);
Provider provider = Provider.getOrBadRequest(UUID.fromString(cluster.userIntent.provider));
if (nodeAgentClient.isClientEnabled(provider)) {
createSubTaskGroup = true;
WaitForNodeAgent.Params params = new WaitForNodeAgent.Params();
params.nodeName = node.nodeName;
params.azUuid = node.azUuid;
Expand All @@ -1252,7 +1250,7 @@ public SubTaskGroup createWaitForNodeAgentTasks(Collection<NodeDetails> nodes) {
subTaskGroup.addSubTask(task);
}
}
if (createSubTaskGroup) {
if (subTaskGroup.getSubTaskCount() > 0) {
getRunnableTask().addSubTaskGroup(subTaskGroup);
}
return subTaskGroup;
Expand Down

0 comments on commit 6bf2d24

Please sign in to comment.