You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/06 09:22:30 UTC

[GitHub] [cloudstack] ustcweizhou opened a new pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

ustcweizhou opened a new pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384


   ## Description
   <!--- Describe your changes in detail -->
   
   when upgrade to cloudstack 4.14 or 4.15, there is no process ends with "/run/haproxy.pid" after reload haproxy.
   so haproxy is reloaded -> restarted -> reloaded -> restarted -> and so on
   
   After restarting haproxy
   ```
   root@r-2040-VM:~# ps aux |grep /usr/sbin/haproxy
   root     24894  0.3  1.3  20492 13352 ?        Ss   09:14   0:00 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
   root     24895  0.1  1.1  22332 11372 ?        Ss   09:14   0:00 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
   ```
   
   After reloading haproxy
   ```
   root@r-2040-VM:~# systemctl reload haproxy
   root@r-2040-VM:~# ps aux |grep /usr/sbin/haproxy
   root     24894  0.0  1.3  20492 13300 ?        Ss   09:14   0:00 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf 24895
   root     26694  0.0  0.9  22196  9488 ?        Ss   09:16   0:00 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf 24895
   ```
   
   so use 'grep' to find if haproxy is running.
   
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## Screenshots (if appropriate):
   
   ## How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708327029


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache closed pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
weizhouapache closed pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708426905


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland removed a comment on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
DaanHoogland removed a comment on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708426509


   @blueorangutan test


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#discussion_r505243494



##########
File path: systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py
##########
@@ -46,7 +46,7 @@ def process(self):
             CsHelper.copy(HAPROXY_CONF_T, HAPROXY_CONF_P)
 
             proc = CsProcess(['/run/haproxy.pid'])
-            if not proc.find():
+            if proc.grep("/usr/sbin/haproxy") == -1:

Review comment:
       @ustcweizhou this is the same fix done in the PR: https://github.com/apache/cloudstack/pull/4386, changes in "_CsRedundant.py_" for keepalived process. As I've commented in that PR, on a broader view, other processes might have similar issue. can this be fixed in CsProcess.py ? else slowly at some point, we'll end up replacing all _proc.find()_ with _proc.grep()_.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#discussion_r505243494



##########
File path: systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py
##########
@@ -46,7 +46,7 @@ def process(self):
             CsHelper.copy(HAPROXY_CONF_T, HAPROXY_CONF_P)
 
             proc = CsProcess(['/run/haproxy.pid'])
-            if not proc.find():
+            if proc.grep("/usr/sbin/haproxy") == -1:

Review comment:
       @ustcweizhou this is the same fix done in the PR: https://github.com/apache/cloudstack/pull/4386, changes in "_CsRedundant.py_" for keepalived process. As I've commented in that PR, on a broader view, other processes might have similar issue. can this be fixed in CsProcess.py find() ? else at some point, we can end up replacing all _proc.find()_ with _proc.grep()_.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#discussion_r506931640



##########
File path: systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py
##########
@@ -46,7 +46,7 @@ def process(self):
             CsHelper.copy(HAPROXY_CONF_T, HAPROXY_CONF_P)
 
             proc = CsProcess(['/run/haproxy.pid'])
-            if not proc.find():
+            if proc.grep("/usr/sbin/haproxy") == -1:

Review comment:
       @sureshanaparti I will make change on proc.find




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708327438






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708426509


   @blueorangutan test


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd removed a comment on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
rhtyd removed a comment on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708327029


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-709046835


   @DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708327438


   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-709046093


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708426905


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-709089760


   Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2186


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#discussion_r504567007



##########
File path: systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py
##########
@@ -46,7 +46,7 @@ def process(self):
             CsHelper.copy(HAPROXY_CONF_T, HAPROXY_CONF_P)
 
             proc = CsProcess(['/run/haproxy.pid'])
-            if not proc.find():
+            if proc.grep("/usr/sbin/haproxy") == -1:

Review comment:
       haven't tested this, should this be !=0 instead @ustcweizhou ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4384: systemvm: FIX haproxy is not reloaded but restarted in VR

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4384:
URL: https://github.com/apache/cloudstack/pull/4384#issuecomment-708349549


   Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2177


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org