Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit keyring dependencies to constrain version #15

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

sjones4
Copy link
Contributor

@sjones4 sjones4 commented Aug 22, 2019

Keyring is a transitive dependency via azure. This pull request constrains the installed version so it is the last python 2 compatible one and ensures that a suitable keyrings.alt dependency is installed.

Without the keyrings.alt dependency the OS package python-keyrings.alt is used on bionic which is incompatible with keyring 18. The python-keyrings.alt package is a recommended dependency via python-pip so a workaround is to remove it (dpkg -r python-keyrings.alt)

Without the fix and with additional logging the appscale command shows the error:

ERROR:keyring.backend:Error initializing plugin EntryPoint('Windows (alt)', u'keyrings.alt.Windows', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/keyring/backend.py", line 194, in _load_plugins
    init_func = ep.load()
  File "/usr/local/lib/python2.7/dist-packages/entrypoints.py", line 82, in load
    mod = import_module(self.module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/keyrings/alt/Windows.py", line 9, in <module>
    from . import file_base
  File "/usr/lib/python2.7/dist-packages/keyrings/alt/file_base.py", line 13, in <module>
    from keyring.util.escape import escape as escape_for_ini
ImportError: No module named escape
ERROR:keyring.backend:Error initializing plugin EntryPoint('file', u'keyrings.alt.file', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/keyring/backend.py", line 194, in _load_plugins
    init_func = ep.load()
  File "/usr/local/lib/python2.7/dist-packages/entrypoints.py", line 82, in load
    mod = import_module(self.module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/keyrings/alt/file.py", line 11, in <module>
    from keyring.util.escape import escape as escape_for_ini
ImportError: No module named escape
ERROR:keyring.backend:Error initializing plugin EntryPoint('pyfs', u'keyrings.alt.pyfs', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/keyring/backend.py", line 194, in _load_plugins
    init_func = ep.load()
  File "/usr/local/lib/python2.7/dist-packages/entrypoints.py", line 82, in load
    mod = import_module(self.module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/keyrings/alt/pyfs.py", line 8, in <module>
    from keyring.util.escape import escape as escape_for_ini
ImportError: No module named escape
...

Without the additional logging:

# appscale status
No handlers could be found for logger "keyring.backend"
...

This does not appear to cause any functionality issues for the appscale command but it is possible that there are other issues with the azure agent due to the incompatible dependency.

@sjones4
Copy link
Contributor Author

sjones4 commented Aug 22, 2019

Daily build no. 6665

@cdonati cdonati merged commit d8f2be4 into AppScale:master Aug 22, 2019
@sjones4 sjones4 deleted the issue-keyringsalt-compat branch September 24, 2019 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants