ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.83k stars 3.39k forks source link

Satellite 6 inventory source unable to update after upgrade from 7.0.0 #5237

Open jschilen opened 4 years ago

jschilen commented 4 years ago
ISSUE TYPE
SUMMARY

After upgrading I am unable to sync my inventory from satellite.

ENVIRONMENT
STEPS TO REPRODUCE

Clicked refresh for "Red Hat Satellite 6" source.

EXPECTED RESULTS

Expected the inventory to be refreshed.

ACTUAL RESULTS

Got an error: HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl- warnings InsecureRequestWarning) Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 462, in sys.exit(not ForemanInventory().run()) File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 456, in run self.get_inventory() File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 404, in get_inventory self.update_cache() File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 352, in update_cache self.facts[dns_name] = self._get_facts(host) File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 244, in _get_facts ret = self._get_facts_by_id(host['id']) File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 221, in _get_facts_by_id return self._get_json(url) File "/var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py", line 186, in _get_json ret.raise_for_status() File "/var/lib/awx/venv/ansible/lib/python3.6/site- packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https:///api/v2/hosts/840/facts?per_page=250&page=1

File "/usr/lib/python3.6/site-packages/ansible/inventory/manager.py", line 268, in parse_source plugin.parse(self._inventory, self._loader, source, cache=cache) File "/usr/lib/python3.6/site-packages/ansible/plugins/inventory/script.py", line 161, in parse raise AnsibleParserError(to_native(e)) [WARNING]: Unable to parse /var/lib/awx/venv/awx/lib64/python3.6/site- packages/awx/plugins/inventory/foreman.py as an inventory source ERROR! No inventory was parsed, please check your configuration and options.

wenottingham commented 4 years ago

Server Error: Internal Server Error for url: https:///api/v2/hosts/840/facts?per_page=250&page=1

It looks like your host to connect to got lost? Is your credential correct?

jschilen commented 4 years ago

Server Error: Internal Server Error for url: https:///api/v2/hosts/840/facts?per_page=250&page=1

It looks like your host to connect to got lost? Is your credential correct?

I redacted the server name for security in the post.

wenottingham commented 4 years ago

OK. The 500 error comes from the Sat/Foreman server, so you'd need to figure out what error it's throwing there and why.