Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
> Description of problem:
The dhcpd resource agent provides chrooted_path parameter however the default /var/lib/dhcp path is hardcoded at certain places in the agent script, therefore using this parameter doesn't give the expected results. If I set chrooted_path to anything other, following shows in the log:
Jun 2 10:49:48 virt-142 dhcpd: isc-dhcpd-4.2.5
Jun 2 10:49:48 virt-142 crmd[1674]: notice: process_lrm_event: Operation dhcpd_monitor_0: not running (node=virt-142, call=588, rc=7, cib-update=440, confirmed=true)
Jun 2 10:49:49 virt-142 dhcpd: isc-dhcpd-4.2.5
Jun 2 10:49:49 virt-142 dhcpd(dhcpd)[2052]: ERROR: could not copy /lib64/libdl.so.2 to chroot jail
Jun 2 10:49:49 virt-142 dhcpd(dhcpd)[2052]: ERROR: Could not fully initialize the chroot environment.
Jun 2 10:49:49 virt-142 lrmd[1671]: notice: operation_finished: dhcpd_start_0:2052:stderr [ cp: cannot create regular file '/var/lib/dhcp/lib*/': No such file or directory ]
Jun 2 10:49:49 virt-142 lrmd[1671]: notice: operation_finished: dhcpd_start_0:2052:stderr [ ocf-exit-reason:could not copy /lib64/libdl.so.2 to chroot jail ]
Jun 2 10:49:49 virt-142 lrmd[1671]: notice: operation_finished: dhcpd_start_0:2052:stderr [ ocf-exit-reason:Could not fully initialize the chroot environment. ]
Jun 2 10:49:49 virt-142 dhcpd: isc-dhcpd-4.2.5
Jun 2 10:49:49 virt-142 crmd[1674]: notice: process_lrm_event: Operation dhcpd_start_0: not installed (node=virt-142, call=589, rc=5, cib-update=441, confirmed=true)
Jun 2 10:49:49 virt-142 crmd[1674]: notice: process_lrm_event: virt-142-dhcpd_start_0:589 [ cp: cannot create regular file '/var/lib/dhcp/lib*/': No such file or directory\nocf-exit-reason:could not copy /lib64/libdl.so.2 to chroot jail\nocf-exit-reason:Could not fully initialize the chroot environment.\n ]
Jun 2 10:49:49 virt-142 dhcpd: isc-dhcpd-4.2.5
Jun 2 10:49:49 virt-142 dhcpd(dhcpd)[2203]: INFO: dhcpd already stopped
Jun 2 10:49:49 virt-142 crmd[1674]: notice: process_lrm_event: Operation dhcpd_stop_0: ok (node=virt-142, call=590, rc=0, cib-update=442, confirmed=true)
> Version-Release number of selected component (if applicable):
resource-agents-3.9.5-40.el7_1.3.x86_64
> How reproducible:
Always
> Steps to Reproduce:
0. create custom dhcp config in /etc/mydhcp.conf
1. pcs resource create DHCP dhcpd config=/etc/mydhcp.conf chrooted_path=/var/lib/mydhcpjail user=dhcpd group=dhcpd interface=eth0
2.
3.
> Actual results:
Libs are missing from /var/lib/mydhcpjail. See the log above.
> Expected results:
/var/lib/mydhcpjail is fully populated with required libs.
Created attachment 1033706[details]
optional patch: change default chroot path to dhcp's real default path
By default dhcp uses /var/lib/dhcpd directory. The resource agent however uses its own /var/lib/dhcp directory for chroot by default which causes problems with selinux. This patch changes the default chroot_path to the same directory as provided by dhcp rpm package.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-2190.html