Skip to content

Commit b968ed4

Browse files
committed
[PLAT-17129]Fix YNP collection path in support bundle
Summary: The path for YNP logs changed recently. Make the corresponding change for collection in support bundle. Test Plan: Manually verified that YNP logs are now collected on latest master with universe logs. Reviewers: skurapati Reviewed By: skurapati Subscribers: svarshney Differential Revision: https://phorge.dev.yugabyte.com/D42799
1 parent 1f0f578 commit b968ed4

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

managed/src/main/java/com/yugabyte/yw/common/supportbundle/UniverseLogsComponent.java

+3-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import com.yugabyte.yw.forms.SupportBundleFormData;
1616
import com.yugabyte.yw.forms.UniverseDefinitionTaskParams.UserIntent;
1717
import com.yugabyte.yw.models.Customer;
18-
import com.yugabyte.yw.models.NodeAgent;
1918
import com.yugabyte.yw.models.Universe;
2019
import com.yugabyte.yw.models.helpers.NodeDetails;
2120
import java.nio.file.Files;
@@ -26,7 +25,6 @@
2625
import java.util.HashMap;
2726
import java.util.List;
2827
import java.util.Map;
29-
import java.util.Optional;
3028
import java.util.stream.Collectors;
3129
import lombok.extern.slf4j.Slf4j;
3230
import org.apache.commons.io.FileUtils;
@@ -41,7 +39,7 @@ class UniverseLogsComponent implements SupportBundleComponent {
4139
private final SupportBundleUtil supportBundleUtil;
4240
private final RuntimeConfGetter confGetter;
4341
private final String LOG_DIR_GFLAG = "log_dir";
44-
private final String YNP_LOG_DIR = "%s/node-agent/release/%s/scripts/logs";
42+
private final String YNP_LOG_DIR = "%s/node-agent/logs";
4543
private final String YNP_LOG_FILE = "app.log";
4644

4745
@Inject
@@ -278,13 +276,7 @@ public Map<String, Long> getFilesListWithSizes(
278276
}
279277

280278
private String getYnpLogDir(String nodeIp) {
281-
Optional<NodeAgent> nodeAgent = NodeAgent.maybeGetByIp(nodeIp);
282-
if (nodeAgent.isPresent()) {
283-
return String.format(
284-
YNP_LOG_DIR,
285-
confGetter.getGlobalConf(GlobalConfKeys.nodeAgentInstallPath),
286-
nodeAgent.get().getVersion());
287-
}
288-
return null;
279+
return String.format(
280+
YNP_LOG_DIR, confGetter.getGlobalConf(GlobalConfKeys.nodeAgentInstallPath));
289281
}
290282
}

0 commit comments

Comments
 (0)