Re: [ClusterLabs] pacemaker apache and umask on CentOS 7
> Gesendet: Mittwoch, 20. April 2016 um 19:35 Uhr > Von: "Ken Gaillot" <kgail...@redhat.com> > An: users@clusterlabs.org > Betreff: Re: [ClusterLabs] pacemaker apache and umask on CentOS 7 > > On 04/20/2016 12:20 PM, Klaus Wenninger wrote: > > On 04/20/2016 05:35 PM, fatcha...@gmx.de wrote: > >> > >>> Gesendet: Mittwoch, 20. April 2016 um 16:31 Uhr > >>> Von: "Klaus Wenninger" <kwenn...@redhat.com> > >>> An: users@clusterlabs.org > >>> Betreff: Re: [ClusterLabs] pacemaker apache and umask on CentOS 7 > >>> > >>> On 04/20/2016 04:11 PM, fatcha...@gmx.de wrote: > >>>> Hi, > >>>> > >>>> I´m running a 2-node apache webcluster on a fully patched CentOS 7 > >>>> (pacemaker-1.1.13-10.el7_2.2.x86_64 pcs-0.9.143-15.el7.x86_64). > >>>> Some files which are generated by the apache are created with a umask > >>>> 137 but I need this files created with a umask of 117. > >>>> To change this I first tried to add a umask 117 to /etc/sysconfig/httpd > >>>> & rebooted the system. This had no effekt. > >>>> So I found out (after some research) that this is not working under > >>>> CentOS 7 and that this had to be changed via systemd. > >>>> So I created a directory "/etc/systemd/system/httpd.service.d" and put > >>>> there a "umask.conf"-File with this content: > >>>> [Service] > >>>> UMask=0117 > >>>> > >>>> Again I rebooted the system but no effekt. > >>>> Is the pacemaker really starting the apache over the systemd ? And how > >>>> can I solve the problem ? > >>> Didn't check with CentOS7 but on RHEL7 there is a > >>> /usr/lib/ocf/resource.d/heartbeat/apache. > >>> So it depends on how you defined the resource starting apache if systemd > >>> is used or if it being done by the ocf-ra. > >> MY configuration is: > >> Resource: apache (class=ocf provider=heartbeat type=apache) > >> Attributes: configfile=/etc/httpd/conf/httpd.conf > >> statusurl=http://127.0.0.1:8089/server-status > >> Operations: start interval=0s timeout=40s (apache-start-timeout-40s) > >> stop interval=0s timeout=60s (apache-stop-timeout-60s) > >> monitor interval=1min (apache-monitor-interval-1min) > >> > >> So I quess it is ocf. But what will be the right way to do it ? I lack a > >> bit of understandig about this /usr/lib/ocf/resource.d/heartbeat/apache > >> file. > >> > > There are the ocf-Resource-Agents (if there is none you can always > > create one for your service) which usually > > give you a little bit more control of the service from the cib. (You can > > set a couple of variables like in this example > > the pointer to the config-file) > > And of course you can always create resources referring the native > > services of your distro (systemd-units in > > this case). > >> > >> > >> > >>>> Any suggestions are welcome > > If you add envfiles="/etc/sysconfig/httpd" to your apache resource, it > should work. worked like a charm. Thanks to everybody for your support. Kind regards fatcharly > > >>>> Kind regards > >>>> > >>>> fatcharly > > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] pacemaker apache and umask on CentOS 7
On 04/20/2016 12:20 PM, Klaus Wenninger wrote: > On 04/20/2016 05:35 PM, fatcha...@gmx.de wrote: >> >>> Gesendet: Mittwoch, 20. April 2016 um 16:31 Uhr >>> Von: "Klaus Wenninger" <kwenn...@redhat.com> >>> An: users@clusterlabs.org >>> Betreff: Re: [ClusterLabs] pacemaker apache and umask on CentOS 7 >>> >>> On 04/20/2016 04:11 PM, fatcha...@gmx.de wrote: >>>> Hi, >>>> >>>> I´m running a 2-node apache webcluster on a fully patched CentOS 7 >>>> (pacemaker-1.1.13-10.el7_2.2.x86_64 pcs-0.9.143-15.el7.x86_64). >>>> Some files which are generated by the apache are created with a umask 137 >>>> but I need this files created with a umask of 117. >>>> To change this I first tried to add a umask 117 to /etc/sysconfig/httpd & >>>> rebooted the system. This had no effekt. >>>> So I found out (after some research) that this is not working under CentOS >>>> 7 and that this had to be changed via systemd. >>>> So I created a directory "/etc/systemd/system/httpd.service.d" and put >>>> there a "umask.conf"-File with this content: >>>> [Service] >>>> UMask=0117 >>>> >>>> Again I rebooted the system but no effekt. >>>> Is the pacemaker really starting the apache over the systemd ? And how can >>>> I solve the problem ? >>> Didn't check with CentOS7 but on RHEL7 there is a >>> /usr/lib/ocf/resource.d/heartbeat/apache. >>> So it depends on how you defined the resource starting apache if systemd >>> is used or if it being done by the ocf-ra. >> MY configuration is: >> Resource: apache (class=ocf provider=heartbeat type=apache) >> Attributes: configfile=/etc/httpd/conf/httpd.conf >> statusurl=http://127.0.0.1:8089/server-status >> Operations: start interval=0s timeout=40s (apache-start-timeout-40s) >> stop interval=0s timeout=60s (apache-stop-timeout-60s) >> monitor interval=1min (apache-monitor-interval-1min) >> >> So I quess it is ocf. But what will be the right way to do it ? I lack a bit >> of understandig about this /usr/lib/ocf/resource.d/heartbeat/apache file. >> > There are the ocf-Resource-Agents (if there is none you can always > create one for your service) which usually > give you a little bit more control of the service from the cib. (You can > set a couple of variables like in this example > the pointer to the config-file) > And of course you can always create resources referring the native > services of your distro (systemd-units in > this case). >> >> >> >>>> Any suggestions are welcome If you add envfiles="/etc/sysconfig/httpd" to your apache resource, it should work. >>>> Kind regards >>>> >>>> fatcharly ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] pacemaker apache and umask on CentOS 7
On 04/20/2016 05:35 PM, fatcha...@gmx.de wrote: > >> Gesendet: Mittwoch, 20. April 2016 um 16:31 Uhr >> Von: "Klaus Wenninger" <kwenn...@redhat.com> >> An: users@clusterlabs.org >> Betreff: Re: [ClusterLabs] pacemaker apache and umask on CentOS 7 >> >> On 04/20/2016 04:11 PM, fatcha...@gmx.de wrote: >>> Hi, >>> >>> I´m running a 2-node apache webcluster on a fully patched CentOS 7 >>> (pacemaker-1.1.13-10.el7_2.2.x86_64 pcs-0.9.143-15.el7.x86_64). >>> Some files which are generated by the apache are created with a umask 137 >>> but I need this files created with a umask of 117. >>> To change this I first tried to add a umask 117 to /etc/sysconfig/httpd & >>> rebooted the system. This had no effekt. >>> So I found out (after some research) that this is not working under CentOS >>> 7 and that this had to be changed via systemd. >>> So I created a directory "/etc/systemd/system/httpd.service.d" and put >>> there a "umask.conf"-File with this content: >>> [Service] >>> UMask=0117 >>> >>> Again I rebooted the system but no effekt. >>> Is the pacemaker really starting the apache over the systemd ? And how can >>> I solve the problem ? >> Didn't check with CentOS7 but on RHEL7 there is a >> /usr/lib/ocf/resource.d/heartbeat/apache. >> So it depends on how you defined the resource starting apache if systemd >> is used or if it being done by the ocf-ra. > MY configuration is: > Resource: apache (class=ocf provider=heartbeat type=apache) > Attributes: configfile=/etc/httpd/conf/httpd.conf > statusurl=http://127.0.0.1:8089/server-status > Operations: start interval=0s timeout=40s (apache-start-timeout-40s) > stop interval=0s timeout=60s (apache-stop-timeout-60s) > monitor interval=1min (apache-monitor-interval-1min) > > So I quess it is ocf. But what will be the right way to do it ? I lack a bit > of understandig about this /usr/lib/ocf/resource.d/heartbeat/apache file. > There are the ocf-Resource-Agents (if there is none you can always create one for your service) which usually give you a little bit more control of the service from the cib. (You can set a couple of variables like in this example the pointer to the config-file) And of course you can always create resources referring the native services of your distro (systemd-units in this case). > > > >>> Any suggestions are welcome >>> >>> Kind regards >>> >>> fatcharly >>> >>> >>> >>> ___ >>> Users mailing list: Users@clusterlabs.org >>> http://clusterlabs.org/mailman/listinfo/users >>> >>> Project Home: http://www.clusterlabs.org >>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >>> Bugs: http://bugs.clusterlabs.org >> >> ___ >> Users mailing list: Users@clusterlabs.org >> http://clusterlabs.org/mailman/listinfo/users >> >> Project Home: http://www.clusterlabs.org >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >> Bugs: http://bugs.clusterlabs.org >> > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] pacemaker apache and umask on CentOS 7
> Gesendet: Mittwoch, 20. April 2016 um 16:31 Uhr > Von: "Klaus Wenninger" <kwenn...@redhat.com> > An: users@clusterlabs.org > Betreff: Re: [ClusterLabs] pacemaker apache and umask on CentOS 7 > > On 04/20/2016 04:11 PM, fatcha...@gmx.de wrote: > > Hi, > > > > I´m running a 2-node apache webcluster on a fully patched CentOS 7 > > (pacemaker-1.1.13-10.el7_2.2.x86_64 pcs-0.9.143-15.el7.x86_64). > > Some files which are generated by the apache are created with a umask 137 > > but I need this files created with a umask of 117. > > To change this I first tried to add a umask 117 to /etc/sysconfig/httpd & > > rebooted the system. This had no effekt. > > So I found out (after some research) that this is not working under CentOS > > 7 and that this had to be changed via systemd. > > So I created a directory "/etc/systemd/system/httpd.service.d" and put > > there a "umask.conf"-File with this content: > > [Service] > > UMask=0117 > > > > Again I rebooted the system but no effekt. > > Is the pacemaker really starting the apache over the systemd ? And how can > > I solve the problem ? > Didn't check with CentOS7 but on RHEL7 there is a > /usr/lib/ocf/resource.d/heartbeat/apache. > So it depends on how you defined the resource starting apache if systemd > is used or if it being done by the ocf-ra. MY configuration is: Resource: apache (class=ocf provider=heartbeat type=apache) Attributes: configfile=/etc/httpd/conf/httpd.conf statusurl=http://127.0.0.1:8089/server-status Operations: start interval=0s timeout=40s (apache-start-timeout-40s) stop interval=0s timeout=60s (apache-stop-timeout-60s) monitor interval=1min (apache-monitor-interval-1min) So I quess it is ocf. But what will be the right way to do it ? I lack a bit of understandig about this /usr/lib/ocf/resource.d/heartbeat/apache file. > > > > Any suggestions are welcome > > > > Kind regards > > > > fatcharly > > > > > > > > ___ > > Users mailing list: Users@clusterlabs.org > > http://clusterlabs.org/mailman/listinfo/users > > > > Project Home: http://www.clusterlabs.org > > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > > Bugs: http://bugs.clusterlabs.org > > > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] pacemaker apache and umask on CentOS 7
On 04/20/2016 09:11 AM, fatcha...@gmx.de wrote: > Hi, > > I´m running a 2-node apache webcluster on a fully patched CentOS 7 > (pacemaker-1.1.13-10.el7_2.2.x86_64 pcs-0.9.143-15.el7.x86_64). > Some files which are generated by the apache are created with a umask 137 but > I need this files created with a umask of 117. > To change this I first tried to add a umask 117 to /etc/sysconfig/httpd & > rebooted the system. This had no effekt. > So I found out (after some research) that this is not working under CentOS 7 > and that this had to be changed via systemd. > So I created a directory "/etc/systemd/system/httpd.service.d" and put there > a "umask.conf"-File with this content: > [Service] > UMask=0117 > > Again I rebooted the system but no effekt. > Is the pacemaker really starting the apache over the systemd ? And how can I > solve the problem ? > > Any suggestions are welcome > > Kind regards > > fatcharly It depends on the resource agent you're using for apache. If you were using systemd:httpd, I'd expect /etc/sysconfig/httpd or the httpd.service.d override to work. Since they don't, I'll guess you're using ocf:heartbeat:apache. In that case, the file specified by the resource's envfiles parameter (which defaults to /etc/apache2/envvars) is the right spot. So, you could configure envfiles=/etc/sysconfig/httpd, or you could keep it default and add your umask to /etc/apache2/envvars. ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org