To clarify as I am the guy who wrote that code:
The existence of any config. file in /etc/cni/net.d tells podman to use
the "old" CNI networking system.
This is not correct. If you only have the default "podman" cni config file it will be ignored by the backend detection and choose netavark.
The reason you see the warning is because the code first tries to init the cni backend to check how many networks are configured.
This init will also validate the files and thus throw the warning. When we know that you only have the default config we configure
netavark and then store this decision in the `defaultNetworkBackend` file in graphroot. SO that is why the warning will only be displayed
for the first command.
As mentioned the correct way to fix this is to either remove the config file or configure the network backend in containers.conf to not go
through the auto detection logic. You could also install containernetworking-plugins to make the warning go away but this isn't needed
because you use netavark.
Basically the whole idea behind this logic was to support upgrades from 3.X to 4.0 without forcing netavark on them while new installs
should default to netavark.
---
Paul