sys-apps/systemd: add workaround for race condition with GKE networking

One of GKE's stack components renames interfaces to move them into
container and this rename triggers a race condition that causes
interface to adopt zz-default.network config. This config lacks some
of the critical config entries:
  - RoutesToDNS=false
  - RoutesToNTP=false
  - UseHostname=false

The lack of UseHostname causes node hostname to revert back to localhost
whenever the interface link is lost or interface is shut down by software.

The root cause of the issue is the following race condition:
  - networkd receives notification that new interface is available (or up)
    and calls link_update
  - link_update caches the interface name
  - a bit after this external logic renames interface to gketmpNNN
  - link_update calls link_update_driver, which in turn calls
    ethtool_get_driver that tries to get driver by the cached
    interface name, hence the error message above
  - Driver= filter fails and configuration falls back to zz-default.network

This change removes Driver clause from the Match section and adds eth* filter
to make sure only non-virtual interfaces are affected.

BUG=b/356677496
TEST=presubmit
RELEASE_NOTE=None

Change-Id: Ide6af6cca7fc28e37f174cb6d6756b727ee1c76f
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/78059
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Kevin Berry <kpberry@google.com>
2 files changed