diff --git a/docs/changelog/86990.yaml b/docs/changelog/86990.yaml new file mode 100644 index 0000000000000..379d2170013ab --- /dev/null +++ b/docs/changelog/86990.yaml @@ -0,0 +1,5 @@ +pr: 86990 +summary: Adjust osprobe assertion for burst cpu +area: Infra/Core +type: bug +issues: [] diff --git a/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java b/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java index fc0de10b75aaf..7778ff7efa4a4 100644 --- a/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java +++ b/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java @@ -463,6 +463,13 @@ private OsStats.Cgroup.CpuStat getCgroupCpuAcctCpuStat(final String controlGroup * nr_throttled} is the number of times tasks in the given control group have been throttled, and {@code throttled_time} is the total * time in nanoseconds for which tasks in the given control group have been throttled. * + * If the burst feature of the scheduler is enabled, the statistics contain an additional two fields of the form + *
+     * nr_bursts \d+
+     * burst_time
+     * 
+ * These additional fields are currently ignored. + * * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code cpu} subsystem * @return the lines from {@code cpu.stat} * @throws IOException if an I/O exception occurs reading {@code cpu.stat} for the control group @@ -470,7 +477,7 @@ private OsStats.Cgroup.CpuStat getCgroupCpuAcctCpuStat(final String controlGroup @SuppressForbidden(reason = "access /sys/fs/cgroup/cpu") List readSysFsCgroupCpuAcctCpuStat(final String controlGroup) throws IOException { final List lines = Files.readAllLines(PathUtils.get("/sys/fs/cgroup/cpu", controlGroup, "cpu.stat")); - assert lines != null && lines.size() == 3; + assert lines != null && (lines.size() == 3 || lines.size() == 5); return lines; }