Journal polling not working on Ubuntu 24.04

オープン
#146 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
linux, python, ubuntu

調査の方向性

Start with the reported Python snippet and the documentation's “Example: polling for journal events,” then reproduce the behavior on Ubuntu 24.04 with python3-systemd 235 and compare it with Ubuntu 22.04/version 234. Trace the Reader seek, wait, and iteration behavior; done means matching new kernel journal entries are yielded after APPEND.

索引モデルが issue の本文から書いたものです。

説明

This code was working on Ubuntu 22.04, with python3-systemd version 234:

    j = systemd.journal.Reader()
    j.this_boot()
    j.log_level(systemd.journal.LOG_INFO)
    j.add_match(SYSLOG_IDENTIFIER="kernel")

    # Seek to the end of the journal to only capture new entries
    j.seek_tail()

    while True:
        if j.wait(10):
            for entry in j:
              # do things

But on Ubuntu 24.04 and python3-systemd version 235, it is not working anymore. Especially, the "for" loop does not encounter any item. If we try to run next(j) it immediately raises StopIteration, even if j.wait(timeout) returned APPEND.

I also tried the "Example: polling for journal events" code from the documentation (https://www.freedesktop.org/software/systemd/python-systemd/journal.html#example-polling-for-journal-events) and it is not working.

主要言語
C
スター
522
フォーク
79
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

systemd/python-systemd のほかの issue

systemd/python-systemd の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。