Skip to content

Commit

Permalink
Merge pull request #2734 from nickanderson/ENT-9698/3.18.x
Browse files Browse the repository at this point in the history
ENT-9698: Ensured manual edits to httpd.conf are reverted (3.18)
  • Loading branch information
nickanderson authored Sep 21, 2023
2 parents 49316da + 9a879b8 commit 8735dea
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
(CFE-4242, CFE-4245, CFE-4246)
- Stopped filtering $(sys.bindir) from dynamically determined python path
(CFE-4223)
- Ensured manual edits to httpd.conf are reverted (ENT-9698)

3.18.5:
- Adjusted dump.sh for multiple runs in between superhub imports (ENT-10274)
Expand Down
19 changes: 17 additions & 2 deletions cfe_internal/enterprise/mission_portal.cf
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ bundle agent mission_portal_apache_from_stage(config, staged_config)
comment => "Without an apache config, Mission Mortal and Enterprise API
services will not work";

"$(config)"
"$(config)" -> { "ENT-9686" }
copy_from => local_dcp( $(staged_config) ),
handle => "cfapache_httpd_conf_from_staged",
if => and( or( "apache_stop_after_new_staged_config_repaired",
not( fileexists( "$(httpd_pid_file)" ) )),
not( fileexists( "$(httpd_pid_file)" ) ),
isnewerthan( $(config), $(staged_config) ) ),
returnszero("$(validate_config) > /dev/null 2>&1 ", "useshell")),
classes => results("bundle", "mission_portal_apache_config"),
comment => "We make sure that the deployed config is a copy of the staged
Expand Down Expand Up @@ -219,6 +221,14 @@ bundle agent mission_portal_apache_from_stage(config, staged_config)
contain => in_shell,
comment => concat( "We start apache after the new valid config is in ",
"place only if we have stopped apache already.");

"LD_LIBRARY_PATH=$(sys.workdir)/lib:$LD_LIBRARY_PATH $(sys.workdir)/httpd/bin/apachectl" -> { "ENT-9686" }
args => "restart",
if => and( "mission_portal_apache_config_repaired",
not( "apache_stop_after_new_staged_config_repaired" ) ),
contain => in_shell,
comment => "We restart apache after the new valid config is in place";

services:
systemd_supervised::
"cf-apache"
Expand All @@ -236,6 +246,11 @@ bundle agent mission_portal_apache_from_stage(config, staged_config)
comment => concat( "We start apache after the new valid config is in ",
"place only if we have stopped apache already.");

"cf-apache" -> { "ENT-9686" }
service_policy => "restart",
if => and( "mission_portal_apache_config_repaired",
not( "apache_stop_after_new_staged_config_repaired" ) ),
comment => "We restart apache after the new valid config is in place";

reports:
DEBUG|DEBUG_mission_portal_apache_from_stage::
Expand Down

0 comments on commit 8735dea

Please sign in to comment.