Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1908462: manifest: Re-add dhclient #486

Merged
merged 3 commits into from Jan 26, 2021

Conversation

LorbusChris
Copy link
Member

@LorbusChris LorbusChris commented Jan 18, 2021

With this, the dhclient binaries are added back to the RHCOS base.
Usage of dhclient as DHCP client in the initramfs remains unsupported.
In the real root, dhclient can be used as long as a configuration is provided.

In order to activate dhclient and use it instead of NetworkManager's internal DHCP client in the real root,
the user has to provide a configuration snippet via Ignition to configure NM to use dhclient,
e.g. in /etc/NetworkManager/conf.d/dhclient.conf:

[main]
dhcp=dhclient

Notably, the NetworkManager dispatcher script for dhclient.d config snippets remains excluded from the image.
This means if the admin desires to e.g. configure NTP via DHCP using dhclient,
a NM dispatcher script must be provided and placed at /etc/NetworkManager/dispatcher.d/11-dhclient ([1]),
so the /etc/dhcp/dhclient.d/chrony.sh script that is shipped with the chrony package is executed.

[1] https://src.fedoraproject.org/rpms/dhcp/blob/master/f/11-dhclient

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1908462

@miabbott
Copy link
Member

/retitle Bug 1908462: manifest: Re-add dhclient

@openshift-ci-robot openshift-ci-robot changed the title manifest: Re-add dhclient Bug 1908462: manifest: Re-add dhclient Jan 18, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jan 18, 2021
@openshift-ci-robot
Copy link

@LorbusChris: This pull request references Bugzilla bug 1908462, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1908462: manifest: Re-add dhclient

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jlebon
Copy link
Member

jlebon commented Jan 18, 2021

Can you add a link to the related RHBZ(s) in the commit message?

manifest.yaml Outdated Show resolved Hide resolved
@miabbott
Copy link
Member

Please test that the default DHCP client of an RHCOS system going from 4.6 -> 4.7 is not changed by the addition of the binaries.

Additionally, test that using a conf file to configure NM to use dhclient works properly in 4.7

@openshift-ci-robot
Copy link

@LorbusChris: This pull request references Bugzilla bug 1908462, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1908462: manifest: Re-add dhclient

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cgwalters
Copy link
Member

cgwalters commented Jan 18, 2021

Should be fairly easy to add a kola test case for this that provides that Ignition config and uses e.g. journalctl -u NetworkManager --grep=dhclient or so?

And similarly, we could change our misc-ro test case to look for the internal dhcp (not dhclient).

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
/lgtm

@cgwalters
Copy link
Member

/approve

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 22, 2021
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@cgwalters
Copy link
Member

 --- FAIL: ext.config.chrony.dhcp-propagation (586.14s)
        harness.go:709: kolet failed: : kolet run-test-unit failed: Error: Unit kola-runext.service exited with code 1 

Interesting. It's possible this is related.

@cgwalters
Copy link
Member

/lgtm cancel
I don't think CI is going to succeed here, let's see if it's actually an issue on this PR or if something happened to break elsewhere.

@LorbusChris
Copy link
Member Author

/hold

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 22, 2021
@cgwalters
Copy link
Member

OK and I verified that building locally current git master running kola run 'ext.*dhcp*' passes, but building from this PR it fails. Why it fails though is not obvious to me yet...

To debug locally use e.g. kola run 'ext.*dhcp*' --ssh-on-test-failure.

@LorbusChris LorbusChris force-pushed the re-add-dhclient branch 3 times, most recently from 9ec40ac to f499384 Compare January 25, 2021 15:54
@LorbusChris
Copy link
Member Author

LorbusChris commented Jan 25, 2021

Hm ok, it seems this issue is triggered by the re-addition of the dhclient binaries.

The NTP server specified in the chrony/dhcp-propagation test does not seem to show up, although others do:

