cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romain-dartigues <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1604: improvement: systemvm slow operations
Date Wed, 23 Nov 2016 12:57:39 GMT
Github user romain-dartigues commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1604#discussion_r89310394
  
    --- 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 --
    
    @jburwell < I think your request, while valid, goes beyond the scope of this patch
which was made to fix a problem we have in production.
    
    To wait for an amount of time, it would be required to spawn a separate thread, as the
`timeout` argument was added in Python 3 (3.2 I think).


---
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.
---

Mime
View raw message