美文网首页
saltstack-virtualenv.managed-报错及

saltstack-virtualenv.managed-报错及

作者: 小硕_7168 | 来源:发表于2020-05-09 03:45 被阅读0次

    报错内容:


          ID: .create restapi virtualenv
    Function: virtualenv.managed
        Name: /home/
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1951, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/virtualenv_mod.py", line 209, in managed
                  **kwargs
                File "/usr/lib/python2.7/site-packages/salt/modules/virtualenv_mod.py", line 163, in create
                  virtualenv.virtualenv_version)
              AttributeError: 'module' object has no attribute 'virtualenv_version'
     Started: 15:05:38.571037
    Duration: 77.911 ms
     Changes:   
    

    解决办法:

    https://github.com/saltstack/salt/blob/master/salt/modules/virtualenv_mod.py#L55
    下载这个模块替换当前报错路径的模块
    cp -f  virtualenv_mod.py /usr/lib/python2.7/site-packages/salt/modules/virtualenv_mod.py
    

    Git提问:

    https://github.com/saltstack/salt/issues/56238
    

    原因:

    代码bug,已修复

    相关文章

      网友评论

          本文标题:saltstack-virtualenv.managed-报错及

          本文链接:https://www.haomeiwen.com/subject/sjthnhtx.html