ac7d03
From d8a9ed4e2fc164962d76773b57277f97bca84270 Mon Sep 17 00:00:00 2001
ac7d03
From: Jan Cholasta <jcholast@redhat.com>
ac7d03
Date: Thu, 16 Mar 2017 12:51:29 +0000
ac7d03
Subject: [PATCH] tasks: run `systemctl daemon-reload` after httpd.service.d
ac7d03
 updates
ac7d03
ac7d03
Run `systemctl daemon-reload` after
ac7d03
`/etc/systemd/system/httpd.service.d/ipa.conf` is created or deleted,
ac7d03
otherwise systemd will not merge the file into httpd.service and therefore
ac7d03
required environment variables will not be set for httpd.
ac7d03
ac7d03
This fixes authentication failures ("No valid Negotiate header in server
ac7d03
response") due to missing `GSS_USE_PROXY=yes` in httpd environment.
ac7d03
ac7d03
https://pagure.io/freeipa/issue/6773
ac7d03
ac7d03
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
ac7d03
---
ac7d03
 ipaplatform/redhat/tasks.py | 7 +++++++
ac7d03
 1 file changed, 7 insertions(+)
ac7d03
ac7d03
diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py
ac7d03
index c1b574e06fc52839b684cbe96587365fa107b2eb..d0ef5fbd1ceb8110dd417dda44a74dc63898456a 100644
ac7d03
--- a/ipaplatform/redhat/tasks.py
ac7d03
+++ b/ipaplatform/redhat/tasks.py
ac7d03
@@ -483,6 +483,9 @@ class RedHatTaskNamespace(BaseTaskNamespace):
ac7d03
         os.chmod(paths.SYSTEMD_SYSTEM_HTTPD_IPA_CONF, 0o644)
ac7d03
         self.restore_context(paths.SYSTEMD_SYSTEM_HTTPD_IPA_CONF)
ac7d03
 
ac7d03
+        ipautil.run([paths.SYSTEMCTL, "--system", "daemon-reload"],
ac7d03
+                    raiseonerr=False)
ac7d03
+
ac7d03
     def configure_http_gssproxy_conf(self):
ac7d03
         ipautil.copy_template_file(
ac7d03
             os.path.join(paths.USR_SHARE_IPA_DIR, 'gssproxy.conf.template'),
ac7d03
@@ -513,6 +516,10 @@ class RedHatTaskNamespace(BaseTaskNamespace):
ac7d03
                     'Error removing %s: %s',
ac7d03
                     paths.SYSTEMD_SYSTEM_HTTPD_IPA_CONF, e
ac7d03
                 )
ac7d03
+            return
ac7d03
+
ac7d03
+        ipautil.run([paths.SYSTEMCTL, "--system", "daemon-reload"],
ac7d03
+                    raiseonerr=False)
ac7d03
 
ac7d03
     def set_hostname(self, hostname):
ac7d03
         ipautil.run([paths.BIN_HOSTNAMECTL, 'set-hostname', hostname])
ac7d03
-- 
ac7d03
2.12.1
ac7d03