cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10243) Updating metadata might hang on VR on "ip rule show"
Date Sat, 10 Feb 2018 17:28:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359530#comment-16359530
] 

ASF GitHub Bot commented on CLOUDSTACK-10243:
---------------------------------------------

rhtyd closed pull request #2421: CLOUDSTACK-10243: Do not use wait() on Python subprocess
URL: https://github.com/apache/cloudstack/pull/2421
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
index 5397038fd1e..241643d9956 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py
@@ -183,13 +183,19 @@ def get_hostname():
 
 def execute(command):
     """ Execute command """
-    p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
-    p.wait()
-    rc = p.returncode
-
-    logging.debug("Executed: %s - exitstatus=%s " % (command, rc))
-    result = p.communicate()[0]
-    return result.splitlines()
+    returncode = -1
+    try:
+        logging.info("Executing: %s" % command)
+        result = subprocess.check_output(command, shell=True)
+        returncode = 0
+        return result.splitlines()
+    except subprocess.CalledProcessError as e:
+        logging.error(e)
+        returncode = e.returncode
+    finally:
+        logging.debug("Executed: %s - exitstatus=%s " % (command, returncode))
+
+    return list()
 
 
 def save_iptables(command, iptables_file):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Updating metadata might hang on VR on "ip rule show"
> ----------------------------------------------------
>
>                 Key: CLOUDSTACK-10243
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10243
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Virtual Router
>    Affects Versions: 4.10.0.0, 4.11.0.0
>         Environment: CloudStack 4.10 - Basic Networking
>            Reporter: Wido den Hollander
>            Assignee: Wido den Hollander
>            Priority: Major
>              Labels: basic-networking, python, virtual-router
>             Fix For: Future
>
>
> On a CloudStack 4.10 setup running with Basic Networking we noticed VMs being in the
"Starting" state.
> After investigating in the VR we show the "ip rule show" command run for ever and never
end. This causes Python scripts to wait and thus never start the Instance.
> This seems to be a issue in CsHelper.py where it uses p.wait() which might block in
certain situations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message