Merge pull request #496 from step-security/fix-enobufs

Fix ENOBUFS issue
This commit is contained in:
Varun Sharma 2025-01-19 16:28:44 -08:00 committed by GitHub
commit cb605e52c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 11 deletions

16
dist/post/index.js vendored
View file

@ -3172,11 +3172,17 @@ var cleanup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
}
var disable_sudo = process.env.STATE_disableSudo;
if (disable_sudo !== "true") {
var journalLog = external_child_process_namespaceObject.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
try {
var journalLog = external_child_process_namespaceObject.execSync("sudo journalctl -u agent.service --lines=1000", {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
});
console.log("agent.service log:");
console.log(journalLog);
}
catch (error) {
console.log("Warning: Could not fetch service logs:", error.message);
}
}
try {
yield addSummary();

File diff suppressed because one or more lines are too long

View file

@ -82,11 +82,16 @@ import { isGithubHosted } from "./tls-inspect";
var disable_sudo = process.env.STATE_disableSudo;
if (disable_sudo !== "true") {
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
try {
var journalLog = cp.execSync("sudo journalctl -u agent.service --lines=1000", {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
});
console.log("agent.service log:");
console.log(journalLog);
} catch (error) {
console.log("Warning: Could not fetch service logs:", error.message);
}
}
try {