Anonymous | Login | 2024-05-21 10:59 EDT |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||
0000327 | PacketFence 1.7 | public | 2008-05-28 14:59 | 2008-06-02 11:45 | ||||
Reporter | jsnapp | |||||||
Assigned To | user4 | |||||||
Priority | normal | Severity | minor | Reproducibility | always | |||
Status | closed | Resolution | fixed | |||||
Platform | OS | OS Version | ||||||
Product Version | ||||||||
Target Version | Fixed in Version | |||||||
Summary | 0000327: httpd takes a while to stop which can prevent iptables.bak from being restored. | |||||||
Description | httpd takes a while to stop which can prevent iptables.bak from being restored. I was able to recreate this consistently simply by running the following commands. pfcmd httpd start pfcmd httpd restart pfcmd httpd stop After the stop command runs the iptables.bak have not been restored which leaves iptables running with PF's config. This is because httpd was still running when the test for restore_iptables call was run. Then if the "pfcmd httpd start" command is run PF's iptables entries are mistakenly backed up to iptables.bak causing even more confusion. This problem also prevents the command "service packetfence restart" from successfully restarting httpd. I've consistently found that it restarts all other PF processes except httpd which ends up in a stopped state. IMHO, a sufficient fix only requires adding a "sleep" command immediately after any PF process is killed inside the "service_ctl" function in pf/lib/pf/services.pm. --- services.pm.old 2008-05-28 14:36:50.000000000 -0400 +++ services.pm 2008-05-28 14:37:05.000000000 -0400 @@ -72,6 +72,7 @@ open(STDERR,">/dev/null"); #my @debug= system('pkill','-f',$exe); my @debug= system('pkill',$exe); + sleep 2; last CASE; }; $action eq "restart" && do { | |||||||
Tags | No tags attached. | |||||||
fixed in mtn revision | ||||||||
Attached Files | ||||||||
Relationships | ||||||
|
Notes | |
(0000722) user4 2008-05-30 21:54 |
--- pf/lib/pf/services.pm 4f11b857233e40ae760e8c2bf1e07aec9b00b9be +++ pf/lib/pf/services.pm 58ab7c51e15e3384b4997088ab0ed99c23caa02b @@ -72,6 +72,13 @@ sub service_ctl { open(STDERR,">/dev/null"); #my @debug= system('pkill','-f',$exe); my @debug= system('pkill',$exe); + my $maxWait = 10; + my $curWait = 0; + while (($curWait < $maxWait) && (service_ctl($exe) != 0)) { + pflogger("Waiting for $exe to stop"); + sleep(2); + $curWait++; + } last CASE; }; $action eq "restart" && do { |
(0000723) user4 2008-05-30 21:56 |
fixed in mtn revision a53f43a139ca5e80aa6b194d9554f8483fe1eb7e |
(0000725) user4 2008-06-02 11:43 |
the fix unfortunately contained a typo |
(0000726) user4 2008-06-02 11:43 |
# # old_revision [a53f43a139ca5e80aa6b194d9554f8483fe1eb7e] # # patch "pf/lib/pf/services.pm" # from [58ab7c51e15e3384b4997088ab0ed99c23caa02b] # to [f3b2ad8f2a178ecf8716fa4c58244a3fb26b05c2] # ============================================================ --- pf/lib/pf/services.pm 58ab7c51e15e3384b4997088ab0ed99c23caa02b +++ pf/lib/pf/services.pm f3b2ad8f2a178ecf8716fa4c58244a3fb26b05c2 @@ -74,7 +74,7 @@ sub service_ctl { my @debug= system('pkill',$exe); my $maxWait = 10; my $curWait = 0; - while (($curWait < $maxWait) && (service_ctl($exe) != 0)) { + while (($curWait < $maxWait) && (service_ctl($exe,"status") != 0)) { pflogger("Waiting for $exe to stop"); sleep(2); $curWait++; |
(0000728) user4 2008-06-02 11:45 |
fixed in mtn revision fd26871f92e6b9227e9bbdce89e9c53ea809e547 |
Issue History | |||
Date Modified | Username | Field | Change |
2008-05-28 14:59 | jsnapp | New Issue | |
2008-05-28 23:08 | user4 | Relationship added | related to 0000324 |
2008-05-28 23:08 | user4 | Status | new => assigned |
2008-05-28 23:08 | user4 | Assigned To | => user4 |
2008-05-30 21:54 | user4 | Note Added: 0000722 | |
2008-05-30 21:56 | user4 | Status | assigned => closed |
2008-05-30 21:56 | user4 | Note Added: 0000723 | |
2008-05-30 21:56 | user4 | Resolution | open => fixed |
2008-06-02 11:43 | user4 | Status | closed => feedback |
2008-06-02 11:43 | user4 | Resolution | fixed => reopened |
2008-06-02 11:43 | user4 | Note Added: 0000725 | |
2008-06-02 11:43 | user4 | Note Added: 0000726 | |
2008-06-02 11:45 | user4 | Status | feedback => closed |
2008-06-02 11:45 | user4 | Note Added: 0000728 | |
2008-06-02 11:45 | user4 | Resolution | reopened => fixed |
Copyright © 2000 - 2012 MantisBT Group |