4

pip.installedミニオンに存在する要件ファイル (以前の状態によってインストールされた) を使用して、またはvirtualenv.managed状態を使用して virtualenv をセットアップしようとしていますgit.latest。を使用したバージョンは次のpip.installedとおりです。

mysite-env:
  virtualenv.managed:
    - name: /opt/django/mysite
    - cwd: /opt/django/mysite
    - user: mysite
    - runas: mysite
    - system_site_packages: True

mysite-reqs:
  pip.installed:
    - no_index: True
    - find_links: http://pypi.mysite.com/
    - requirements: /opt/django/mysite/requirements/production.txt
    - pip_exists_action: switch
    - cwd: /opt/django/mysite
    - pip_bin: /opt/django/mysite/bin/pip
    - bin_env: /opt/django/mysite
    - user: mysite
    - watch:
      - git: mysite-project

この状態を実行しようとすると、次のエラーが発生します。

          ID: mysite-reqs
    Function: pip.installed
      Result: False
     Comment: Unable to process requirements file /opt/django/mysite/requirements/production.txt. Error: Ignoring indexes: https://pypi.python.org/simple/
              Could not open requirements file: [Errno 2] No such file or directory: '/tmp/requirements.txt'
              Storing debug log for failure in /home/mysite/.pip/pip.log

しかし、それは私が要件に渡すパスではありません。これは、ローカル ファイル パスではなく URL/tmp/requirements.txtを使用することを期待しているため、おそらくハードコードされているようなバグのように見えます。salt://

私は何か間違ったことをしていますか?これはバグですか? 回避する良い方法はありますか?

4

1 に答える 1

4

Saltstack と Python を使用するのは初めてで、環境設定のヘルプを探していて、検索結果であなたの質問に出くわしました。

私がクリックした次の検索結果には、あなたと同じエラーが含まれており、これは、SaltStack が chowning のために環境を /tmp に移動したことが原因であることが示唆されています。

解決策は、以下をソルト状態に追加することでした。

no_chown: True

それが役に立てば幸い。

于 2014-04-14T16:14:19.000 に答える