New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup for HAProxy 1.8.3 #8

Merged
merged 6 commits into from Feb 12, 2018

Conversation

Projects
None yet
3 participants
@khdevel
Contributor

khdevel commented Dec 28, 2017

  • changed version to 1.8 in a Makefile
  • setup systemd haproxy.service to handle 'Type=forking'
  • removed 'systemd-wrapper' from SPEC

Changes to be committed:
modified: Makefile
modified: SOURCES/haproxy.service
modified: SPECS/haproxy.spec

kherbik
[1.8]
- changed version to 1.8 in Makefile
- setup systemd haproxy.service to handle 'Type=forking'
- removed 'systemd-wrapper' from SPEC

Changes to be committed:
	modified:   Makefile
	modified:   SOURCES/haproxy.service
	modified:   SPECS/haproxy.spec

@khdevel khdevel referenced this pull request Dec 28, 2017

Closed

Support for HAProxy 1.8.1 #7

kherbik and others added some commits Dec 29, 2017

kherbik
[1.8]
- removed 'PIDFile=/var/run/haproxy.pid' because of 'Failed to read PID from file' error

Changes to be committed:
	modified:   SOURCES/haproxy.service
kamil.herbik
[1.8]
- README.md file changed to point the haproxy v1.8

Changes to be committed:
	modified:   README.md
@DBezemer

This comment has been minimized.

Show comment
Hide comment
@DBezemer

DBezemer Jan 8, 2018

Owner

Hi @khdevel thanks for the pull request. In order to remove the systemd-wrapper can you add a conditional build flag for USE_SYSTEMD=1 and change the systemd file to use -Ws?

Additionally I have not had a chance to validate that the included configuration files are still valid, so please be patient while I validate the whole build before releasing new RPMs

Owner

DBezemer commented Jan 8, 2018

Hi @khdevel thanks for the pull request. In order to remove the systemd-wrapper can you add a conditional build flag for USE_SYSTEMD=1 and change the systemd file to use -Ws?

Additionally I have not had a chance to validate that the included configuration files are still valid, so please be patient while I validate the whole build before releasing new RPMs

@khdevel

This comment has been minimized.

Show comment
Hide comment
@khdevel

khdevel Jan 9, 2018

Contributor

Hi @DBezemer and thank you for the brief review. Regarding your requests the second one is fine, I will add the switch -Ws but the first one - conditional build is weird to me :) I assumed that you use branches which determines haproxy version. So we have 1.6 and 1.7 with specific tags which determines builds. My PR covers version 1.8 and I assumed that you will also put it into separate branch like 1.8 with tags like 1.8.3-1. In this case we do not need to have specific build flag which turns ON/OFF systemd-wrapper because in version 1.8 there is no systemd-wrapper.
So, I assume that the conditional build for this version is unnecessary. Please correct me if I'm wrong :)

Contributor

khdevel commented Jan 9, 2018

Hi @DBezemer and thank you for the brief review. Regarding your requests the second one is fine, I will add the switch -Ws but the first one - conditional build is weird to me :) I assumed that you use branches which determines haproxy version. So we have 1.6 and 1.7 with specific tags which determines builds. My PR covers version 1.8 and I assumed that you will also put it into separate branch like 1.8 with tags like 1.8.3-1. In this case we do not need to have specific build flag which turns ON/OFF systemd-wrapper because in version 1.8 there is no systemd-wrapper.
So, I assume that the conditional build for this version is unnecessary. Please correct me if I'm wrong :)

@pietervogelaar

This comment has been minimized.

Show comment
Hide comment
@pietervogelaar

pietervogelaar Jan 12, 2018

An important thing to sort out is that systemd-wrapper is started as root and then the actual haproxy process could be chrooted and run as haproxy user. In your systemd service file it will simply start as root which is less secure. But configuring user=haproxy and group=haproxy still not gives a chrooted environment I guess.

So I'm not sure how to do that part the right way.

pietervogelaar commented Jan 12, 2018

An important thing to sort out is that systemd-wrapper is started as root and then the actual haproxy process could be chrooted and run as haproxy user. In your systemd service file it will simply start as root which is less secure. But configuring user=haproxy and group=haproxy still not gives a chrooted environment I guess.

So I'm not sure how to do that part the right way.

@DBezemer

This comment has been minimized.

Show comment
Hide comment
@DBezemer

DBezemer Jan 16, 2018

Owner

@khdevel the reason for the conditional build is that I build for both CentOS 6 and 7, and on CentOS 6 there is no systemd

Owner

DBezemer commented Jan 16, 2018

@khdevel the reason for the conditional build is that I build for both CentOS 6 and 7, and on CentOS 6 there is no systemd

DBezemer and others added some commits Jan 16, 2018

kherbik
[1.8]
- new systemd confgiuration which uses -Ws mode
- USE_SYSTEMD flag added
- additional package 'systemd-devel' added to handle systemd mode compilation

Changes to be committed:
	modified:   Makefile
	modified:   SOURCES/haproxy.service
	modified:   SPECS/haproxy.spec

@khdevel khdevel changed the title from setup for HAProxy 1.8.2 to setup for HAProxy 1.8.3 Jan 26, 2018

@khdevel

This comment has been minimized.

Show comment
Hide comment
@khdevel

khdevel Jan 26, 2018

Contributor

@DBezemer sorry for such long delay in my update but I could not find a time for it :/ but finally I make it and I hope it is done right.

  • the USE_SYSTEMD flag was added into the SPECS/haproxy.spec and it seems to work fine, below is the part of the compilation log
+ systemd_opts=USE_SYSTEMD=1
+ /usr/bin/make -j8 CPU=generic TARGET=linux2628 USE_SYSTEMD=1 USE_OPE
  • I rewritten a SOURCES/haproxy.service to be more pro and flexible. It contains the option you wanted (-Ws)
ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $OPTIONS
  • to handle compilaton for systemd I had to add additional package into the Makefile, a systemd-devel
  • I also updated the VERSION to 1.8.3, which is now the current

Now the package properly compiles itself and installation is successful. Even the systemctl reload haproxy works properly now!

Contributor

khdevel commented Jan 26, 2018

@DBezemer sorry for such long delay in my update but I could not find a time for it :/ but finally I make it and I hope it is done right.

  • the USE_SYSTEMD flag was added into the SPECS/haproxy.spec and it seems to work fine, below is the part of the compilation log
+ systemd_opts=USE_SYSTEMD=1
+ /usr/bin/make -j8 CPU=generic TARGET=linux2628 USE_SYSTEMD=1 USE_OPE
  • I rewritten a SOURCES/haproxy.service to be more pro and flexible. It contains the option you wanted (-Ws)
ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $OPTIONS
  • to handle compilaton for systemd I had to add additional package into the Makefile, a systemd-devel
  • I also updated the VERSION to 1.8.3, which is now the current

Now the package properly compiles itself and installation is successful. Even the systemctl reload haproxy works properly now!

@DBezemer DBezemer changed the base branch from 1.7 to 1.8 Feb 12, 2018

@DBezemer

This comment has been minimized.

Show comment
Hide comment
@DBezemer

DBezemer Feb 12, 2018

Owner

@khdevel thanks for the update I'll merge and make some more changes and then release the updated RPMs for 1.8.4

Owner

DBezemer commented Feb 12, 2018

@khdevel thanks for the update I'll merge and make some more changes and then release the updated RPMs for 1.8.4

@DBezemer DBezemer merged commit 747d058 into DBezemer:1.8 Feb 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment