SatelliteQE / satellite6-upgrade

Satellite 6 upgrade related tools
GNU General Public License v3.0
8 stars 23 forks source link

Nailgun returned list index out of range exception in Upgrade during capsule sync operation. #336

Closed devendra104 closed 5 years ago

devendra104 commented 5 years ago

This issue observed in Upgrade during Capsule sync operation. Capsule sync operation failed with list index out of exception.

INFO:upgrade_logging:Syncing latest capsule repos in Satellite ...
WARNING:nailgun.client:Received HTTP 422 response: {"displayMessage":"Missing arguments basearch for /content/dist/rhel/server/7/7Server/$basearch/sat-capsule/6.5/os","errors":["Missing arguments basearch for /content/dist/rhel/server/7/7Server/$basearch/sat-capsule/6.5/os"]}
Traceback (most recent call last):
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/main.py", line 763, in main
    *args, **kwargs
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 427, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/runner.py", line 62, in setup_products_for_upgrade
    sat_host, os_version, False if product == 'n-1' else True)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/capsule.py", line 93, in satellite6_capsule_setup
    execute(sync_capsule_repos_to_upgrade, cap_hosts, host=sat_host)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 387, in execute
    multiprocessing
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 277, in _execute
    return task.run(*args, **kwargs)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/helpers/tasks.py", line 118, in sync_capsule_repos_to_upgrade
    _sync_capsule_subscription_to_capsule_ak(ak)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/helpers/tasks.py", line 172, in _sync_capsule_subscription_to_capsule_ak
    ).search(query={'organization_id': org.id, 'per_page': 100})[0]
IndexError: list index out of range
jyejare commented 5 years ago

There is a change in the Capsule Repo name, dont know if its intentional:

s/
Red Hat Satellite Capsule 6.5 for RHEL 7 Server (RPMs) x86_64
/
Red Hat Satellite Capsule 6.5 for RHEL 7 Server RPMs x86_64 7Server
/
devendra104 commented 5 years ago

@jyejare We are still facing the same issue in the merged branch.

Syncing latest capsule repos in Satellite ...
INFO:upgrade_logging:Syncing latest capsule repos in Satellite ...
WARNING:nailgun.client:Received HTTP 400 response: {"displayMessage":"400 Bad Request","errors":["400 Bad Request"]}
400 Client Error: Bad Request for url: https://XYZ.redhat.com/katello/api/v2/repository_sets/8462/enable
WARNING:upgrade_logging:400 Client Error: Bad Request for url: https://XYZ.redhat.com/katello/api/v2/repository_sets/8462/enable
Traceback (most recent call last):
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/main.py", line 763, in main
    *args, **kwargs
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 427, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/runner.py", line 62, in setup_products_for_upgrade
    sat_host, os_version, False if product == 'n-1' else True)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/capsule.py", line 93, in satellite6_capsule_setup
    execute(sync_capsule_repos_to_upgrade, cap_hosts, host=sat_host)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 387, in execute
    multiprocessing
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 277, in _execute
    return task.run(*args, **kwargs)
  File "/home/[*******]/shiningpanda/jobs/8764b415/virtualenvs/d41d8cd9/lib/python3.6/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/helpers/tasks.py", line 118, in sync_capsule_repos_to_upgrade
    _sync_capsule_subscription_to_capsule_ak(ak)
  File "/home/[*******]/workspace/satellite6-upgrader/upgrade/helpers/tasks.py", line 173, in _sync_capsule_subscription_to_capsule_ak
    ).search(query={'organization_id': org.id, 'per_page': 100})[0]
IndexError: list index out of range
ntkathole commented 5 years ago

@devendra104 cherry-pick is pending