Skip to content

Support epoll for /proc/sys/kernel/hostname #13396

Description

@relkochta

journald and resolved use it to monitor for system hostname changes:

I0609 22:08:19.757625       1 strace.go:570] [  18:  18] systemd-journal E openat(AT_FDCWD /, 0x5569b6b4ce23 /proc/sys/kernel/hostname, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, 0o0)
I0609 22:08:19.757657       1 strace.go:608] [  18:  18] systemd-journal X openat(AT_FDCWD /, 0x5569b6b4ce23 /proc/sys/kernel/hostname, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, 0o0) = 8 (0x8) (20.09µs)
I0609 22:08:19.757695       1 strace.go:570] [  18:  18] systemd-journal E epoll_ctl(0x6 anon_inode:[eventpoll], EPOLL_CTL_ADD, 0x8 /proc/sys/kernel/hostname, 0x7edefd6a582c {events=0x0 data=[-0x494a6c50, 0x5569]})
I0609 22:08:19.757710       1 strace.go:608] [  18:  18] systemd-journal X epoll_ctl(0x6 anon_inode:[eventpoll], EPOLL_CTL_ADD, 0x8 /proc/sys/kernel/hostname, 0x7edefd6a582c {events=0x0 data=[-0x494a6c50, 0x5569]}) = 0 (0x0) (4.869µs)
I0609 22:10:00.162280       1 strace.go:570] [ 275: 275] systemd-resolve E openat(AT_FDCWD /, 0x5652dc14175b /proc/sys/kernel/hostname, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, 0o0)
I0609 22:10:00.162324       1 strace.go:608] [ 275: 275] systemd-resolve X openat(AT_FDCWD /, 0x5652dc14175b /proc/sys/kernel/hostname, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, 0o0) = 9 (0x9) (26.065µs)
I0609 22:10:00.162424       1 strace.go:570] [ 275: 275] systemd-resolve E epoll_ctl(0x6 anon_inode:[eventpoll], EPOLL_CTL_ADD, 0x9 /proc/sys/kernel/hostname, 0x7eb9f1cf988c {events=0x0 data=[-0x23d3bda0, 0x5652]})
I0609 22:10:00.162448       1 strace.go:608] [ 275: 275] systemd-resolve X epoll_ctl(0x6 anon_inode:[eventpoll], EPOLL_CTL_ADD, 0x9 /proc/sys/kernel/hostname, 0x7eb9f1cf988c {events=0x0 data=[-0x23d3bda0, 0x5652]}) = 0 (0x0) (6.579µs)
I0609 22:10:00.207271       1 strace.go:570] [ 275: 275] systemd-resolve E epoll_ctl(0x6 anon_inode:[eventpoll], EPOLL_CTL_DEL, 0x9 /proc/sys/kernel/hostname, 0x0 {error reading event: bad address})

Metadata

Metadata

Assignees

No one assigned

    Labels

    systemdStuff we need to support systemdtype: enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions