• Michael Hanselmann's avatar
    cmdlib: Stop forking in LUClusterQuery · a20e4768
    Michael Hanselmann authored
    
    
    While debugging another issue we realized that LUClusterQuery forks.
    This turned out to be the “platform.architecture” function from the
    Python library. It uses the “file” command to determine the architecture
    of the Python binary.
    
    This patch adds two new functions to the “runtime” module to get this
    information once per process instead of doing it every single time
    LUClusterQuery is used. Forking is a no-go in a multi-threaded
    environment anyway.
    
    A future change will also have to change the terminology in “gnt-cluster
    info”: it reports the binary architecture simply as “architecture”, when
    it's actually the binaries' architecture. Kernel and userland can be
    different.
    Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
    Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
    a20e4768
cmdlib.py 477 KB