Bug 1187967
| Summary: | Can't run dhcrelay and dhcrelay6 simultaneously | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Michal Bruncko <michal.bruncko> | ||||
| Component: | dhcp | Assignee: | Jiri Popelka <jpopelka> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.6 | CC: | ljozsa, pholica, pkotvan, thozza | ||||
| Target Milestone: | rc | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | dhcp-4.1.1-49.P1.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause
Trying to run dhcrelay and dhcrelay6 services simultaneously.
Consequence
The later service does not start.
Fix
dhcrelay6 init script was fixed.
Result
It's possible to run both dhcrelay and dhcrelay6 services at the same time.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-07-22 05:39:59 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Changing rh_status() function to use pidfile is not enough. I have do it following as well: ln -s /usr/sbin/dhcrelay /usr/sbin/dhcrelay6 and update dhcrelay6 init script: prog=dhcrelay6 exec=/usr/sbin/dhcrelay6 but this is by mi opinion dirty workaround :) not sure how to make this more clear :) Created attachment 993922 [details] fixed dhcrelay6 init script (In reply to Michal Bruncko from comment #0) > Can't run dhcrelay and dhcrelay6 simultaneously. Oh, that's a fail. I'm sorry. Looks like neither commiter (bug #1053155, commit#5) nor QA (bug #1053155, commit#7) actually tested that. (In reply to Michal Bruncko from comment #2) > Changing rh_status() function to use pidfile is not enough. Yes, it also needs to know a lockfile and the pidfile needs to be added also to daemon & killproc calls. I tried to verify this on RHEL-6.7-20150429.0 with RHEL-6.7-20150429.0. If dhcrelay6 is started first, then dhcrelay does not report anything. If dhcrelay is stopped, dhcrelay6 ends up dead with pidfile still existing. [root@localhost ~]# ps aux | grep dhcrelay root 3249 0.0 0.0 103304 884 pts/0 S+ 06:07 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* ls: cannot access /var/run/dhcre*: No such file or directory [root@localhost ~]# service dhcrelay6 start Starting dhcrelay (DHCPv6): [ OK ] [root@localhost ~]# ps aux | grep dhcrelay root 3273 0.0 0.0 6944 612 ? Ss 06:07 0:00 /usr/sbin/dhcrelay -6 -l eth0 -u eth1 root 3276 0.0 0.0 103304 884 pts/0 S+ 06:07 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* /var/run/dhcrelay6.pid [root@localhost ~]# service dhcrelay start [root@localhost ~]# ps aux | grep dhcrelay root 3273 0.0 0.0 6944 612 ? Ss 06:07 0:00 /usr/sbin/dhcrelay -6 -l eth0 -u eth1 root 3295 0.0 0.0 103304 884 pts/0 S+ 06:07 0:00 grep dhcrelay [root@localhost ~]# service dhcrelay stop Shutting down dhcrelay: [ OK ] [root@localhost ~]# service dhcrelay6 status dhcrelay dead but pid file exists [root@localhost ~]# ps aux | grep dhcrelay root 25662 0.0 0.0 103308 840 pts/0 S+ 06:14 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* /var/run/dhcrelay6.pid [root@localhost ~]# In case dhcrelay was started first observe: [root@localhost ~]# ps aux | grep dhcrelay root 3318 0.0 0.0 103304 884 pts/0 S+ 06:08 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* ls: cannot access /var/run/dhcre*: No such file or directory [root@localhost ~]# service dhcrelay start Starting dhcrelay: [ OK ] [root@localhost ~]# ps aux | grep dhcrelay root 3343 0.0 0.0 6648 292 ? Ss 06:08 0:00 /usr/sbin/dhcrelay -i eth1 192.168.122.1 root 3346 0.0 0.0 103304 884 pts/0 S+ 06:08 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* /var/run/dhcrelay.pid [root@localhost ~]# service dhcrelay6 start Starting dhcrelay (DHCPv6): [ OK ] [root@localhost ~]# ps aux | grep dhcrelay root 3343 0.0 0.0 6648 292 ? Ss 06:08 0:00 /usr/sbin/dhcrelay -i eth1 192.168.122.1 root 3368 0.0 0.0 6944 612 ? Ss 06:08 0:00 /usr/sbin/dhcrelay -6 -l eth0 -u eth1 root 3371 0.0 0.0 103304 884 pts/0 S+ 06:09 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* /var/run/dhcrelay6.pid /var/run/dhcrelay.pid [root@localhost ~]# service dhcrelay stop Shutting down dhcrelay: [ OK ] [root@localhost ~]# ps aux | grep dhcrelay root 3368 0.0 0.0 6944 612 ? Ss 06:08 0:00 /usr/sbin/dhcrelay -6 -l eth0 -u eth1 root 3392 0.0 0.0 103304 880 pts/0 S+ 06:09 0:00 grep dhcrelay [root@localhost ~]# ls /var/run/dhcre* /var/run/dhcrelay6.pid [root@localhost ~]# service dhcrelay status dhcrelay (pid 3368) is running... [root@localhost ~]# Moving back to assigned. Reproduced on RHEL-6.6 x86_64 Server and verified on RHEL-6.7-20150506.0 x86_64 Server with dhcp-4.1.1-49.P1.el6.x86_64 (including issue in comment 7 ). Moving to VERIFIED. 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-1258.html |
Description of problem: Can't run dhcrelay and dhcrelay6 simultaneously. I.e once one dhcrelay daemon (either IPv4 or IPv6 version) is running, I can't run the next one (for other IP protocol). Version-Release number of selected component (if applicable): dhcp-4.1.1-43.P1.el6 How reproducible: always Steps to Reproduce: 1. run for example IPv4 version of dhcrelay (/etc/init.d/dhcrelay start) 2. confirm that it is running 3. now start IPv6 dhcrelay as well (/etc/init.d/dhcrelay6 start) Actual results: nothing happen - i.e. dhcrelay for IPv6 will not start. same happen when I start with IPv6 dhcrelay firstly and followed with IPv4 dhcrelay Expected results: I can run both IPv4 and IPv6 relays on same host Additional info: the problem is in rh_status_q() fucntion: rh_status() { status $exec } as because both IPv4 and IPv6 dhcrelays have same binary, "status $exec" will match already running dhcrelay. per my understanding this could be fixed with using status check with PID file: rh_status() { status -p $pidfile } both init files (/etc/init.d/dhcrelay and /etc/init.d/dhcrelay6) contains same rh_status_q() function body. ps: this is follow up of BZ1053155