systemctl status kola-runext.service:
● kola-runext.service
   Loaded: loaded (/etc/systemd/system/kola-runext.service; static; vendor preset: disabled)
   Active: deactivating (stop-sigterm) (Result: exit-code) since Mon 2021-01-25 16:40:26 UTC; 509ms ago
  Process: 1667 ExecStart=/usr/local/bin/kola-runext-dhcp-propagation (code=exited, status=1/FAILURE)
 Main PID: 1667 (code=exited, status=1/FAILURE)
    Tasks: 2 (limit: 5632)
   Memory: 342.2M
   CGroup: /system.slice/kola-runext.service
           └─5789 /usr/bin/conmon --api-version 1 -c a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7 -u a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7 -r /usr/bin/runc -b /var/lib/containers/storage/overlay-containers/a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7/userdata -p /var/run/containers/storage/overlay-containers/a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7/userdata/pidfile -n dnsmasq --exit-dir /var/run/libpod/exits --socket-dir-path /var/run/libpod/socket -s -l k8s-file:/var/lib/containers/storage/overlay-containers/a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7/userdata/ctr.log --log-level error --runtime-arg --log-format=json --runtime-arg --log --runtime-arg=/var/run/containers/storage/overlay-containers/a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7/userdata/oci-log --conmon-pidfile /var/run/containers/storage/overlay-containers/a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7/userdata/conmon.pid --exit-command /usr/bin/podman --exit-command-arg --root --exit-command-arg /var/lib/containers/storage --exit-command-arg --runroot --exit-command-arg /var/run/containers/storage --exit-command-arg --log-level --exit-command-arg error --exit-command-arg --cgroup-manager --exit-command-arg systemd --exit-command-arg --tmpdir --exit-command-arg /var/run/libpod --exit-command-arg --runtime --exit-command-arg runc --exit-command-arg --storage-driver --exit-command-arg overlay --exit-command-arg --storage-opt --exit-command-arg overlay.mountopt=nodev,metacopy=on --exit-command-arg --events-backend --exit-command-arg file --exit-command-arg container --exit-command-arg cleanup --exit-command-arg --rm --exit-command-arg a015f98074271bdd4b87a288694f986390f5b4e2c2420bc8e51b7982975b90b7

Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: ^* ntp1.as34288.net              2   6   377    32   -409us[ -440us] +/-   54ms
Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: ^+ littlericket.me               2   6   377    32   -446us[ -446us] +/-   57ms
Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: ^+ contime002.conova.com         1   6   377    30   +748us[ +748us] +/-   57ms != *\t\i\m\e\-\c\-\g\.\n\i\s\t\.\g\o\v* ]]
Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: + echo 'waiting for ntp server to appear'
Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: waiting for ntp server to appear
Jan 25 16:40:24 qemu0 kola-runext-dhcp-propagation[1667]: + sleep 1
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + retries=1
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + [[ 1 -gt 0 ]]
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + [[ ! 210 Number of sources = 4
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: MS Name/IP address         Stratum Poll Reach LastRx Last sample
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ===============================================================================
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ ntp.redimadrid.es             2   6   377    33   -928us[ -960us] +/-   79ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^* ntp1.as34288.net              2   6   377    32   -409us[ -440us] +/-   54ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ littlericket.me               2   6   377    32   -446us[ -446us] +/-   57ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ contime002.conova.com         1   6   377    30   +748us[ +748us] +/-   57ms =~ time-c-g\.nist\.gov ]]
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ++ chronyc sources
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + NTPSERVER='210 Number of sources = 4
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: MS Name/IP address         Stratum Poll Reach LastRx Last sample
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ===============================================================================
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ ntp.redimadrid.es             2   6   377    34   -928us[ -960us] +/-   79ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^* ntp1.as34288.net              2   6   377    33   -409us[ -440us] +/-   54ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ littlericket.me               2   6   377    33   -446us[ -446us] +/-   57ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ contime002.conova.com         1   6   377    31   +748us[ +748us] +/-   57ms'
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + [[ 210 Number of sources = 4
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: MS Name/IP address         Stratum Poll Reach LastRx Last sample
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ===============================================================================
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ ntp.redimadrid.es             2   6   377    34   -928us[ -960us] +/-   79ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^* ntp1.as34288.net              2   6   377    33   -409us[ -440us] +/-   54ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ littlericket.me               2   6   377    33   -446us[ -446us] +/-   57ms
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: ^+ contime002.conova.com         1   6   377    31   +748us[ +748us] +/-   57ms != *\t\i\m\e\-\c\-\g\.\n\i\s\t\.\g\o\v* ]]
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + echo 'waiting for ntp server to appear'
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: waiting for ntp server to appear
Jan 25 16:40:25 qemu0 kola-runext-dhcp-propagation[1667]: + sleep 1
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: + retries=0
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: + [[ 0 -gt 0 ]]
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: + '[' 0 -eq 0 ']'
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: + echo 'propagation of ntp server information via dhcp failed'
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: propagation of ntp server information via dhcp failed
Jan 25 16:40:26 qemu0 kola-runext-dhcp-propagation[1667]: + exit 1
Jan 25 16:40:26 qemu0 systemd[1]: kola-runext.service: Main process exited, code=exited, status=1/FAILURE
--- FAIL: ext.config.chrony.dhcp-propagation (560.35s)
        harness.go:709: kolet failed: : kolet run-test-unit failed: Error: Unit kola-runext.service exited with code 1
2021-01-25T16:40:26Z cli: Unit kola-runext.service exited with code 1: Process exited with status 1

With this, the dhclient binaries are added back to the RHCOS base.
Usage of dhclient as DHCP client in the initramfs remains unsupported.
In the real root, dhclient can be used as long as a configuration is provided.

In order to activate dhclient and use it instead of NetworkManager's internal DHCP client in the real root,
the user has to provide a configuration snippet via Ignition to configure NM to use dhclient,
e.g. in `/etc/NetworkManager/conf.d/dhclient.conf`:
```
[main]
dhcp=dhclient
```

Notably, the NetworkManager dispatcher script for dhclient.d config snippets remains excluded from the image.
This means if the admin desires to e.g. configure NTP via DHCP using dhclient,
a NM dispatcher script must be provided and placed at `/etc/NetworkManager/dispatcher.d/11-dhclient` ([1]),
so the `/etc/dhcp/dhclient.d/chrony.sh` script that is shipped with the chrony package is executed.

[1] https://src.fedoraproject.org/rpms/dhcp/blob/master/f/11-dhclient

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1908462
Adds a test to `misc-ro` to ensure that NetworkManager's internal DHCP
client is used by default.
Adds a test that ensures dhclient can be used with a config provided
via Ignition that explicitly enables it.
@openshift-ci-robot
Copy link

@LorbusChris: This pull request references Bugzilla bug 1908462, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1908462: manifest: Re-add dhclient

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
We can do further refinements as followups. Nice job debugging!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, LorbusChris

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 26, 2021
@LorbusChris
Copy link
Member Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 2944024 into openshift:master Jan 26, 2021
@openshift-ci-robot
Copy link

@LorbusChris: All pull requests linked via external trackers have merged:

Bugzilla bug 1908462 has been moved to the MODIFIED state.

In response to this:

Bug 1908462: manifest: Re-add dhclient

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants