{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/48","repository_url":"https://api.github.com/repos/kubernetes/node-problem-detector","labels_url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/48/comments","events_url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/48/events","html_url":"https://github.com/kubernetes/node-problem-detector/issues/48","id":194470669,"number":48,"title":"\"startPattern\" is fragile and wrong on newer kernels","user":{"login":"euank","id":2147649,"avatar_url":"https://avatars.githubusercontent.com/u/2147649?v=3","gravatar_id":"","url":"https://api.github.com/users/euank","html_url":"https://github.com/euank","followers_url":"https://api.github.com/users/euank/followers","following_url":"https://api.github.com/users/euank/following{/other_user}","gists_url":"https://api.github.com/users/euank/gists{/gist_id}","starred_url":"https://api.github.com/users/euank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euank/subscriptions","organizations_url":"https://api.github.com/users/euank/orgs","repos_url":"https://api.github.com/users/euank/repos","events_url":"https://api.github.com/users/euank/events{/privacy}","received_events_url":"https://api.github.com/users/euank/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-08T23:17:08Z","updated_at":"2016-12-08T23:45:20Z","closed_at":null,"body":"Broken out from [here](https://github.com/kubernetes/node-problem-detector/pull/39#issuecomment-265877841)\r\n\r\nCurrently, the config has a default of `\"startPattern\": \"Initializing cgroup subsys cpuset\",`\r\n\r\nThis pattern is meant to detect a node's boot process. Prior to the 4.5 kernel, this message was typically printed during boot of a node. After 4.5 however, due to [this change](https://github.com/torvalds/linux/commit/a5ae989957cbc3f3b7bc40677bd9e459c0917528), it is quite unlikely for that message to appear.\r\n\r\n\r\nFurthermore, there's rarely a reason to detect whether a message is for the current boot in such a fragile way.\r\n\r\nWith the `kern.log` reader, every message is for the current boot because kern.log is usually handled where each `kern.log` file corresponds to one boot (e.g. `kern.log` is this boot, `kern.log.1` is the boot before, `kern.log.2.gz` the one before, etc).\r\n\r\nWith journald, the boot id is annotated in messages, and so it can accurately be correlated with the current boot id (see the \"_BOOT_ID\" record in journald messages).\r\n\r\nWith a kmsg reader, all messages will only be the current boot because kmsg is not persistent.\r\n\r\nIn none of those cases is `startPattern` useful. Each kernel log parsing plugin should be responsible for doing the right thing itself I think."},"comment":{"url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/comments/265890300","html_url":"https://github.com/kubernetes/node-problem-detector/issues/48#issuecomment-265890300","issue_url":"https://api.github.com/repos/kubernetes/node-problem-detector/issues/48","id":265890300,"user":{"login":"Random-Liu","id":5821883,"avatar_url":"https://avatars.githubusercontent.com/u/5821883?v=3","gravatar_id":"","url":"https://api.github.com/users/Random-Liu","html_url":"https://github.com/Random-Liu","followers_url":"https://api.github.com/users/Random-Liu/followers","following_url":"https://api.github.com/users/Random-Liu/following{/other_user}","gists_url":"https://api.github.com/users/Random-Liu/gists{/gist_id}","starred_url":"https://api.github.com/users/Random-Liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Random-Liu/subscriptions","organizations_url":"https://api.github.com/users/Random-Liu/orgs","repos_url":"https://api.github.com/users/Random-Liu/repos","events_url":"https://api.github.com/users/Random-Liu/events{/privacy}","received_events_url":"https://api.github.com/users/Random-Liu/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T23:45:20Z","updated_at":"2016-12-08T23:45:20Z","body":"When the NPD is introduced, we are still running on ContainerVM. At that time, we only have kern.log, and it's hard to a identify a reboot without define a `StartPattern`.\r\n\r\nInitially I was using the kernel timestamp `[    0.000000]`, but changed to the \"start pattern\" later.\r\n\r\nLet me see whether I could find some relation between boot id and kern.log. I think using boot id is the best solution, and journald is so convenient. Haha "}}
{"actor":{"display_login":"Random-Liu"}}