Skip to content

Discovery logs are very chatty #528

Open
@Jamstah

Description

@Jamstah

On my cluster, discovery is running every 5 minutes. Every 5 minutes I get 5k of log messages. This is multiplied by the number of nodes. For each node that leaves me with 1.4M of log messages every day, mostly saying exactly the same thing.

It would be good for repeated messages to be suppressed - device has not changed and there is no need for another message.

I'm happy to propose a PR for this, if its generally agreed to be a sensible change.

For example, these messages are not helpful after the first discovery:

W0619 13:53:40.801161 16558 discovery.go:173] failed to get persistent ID for the device "nbd5". Error IDPathNotFoundError: a symlink to "nbd5" was not found in "/dev/disk/by-id/"
I0619 13:53:40.806433 16558 discovery.go:291] device "nbd5" is available

This summary is only helpful if it changes:

I0619 13:53:40.889708 16558 discovery.go:124] discovered devices: [{DeviceID: Path:/dev/nbd0 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd1 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd2 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd3 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd4 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd5 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd6 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd7 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FS...

These messages should probably be DEBUG level all the time:

I0619 13:53:40.740455 16558 diskutil.go:256] Executing command: &exec.Cmd{Path:"/usr/bin/lsblk", Args:[]string{"lsblk", "--pairs", "-b", "-o", "NAME,ROTA,TYPE,SIZE,MODEL,VENDOR,RO,RM,STATE,KNAME,SERIAL,PARTLABEL"}, Env:[]string(nil), Dir:"", Stdin:io.Reader(nil), Stdout:io.Writer(nil), Stderr:io.Writer(nil), ExtraFiles:[]*os.File(nil), SysProcAttr:(*syscall.SysProcAttr)(nil), Process:(*os.Process)(nil), ProcessState:(*os.ProcessState)(nil), ctx:context.Context(nil), Err:error(nil), Cancel:(func() error)(nil), WaitDelay:0, childIOFiles:[]io.Closer(nil), parentIOPipes:[]io.Closer(nil), goroutine:[]func() error(nil), goroutineErr:(<-chan error)(nil), ctxResult:(<-chan exec.ctxResult)(nil), createdByStack:[]uint8(nil), lookPathErr:error(nil), cachedLookExtensions:struct { in string; out string }{in:"", out:""}}
I0619 13:53:40.759196 16558 discovery.go:231] ignoring root device "vda"
I0619 13:53:40.759943 16558 discovery.go:121] valid block devices: [{Name:nbd0 KName:nbd0 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd1 KName:nbd1 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd2 KName:nbd2 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd3 KName:nbd3 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd4 KName:nbd4 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd5 KName:nbd5 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd6 KName:nbd6 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:...

Here's a snippet:

I0619 13:53:40.740455 16558 diskutil.go:256] Executing command: &exec.Cmd{Path:"/usr/bin/lsblk", Args:[]string{"lsblk", "--pairs", "-b", "-o", "NAME,ROTA,TYPE,SIZE,MODEL,VENDOR,RO,RM,STATE,KNAME,SERIAL,PARTLABEL"}, Env:[]string(nil), Dir:"", Stdin:io.Reader(nil), Stdout:io.Writer(nil), Stderr:io.Writer(nil), ExtraFiles:[]*os.File(nil), SysProcAttr:(*syscall.SysProcAttr)(nil), Process:(*os.Process)(nil), ProcessState:(*os.ProcessState)(nil), ctx:context.Context(nil), Err:error(nil), Cancel:(func() error)(nil), WaitDelay:0, childIOFiles:[]io.Closer(nil), parentIOPipes:[]io.Closer(nil), goroutine:[]func() error(nil), goroutineErr:(<-chan error)(nil), ctxResult:(<-chan exec.ctxResult)(nil), createdByStack:[]uint8(nil), lookPathErr:error(nil), cachedLookExtensions:struct { in string; out string }{in:"", out:""}}
I0619 13:53:40.759196 16558 discovery.go:231] ignoring root device "vda"
I0619 13:53:40.759943 16558 discovery.go:121] valid block devices: [{Name:nbd0 KName:nbd0 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd1 KName:nbd1 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd2 KName:nbd2 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd3 KName:nbd3 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd4 KName:nbd4 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd5 KName:nbd5 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:nbd6 KName:nbd6 Type:disk Model: Vendor: State: FSType: Size:0 Rotational:0 ReadOnly:0 Removable:0 PathByID: Serial: PartLabel:} {Name:...
W0619 13:53:40.760412 16558 discovery.go:173] failed to get persistent ID for the device "nbd0". Error IDPathNotFoundError: a symlink to "nbd0" was not found in "/dev/disk/by-id/"
I0619 13:53:40.769814 16558 discovery.go:291] device "nbd0" is available
W0619 13:53:40.770135 16558 discovery.go:173] failed to get persistent ID for the device "nbd1". Error IDPathNotFoundError: a symlink to "nbd1" was not found in "/dev/disk/by-id/"
I0619 13:53:40.778887 16558 discovery.go:291] device "nbd1" is available
W0619 13:53:40.779213 16558 discovery.go:173] failed to get persistent ID for the device "nbd2". Error IDPathNotFoundError: a symlink to "nbd2" was not found in "/dev/disk/by-id/"
I0619 13:53:40.788165 16558 discovery.go:291] device "nbd2" is available
W0619 13:53:40.788359 16558 discovery.go:173] failed to get persistent ID for the device "nbd3". Error IDPathNotFoundError: a symlink to "nbd3" was not found in "/dev/disk/by-id/"
I0619 13:53:40.795280 16558 discovery.go:291] device "nbd3" is available
W0619 13:53:40.795465 16558 discovery.go:173] failed to get persistent ID for the device "nbd4". Error IDPathNotFoundError: a symlink to "nbd4" was not found in "/dev/disk/by-id/"
I0619 13:53:40.801012 16558 discovery.go:291] device "nbd4" is available
W0619 13:53:40.801161 16558 discovery.go:173] failed to get persistent ID for the device "nbd5". Error IDPathNotFoundError: a symlink to "nbd5" was not found in "/dev/disk/by-id/"
I0619 13:53:40.806433 16558 discovery.go:291] device "nbd5" is available
W0619 13:53:40.806595 16558 discovery.go:173] failed to get persistent ID for the device "nbd6". Error IDPathNotFoundError: a symlink to "nbd6" was not found in "/dev/disk/by-id/"
I0619 13:53:40.814529 16558 discovery.go:291] device "nbd6" is available
W0619 13:53:40.814787 16558 discovery.go:173] failed to get persistent ID for the device "nbd7". Error IDPathNotFoundError: a symlink to "nbd7" was not found in "/dev/disk/by-id/"
I0619 13:53:40.822198 16558 discovery.go:291] device "nbd7" is available
W0619 13:53:40.822582 16558 discovery.go:173] failed to get persistent ID for the device "rbd0". Error IDPathNotFoundError: a symlink to "rbd0" was not found in "/dev/disk/by-id/"
I0619 13:53:40.822596 16558 discovery.go:252] device "rbd0" with filesystem "ext4" is not available
W0619 13:53:40.822710 16558 discovery.go:173] failed to get persistent ID for the device "rbd1". Error IDPathNotFoundError: a symlink to "rbd1" was not found in "/dev/disk/by-id/"
I0619 13:53:40.822721 16558 discovery.go:252] device "rbd1" with filesystem "ext4" is not available
W0619 13:53:40.822828 16558 discovery.go:173] failed to get persistent ID for the device "rbd2". Error IDPathNotFoundError: a symlink to "rbd2" was not found in "/dev/disk/by-id/"
I0619 13:53:40.822838 16558 discovery.go:252] device "rbd2" with filesystem "ext4" is not available
W0619 13:53:40.822942 16558 discovery.go:173] failed to get persistent ID for the device "rbd3". Error IDPathNotFoundError: a symlink to "rbd3" was not found in "/dev/disk/by-id/"
I0619 13:53:40.822950 16558 discovery.go:252] device "rbd3" with filesystem "ext4" is not available
W0619 13:53:40.823057 16558 discovery.go:173] failed to get persistent ID for the device "rbd4". Error IDPathNotFoundError: a symlink to "rbd4" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823063 16558 discovery.go:252] device "rbd4" with filesystem "ext4" is not available
W0619 13:53:40.823182 16558 discovery.go:173] failed to get persistent ID for the device "rbd5". Error IDPathNotFoundError: a symlink to "rbd5" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823188 16558 discovery.go:252] device "rbd5" with filesystem "ext4" is not available
W0619 13:53:40.823293 16558 discovery.go:173] failed to get persistent ID for the device "rbd6". Error IDPathNotFoundError: a symlink to "rbd6" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823301 16558 discovery.go:252] device "rbd6" with filesystem "ext4" is not available
W0619 13:53:40.823405 16558 discovery.go:173] failed to get persistent ID for the device "rbd7". Error IDPathNotFoundError: a symlink to "rbd7" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823414 16558 discovery.go:252] device "rbd7" with filesystem "ext4" is not available
W0619 13:53:40.823516 16558 discovery.go:173] failed to get persistent ID for the device "rbd8". Error IDPathNotFoundError: a symlink to "rbd8" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823524 16558 discovery.go:252] device "rbd8" with filesystem "ext4" is not available
W0619 13:53:40.823626 16558 discovery.go:173] failed to get persistent ID for the device "rbd9". Error IDPathNotFoundError: a symlink to "rbd9" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823635 16558 discovery.go:252] device "rbd9" with filesystem "ext4" is not available
W0619 13:53:40.823740 16558 discovery.go:173] failed to get persistent ID for the device "rbd10". Error IDPathNotFoundError: a symlink to "rbd10" was not found in "/dev/disk/by-id/"
I0619 13:53:40.823750 16558 discovery.go:252] device "rbd10" with filesystem "ext4" is not available
I0619 13:53:40.823802 16558 discovery.go:263] device "vda1" with part label "BIOS-BOOT" is not available
I0619 13:53:40.823868 16558 discovery.go:252] device "vda2" with filesystem "vfat" is not available
I0619 13:53:40.823944 16558 discovery.go:252] device "vda3" with filesystem "ext4" is not available
I0619 13:53:40.824036 16558 discovery.go:252] device "vda4" with filesystem "xfs" is not available
I0619 13:53:40.831365 16558 discovery.go:291] device "vdb" is available
W0619 13:53:40.831542 16558 discovery.go:173] failed to get persistent ID for the device "nbd8". Error IDPathNotFoundError: a symlink to "nbd8" was not found in "/dev/disk/by-id/"
I0619 13:53:40.838058 16558 discovery.go:291] device "nbd8" is available
W0619 13:53:40.838222 16558 discovery.go:173] failed to get persistent ID for the device "nbd9". Error IDPathNotFoundError: a symlink to "nbd9" was not found in "/dev/disk/by-id/"
I0619 13:53:40.844613 16558 discovery.go:291] device "nbd9" is available
W0619 13:53:40.844799 16558 discovery.go:173] failed to get persistent ID for the device "nbd10". Error IDPathNotFoundError: a symlink to "nbd10" was not found in "/dev/disk/by-id/"
I0619 13:53:40.850510 16558 discovery.go:291] device "nbd10" is available
W0619 13:53:40.850692 16558 discovery.go:173] failed to get persistent ID for the device "nbd11". Error IDPathNotFoundError: a symlink to "nbd11" was not found in "/dev/disk/by-id/"
I0619 13:53:40.858231 16558 discovery.go:291] device "nbd11" is available
W0619 13:53:40.858508 16558 discovery.go:173] failed to get persistent ID for the device "nbd12". Error IDPathNotFoundError: a symlink to "nbd12" was not found in "/dev/disk/by-id/"
I0619 13:53:40.867025 16558 discovery.go:291] device "nbd12" is available
W0619 13:53:40.867240 16558 discovery.go:173] failed to get persistent ID for the device "nbd13". Error IDPathNotFoundError: a symlink to "nbd13" was not found in "/dev/disk/by-id/"
I0619 13:53:40.874614 16558 discovery.go:291] device "nbd13" is available
W0619 13:53:40.874995 16558 discovery.go:173] failed to get persistent ID for the device "nbd14". Error IDPathNotFoundError: a symlink to "nbd14" was not found in "/dev/disk/by-id/"
I0619 13:53:40.882753 16558 discovery.go:291] device "nbd14" is available
W0619 13:53:40.882943 16558 discovery.go:173] failed to get persistent ID for the device "nbd15". Error IDPathNotFoundError: a symlink to "nbd15" was not found in "/dev/disk/by-id/"
I0619 13:53:40.889654 16558 discovery.go:291] device "nbd15" is available
I0619 13:53:40.889708 16558 discovery.go:124] discovered devices: [{DeviceID: Path:/dev/nbd0 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd1 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd2 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd3 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd4 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd5 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd6 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FSType: Status:{State:Available}} {DeviceID: Path:/dev/nbd7 Model: Type:disk Vendor: Serial: Size:0 Property:NonRotational FS...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions