<div dir="ltr">Hi Ian,<div><br></div><div>We were trying the same thing and the deploy fails when we use CentOS8 or Ubuntu ramdisk. Glean is able to modify the network scripts but looks like Networking/NetworkManager is not restarted after that and ip is not assigned to the interface. Manually I just did "systemctl restart NetworkManager" on the CentOS8 system and after that the deploy succeeded.</div><div><br></div><div>Is there a bug for this? and is there any plan to fix the issue ?</div><div>If there is no bug existing for the issue, I am planning to raise one.</div><div><br></div><div>The image is built using following command:</div><div>disk-image-create -o centos_deploy_image ironic-python-agent-ramdisk centos simple-init devuser selinux-permissive<br></div><div><br></div><div>As a side note, the centos7 image created using above works fine for us and the dhcpless deploy works end-to-end using ironic.</div><div><br></div><div>Regards</div><div>Nisha</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 26, 2020 at 6:51 AM Ian Wienand <<a href="mailto:iwienand@redhat.com">iwienand@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Nov 25, 2020 at 11:54:13AM +0100, Dmitry Tantsur wrote:<br>
> <br>
> # systemd-analyze critical-chain<br>
> multi-user.target @2min 6.301s<br>
> └─tuned.service @1min 32.273s +34.024s<br>
>   └─network.target @1min 31.590s<br>
>     └─network-pre.target @1min 31.579s<br>
>       └─glean@enp1s0.service @36.594s +54.952s<br>
>         └─system-glean.slice @36.493s<br>
>           └─system.slice @4.083s<br>
>             └─-.slice @4.080s<br>
> <br>
> # systemd-analyze critical-chain NetworkManager.service<br>
> NetworkManager.service +9.287s<br>
> └─network-pre.target @1min 31.579s<br>
>   └─glean@enp1s0.service @36.594s +54.952s<br>
>     └─system-glean.slice @36.493s<br>
>       └─system.slice @4.083s<br>
>         └─-.slice @4.080s<br>
<br>
> It seems that the ordering is correct and the interface service is<br>
> executed, but the IP address is nonetheless wrong. <br>
<br>
I agree, this seems to say to me that NetworkManager should run after<br>
network.pre-target, and glean@enp1s0 should be running before it.<br>
<br>
The glean@enp1s0.service is set as oneshot [1] which should prevent<br>
network-pre.target being reached until it exits:<br>
<br>
 oneshot ... [the] service manager will consider the unit up after the<br>
 main process exits. It will then start follow-up units.<br>
<br>
To the best of my knowledge the dependencies are correct; but if you<br>
go through the "git log" of the project you can find some history of<br>
us thinking ordering was correct and finding issues.<br>
<br>
> Can it be related to how long glean takes to run in my case (54 seconds vs<br>
> 1 second in your case)?<br>
<br>
The glean script doesn't run asynchronously in any way (at least not<br>
on purpose!).  I can't see any way it could exit before the ifcfg file<br>
is written out.<br>
<br>
> # cat /etc/sysconfig/network-scripts/ifcfg-enp1s0<br>
...<br>
<br>
The way NM support works is writing out this file which is read by the<br>
NM ifcfg-rh plugin [2].  AFAIK that's built-in to NM so would not be<br>
missing, and I think you'd have to go to effort to manually edit<br>
/etc/NetworkManager/conf.d/99-main-plugins.conf to have it ignored.<br>
<br>
I'm afraid that's overall not much help.  Are you sure there isn't an<br>
errant dhclient running somehow that grabs a different address?  Does<br>
it get the correct address on reboot; implying the ifcfg- file is read<br>
correctly but somehow isn't in place before NetworkManager starts?<br>
<br>
-i<br>
<br>
[1] <a href="https://opendev.org/opendev/glean/src/branch/master/glean/init/glean-nm@.service#L13" rel="noreferrer" target="_blank">https://opendev.org/opendev/glean/src/branch/master/glean/init/glean-nm@.service#L13</a><br>
[2] <a href="https://developer.gnome.org/NetworkManager/stable/nm-settings-ifcfg-rh.html" rel="noreferrer" target="_blank">https://developer.gnome.org/NetworkManager/stable/nm-settings-ifcfg-rh.html</a><br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">The Secret Of Success is learning how to use pain and pleasure, instead<br>of having pain and pleasure use you. If You do that you are in control<br>of your life. If you don't life controls you.</div>