MrMEEE / awx-build

145 stars 39 forks source link

ansible-awx-4.0.0.248: ModuleNotFoundError: No module named 'prometheus_client' #99

Closed tjyang closed 5 years ago

tjyang commented 5 years ago

Hi @MrMEEE

4.0.0.248 rpm has following issue. Looks like rh-python* for prometheus_client is missed.

[root@awx01 ~]# sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage m          akemigrations"
Traceback (most recent call last):
  File "/opt/rh/rh-python36/root/usr/bin/awx-manage", line 11, in <module>
    load_entry_point('awx==4.0.0', 'console_scripts', 'awx-manage')()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/__init__.py          ", line 140, in manage
    execute_from_command_line(sys.argv)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/base.py", line 327, in execute
    self.check()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/man          agement/base.py", line 346, in _run_checks
    return checks.run_checks(**kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/che          cks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/che          cks/urls.py", line 16, in check_url_config
    return check_resolver(resolver)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/che          cks/urls.py", line 26, in check_resolver
    return check_method()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/urls/res          olvers.py", line 256, in check
    for pattern in self.url_patterns:
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/utils/fu          nctional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/urls/res          olvers.py", line 407, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/utils/fu          nctional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/urls/res          olvers.py", line 400, in urlconf_module
    return import_module(self.urlconf_name)
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/importlib/__init__.py", lin          e 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/urls.py", l          ine 15, in <module>
    url(r'^api/', include('awx.api.urls', namespace='api')),
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/conf/url          s/__init__.py", line 50, in include
    urlconf_module = import_module(urlconf_module)
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/importlib/__init__.py", lin          e 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/api/urls/__          init__.py", line 5, in <module>
    from .urls import urlpatterns
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/api/urls/ur          ls.py", line 37, in <module>
    from awx.api.views.metrics import MetricsView
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/api/views/m          etrics.py", line 18, in <module>
    from awx.main.analytics.metrics import metrics
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/main/analyt          ics/metrics.py", line 3, in <module>
    from prometheus_client import (
ModuleNotFoundError: No module named 'prometheus_client'
[root@awx01 ~]#
MrMEEE commented 5 years ago

Have you followed the upgrade instructions:

yum update
yum install --disablerepo='*' --enablerepo='mrmeee-ansible-awx, base' -x *-debuginfo rh-python36*
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage makemigrations"
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage migrate"
tjyang commented 5 years ago

@MrMEEE I missed this line to have "rh-python36-prometheus_client"(and others) installed.

yum install --disablerepo='*' --enablerepo='mrmeee-ansible-awx, base' -x *-debuginfo rh-python36*