Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Error "logger: invalid option ... multi-call binary" in network service #2684

Closed
niusmallnan opened this issue Feb 22, 2019 · 3 comments
Closed

Comments

@niusmallnan
Copy link
Contributor

niusmallnan commented Feb 22, 2019

RancherOS Version: (ros os version)
v1.5.1

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS

Boot a VM on AWS, we can get these errors by system-docker logs network:

[root@ip-172-31-14-228 rancher]# system-docker logs network
[            ] netconf:info: Apply Network Config
[            ] netconf:info: Running DHCP on eth0: dhcpcd -MA4 --timeout 10 -w --debug eth0
eth0: MTU set to 9001
logger: invalid option -- 'i'
BusyBox v1.27.2 () multi-call binary.

Usage: logger [OPTIONS] [MESSAGE]

Write MESSAGE (or stdin) to syslog

	-s	Log to stderr as well as the system log
	-t TAG	Log using the specified tag (defaults to user name)
	-p PRIO	Priority (numeric or facility.level pair)
[            ] netconf:info: Checking to see if DNS was set by DHCP
[            ] netconf:info: dns testing eth0
[            ] netconf:info: dns was dhcp set for eth0
[            ] netconf:info: DNS set by DHCP
[            ] netconf:info: Apply Network Config SyncHostname
[            ] netconf:info: Restart syslog

This is caused by 10-mtu(/lib/dhcpcd/dhcpcd-hooks/10-mtu) in dhcpcd-hook.

Now dhcpcd can handle the mtu option without this hook, so I will disable this mtu hook by default.

@niusmallnan
Copy link
Contributor Author

If I remove the /lib/dhcpcd/dhcpcd-hooks/10-mtu, the mtu can be applied to routes.

[root@ip-172-31-8-172 dhcpcd-hooks]# ip route
default via 172.31.0.1 dev eth0 src 172.31.8.172 metric 202 mtu 9001
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown

But I still get 1500 from ip link show:

[root@ip-172-31-14-228 boot]# ip link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 06:52:97:a0:56:be brd ff:ff:ff:ff:ff:ff

@niusmallnan
Copy link
Contributor Author

When syslog info is used in the hook, it will call the function in /lib/dhcpcd/dhcpcd-run-hooks.

# Write a syslog entry
syslog()
{
	local lvl="$1"

	if [ "$lvl" = debug ]; then
		${syslog_debug} || return 0
	fi
	[ -n "$lvl" ] && shift
	[ -n "$*" ] || return 0
	case "$lvl" in
	err|error)	echo "$interface: $*" >&2;;
	*)		echo "$interface: $*";;
	esac
	if type logger >/dev/null 2>&1; then
		logger -i -p daemon."$lvl" -t dhcpcd-run-hooks "$interface: $*"
	fi
}

but the busybox logger doesn't support these params:

[root@ip-172-31-14-228 rancher]# logger -i
logger: invalid option -- 'i'
BusyBox v1.27.2 () multi-call binary.

Usage: logger [OPTIONS] [MESSAGE]

Write MESSAGE (or stdin) to syslog

	-s	Log to stderr as well as the system log
	-t TAG	Log using the specified tag (defaults to user name)
	-p PRIO	Priority (numeric or facility.level pair)

@rootwuj
Copy link

rootwuj commented May 17, 2019

Tested with rancher/os:v1.5.2-rc1 with AWS from May 17
This version of the network service has no error log.
Verified fixed.

@rootwuj rootwuj closed this as completed May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants