You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by rhtyd <gi...@git.apache.org> on 2016/11/21 08:06:50 UTC

[GitHub] cloudstack pull request #1604: improvement: systemvm slow operations

Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1604#discussion_r88844626
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py ---
    @@ -179,12 +179,12 @@ def get_hostname():
             return line.strip()
     
     
    -def execute(command):
    +def execute(command, wait=True):
         """ Execute command """
         logging.debug("Executing: %s" % command)
         p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    -    result = p.communicate()[0]
    -    return result.splitlines()
    +    if wait:
    +        return p.communicate()[0].splitlines()
    --- End diff --
    
    @romain-dartigues can you make it return a `return []` after line 187. This would handle the case when wait if `False`, and still return empty array which may be consumed/necessary the the caller of the method. Please consider any other change necessary to handle the case that John has mentioned.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---