Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti Oct 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ustcweizhou this is the same fix done in the PR: #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().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sureshanaparti I will make change on proc.find

logging.debug("CsLoadBalancer:: will restart HAproxy!")
CsHelper.service("haproxy", "restart")
else:
Expand Down