systemd-networkd-wait-online 구성: --any에 대한 혼동

systemd-networkd-wait-online 구성: --any에 대한 혼동
 uname -a
 Linux meer 6.1.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 04 Jan 2023 16:28:15 +0000 x86_64 GNU/Linux
 

그러나 이것은 최근의 문제가 아니다. "한동안" 그랬어요. 죄송해요.

세 개의 네트워크 장치가 있고 네트워크를 시작하는 데 8초 이상이 걸립니다.

 :> systemd-analyze blame
 8.590s systemd-networkd-wait-online.service
 

wait-online플래그를 추가하는 오버레이가 있습니다 --any. 이는 첫 번째 성공적인 연결 후에 온라인 대기가 충족된다는 의미로 이해됩니다.

### Editing /etc/systemd/system/systemd-networkd-wait-online.service.d/override.
conf
### Anything between here and the comment below will become the new contents of 
the file

[Service]
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any

3개의 systemd.networkd 파일이 있습니다

> ls /etc/systemd/network/*.network
/etc/systemd/network/100-eno1.network - onboard ethernet
/etc/systemd/network/200-usb01.network - usb-ethernet
/etc/systemd/network/500-wlan0.network - wifi

내 이해는 systemd가 이러한 파일을 어휘 순서로 읽는다는 것입니다 - 100,200,500 맞습니까?

그런 다음 이 로그 조각은 해당 8초의 대부분이 100개의 파일을 읽기 전에 Wi-Fi 및 USB 이더넷과 싸우는 데 소비되었음을 보여줍니다.뒤쪽에온보드 이더넷이 작동 중입니다. Wi-Fi와 USB 이더넷을 기다리고 있습니다.

 journalctl -b -u systemd-networkd -u systemd-networkd-wait-online.service
 2023-01-07T07:01:11.167377-0800 meer systemd[1]: Starting Network Configuration...
 2023-01-07T07:01:11.259477-0800 meer systemd-networkd[310]: lo: Link UP
 2023-01-07T07:01:11.259482-0800 meer systemd-networkd[310]: lo: Gained carrier
 2023-01-07T07:01:11.259789-0800 meer systemd-networkd[310]: Enumeration completed
 2023-01-07T07:01:11.270757-0800 meer systemd[1]: Started Network Configuration.
 2023-01-07T07:01:11.286993-0800 meer systemd[1]: Starting Wait for Network to be Configured...
 2023-01-07T07:01:12.152228-0800 meer systemd-networkd-wait-online[351]: wlan0: Failed to update link state, ignoring: No such file or directory
 2023-01-07T07:01:12.365857-0800 meer systemd-networkd-wait-online[351]: eth0: Failed to update link state, ignoring: No such file or directory
 2023-01-07T07:01:12.454141-0800 meer systemd-networkd[310]: wlan0: found matching network '/etc/systemd/network/500-wlan0.network', based on potentially unpredictable inter>
 2023-01-07T07:01:12.454149-0800 meer systemd-networkd[310]: wlan0: Configuring with /etc/systemd/network/500-wlan0.network.
 2023-01-07T07:01:12.673305-0800 meer systemd-networkd[310]: eth0: Interface name change detected, renamed to eno1.
 2023-01-07T07:01:12.673353-0800 meer systemd-networkd[310]: wlan0: Link UP
 2023-01-07T07:01:12.674112-0800 meer systemd-networkd[310]: eno1: Configuring with /etc/systemd/network/100-eno1.network.
 2023-01-07T07:01:12.860420-0800 meer systemd-networkd[310]: eno1: Link UP
 2023-01-07T07:01:12.909088-0800 meer systemd-networkd[310]: wlan0: Link DOWN
 2023-01-07T07:01:12.970441-0800 meer systemd-networkd-wait-online[351]: wlan0: Failed to update link state, ignoring: No such file or directory
 2023-01-07T07:01:13.161606-0800 meer systemd-networkd[310]: wlan0: Link UP
 2023-01-07T07:01:13.172932-0800 meer systemd-networkd[310]: wlan0: Configuring with /etc/systemd/network/500-wlan0.network.
 2023-01-07T07:01:15.702912-0800 meer systemd-networkd[310]: eno1: Gained carrier
 2023-01-07T07:01:17.130156-0800 meer systemd-networkd[310]: eno1: Gained IPv6LL
 2023-01-07T07:01:17.815648-0800 meer systemd-networkd[310]: eno1: DHCPv6 address---
 2023-01-07T07:01:18.091443-0800 meer systemd-networkd[310]: wlan0: Connected WiFi access point: Hymanwallace (f8:f5:32:7d:d3:db)
 2023-01-07T07:01:18.212614-0800 meer systemd-networkd[310]: wlan0: Gained carrier
 2023-01-07T07:01:19.233866-0800 meer systemd-networkd[310]: wlan0: Gained IPv6LL
 2023-01-07T07:01:19.877409-0800 meer systemd[1]: Finished Wait for Network to be Configured.
 2023-01-07T07:01:20.001854-0800 meer systemd-networkd[310]: wlan0: DHCPv6 address ---
 2023-01-07T07:01:56.397053-0800 meer systemd-networkd[310]: eth0: Interface name change detected, renamed to usb01.
 2023-01-07T07:01:56.461015-0800 meer systemd-networkd[310]: usb01: Configuring with /etc/systemd/network/200-usb01.network.
 2023-01-07T07:01:56.468578-0800 meer systemd-networkd[310]: usb01: Link UP
 2023-01-07T07:01:59.058539-0800 meer systemd-networkd[310]: usb01: Gained carrier
 2023-01-07T07:02:00.886867-0800 meer systemd-networkd[310]: usb01: Gained IPv6LL
 2023-01-07T07:02:01.996701-0800 meer systemd-networkd[310]: usb01: DHCPv6 address -----
 ~

먼저 100개의 파일을 읽은 다음 부팅 후 시스템을 시작하고 싶습니다 eno1.

내 이해가 어디에서 잘못 되었습니까? 구성을 어떻게 수정합니까?

답변1

ExecStart재정의를 설정하기 전에 이 매개변수를 지워야 합니다. 예를 들어:

[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any

이것을 참조하세요답변
도움이 되었기를 바랍니다.

관련 정보