Bug 2106820

Summary: [Agent]: apply-host-config service is unable to connect all the hosts
Product: OpenShift Container Platform Reporter: Manoj Hans <mhans>
Component: InstallerAssignee: Zane Bitter <zbitter>
Installer sub component: Agent based installation QA Contact: Manoj Hans <mhans>
Status: RELEASE_PENDING --- Docs Contact:
Severity: medium    
Priority: high CC: asegurap, zbitter
Version: 4.12   
Target Milestone: ---   
Target Release: 4.12.0   
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: 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:

Description Manoj Hans 2022-07-13 15:18:40 UTC
Service is unable to connect the hosts when we can provide the mac addresses and hosts name from the agent-config.yaml file during the image creation.

cat agent-config.yaml
------------------------------------------------------
kind: AgentConfig
metadata:
  name: agent-config-cluster0
spec:
  hosts:
    - hostname: control-0.example.org
      interfaces:
        - name: eno1
          macAddress: 34:73:5A:9E:5B:24
    - hostname: control-1.example.org
      interfaces:
        - name: eno1
          macAddress: 34:73:5A:9E:59:1C
    - hostname: control-2.example.org
      interfaces:
        - name: eno1
          macAddress: 34:73:5A:9E:5A:BC

------------------------------------------------------

Here is the logs of the service.

Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="No config found for host"
Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="No agent found matching config at /etc/assisted/hostconfig/control-0.example.org (34:73:5A:9E:5B:24)"
Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="No agent found matching config at /etc/assisted/hostconfig/control-1.example.org (34:73:5A:9E:59:1C)"
Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="No agent found matching config at /etc/assisted/hostconfig/control-2.example.org (34:73:5A:9E:5A:BC)"
Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="Not all hosts present yet"
Jul 13 15:02:41 control-0.example.org apply-host-config[20124]: time="2022-07-13T15:02:41Z" level=info msg="Sleeping for 32s"
------------------------------------------------------

Comment 2 Manoj Hans 2022-08-01 14:22:02 UTC
Changes have been verified in the latest code. It's working fine. Hence, closing this bug.