Bug 1973593

Summary: [Azure] Found ordering cycle on nis-domainname.service/start, and NIC is not up after boot
Product: Red Hat Enterprise Linux 8 Reporter: Yuxin Sun <yuxisun>
Component: hostnameAssignee: Pavel Zhukov <pzhukov>
Status: CLOSED DUPLICATE QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: hhei, huzhao, litian, xuli, yacao
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-18 11:54:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
journal log none

Description Yuxin Sun 2021-06-18 09:18:49 UTC
Description of problem:
Boot up a VM on Azure. Sometimes the NetworkManager service is not started, which causes the eth0 to not be up. 
Check journal log, it shows nis-domainname.service ordering cycle:

Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Found ordering cycle on nis-domainname.service/start
Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Found dependency on network-online.target/start
Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Found dependency on cloud-init.service/start
Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Found dependency on basic.target/start
Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Found dependency on sysinit.target/start
Jun 18 15:39:16 wala85sriov06170313-vm4 systemd[1]: sysinit.target: Job nis-domainname.service/start deleted to break ordering cycle starting with sysinit.target/start

Version-Release number of selected components (if applicable):
hostname-3.20-7.el8.x86_64
* hostname-3.20-6.el8.x86_64 doesn't have this issue

RHEL Version:
RHEL-8.5.0-20210616.n.0
RHEL-8.5.0-20210528.n.0

How reproducible:
5%-10%

Steps to Reproduce:
1. start a RHEL-8.5 on Azure
2. Reboot system several times. After each reboot, check if the eth0 is up.
3. Check journal log

Actual results:
Sometimes the eth0 is not up because NetworkManager service is not started.

Expected results:
NetworkManager service is started every time.

Additional info:
Script to reboot VM from outside and check network:
# cat reboot_outside.sh
#!/bin/bash

HOST="20.185.148.35"

function _instanceWaitSSH() {
  local HOST="$1"

  for LOOP_COUNTER in {0..30}; do
      if ssh-keyscan "$HOST" > /dev/null 2>&1; then
          echo "SSH is up!"
          break
      fi
      echo "Retrying in 5 seconds... $LOOP_COUNTER"
      sleep 5
  done
}

for i in {1..100}; do
  echo "=================== round $i ===================="
  ssh -oStrictHostKeyChecking=no root@$HOST reboot
  sleep 20
  _instanceWaitSSH $HOST
done

Comment 1 Yuxin Sun 2021-06-18 09:33:45 UTC
Created attachment 1792010 [details]
journal log

Comment 2 Pavel Zhukov 2021-06-18 11:54:42 UTC

*** This bug has been marked as a duplicate of bug 1959720 ***