Project

Profile

Help

Issue #4999

Collection - Sync produces error messages in log system

Added by kersom over 1 year ago. Updated 2 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Following the sync method described in the docs - sync succeed but generate error warnings.

https://pulp-ansible.readthedocs.io/en/latest/workflows/sync-collection.html

To reproduce:

git clone https://github.com/pulp/pulp_ansible.git
cd pulp_ansible/docs/_scripts/
source base.sh

http POST $BASE_ADDR/pulp/api/v3/repositories/ name=foo

export REPO_HREF=$(http $BASE_ADDR/pulp/api/v3/repositories/ | \
  jq -r '.results[] | select(.name == "foo") | ._href')

http $BASE_ADDR$REPO_HREF

http POST $BASE_ADDR/pulp/api/v3/remotes/ansible/collection/ \
    name='bar' \
    url='https://galaxy-dev.ansible.com' \
    whitelist='testing.ansible_testing_content' \

export REMOTE_HREF=$(http $BASE_ADDR/pulp/api/v3/remotes/ansible/collection/ | jq -r '.results[] | select(.name == "bar") | ._href')

http $BASE_ADDR$REMOTE_HREF

export TASK_URL=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF \
  | jq -r '.task')

wait_for_pulp $TASK_URL
export REPOVERSION_HREF=${CREATED_RESOURCE[0]}

http $BASE_ADDR$REPOVERSION_HREF

snippet of output:


journalctl -l -f
...

4d0-76b2e1d5db11/', '/pulp/api/v3/remotes/ansible/collection/b9534d05-3d3a-4d72-9990-976683b05a93/'], (), {'remote_pk': UUID('b9534d05-3d3a-4d72-9990-976683b05a93'), 'repository_pk': UUID('312698f8-9fed-4ca9-a4d0-76b2e1d5db11')}, {}) (1101e266-db5f-49ff-8c5e-47d430bbd600)
Jun 20 13:13:16 p3.f gunicorn[8717]: 127.0.0.1 - admin [20/Jun/2019:17:13:16 +0000] "POST /pulp/api/v3/remotes/ansible/collection/b9534d05-3d3a-4d72-9990-976683b05a93/sync/ HTTP/1.1" 202 67 "-" "HTTPie/0.9.4"
Jun 20 13:13:16 p3.f audit[9290]: AVC avc:  denied  { name_connect } for  pid=9290 comm="rq" dest=5432 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket permissive=1
Jun 20 13:13:16 p3.f rq[8718]: pulp: rq.worker:INFO: resource-manager: Job OK (1101e266-db5f-49ff-8c5e-47d430bbd600)
Jun 20 13:13:16 p3.f rq[8719]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.f: pulp_ansible.app.tasks.collections.sync(remote_pk=UUID('b9534d05-3d3a-4d72-9990-976683b05a93'), repository_pk=UUID('312698f8-9fed-4ca9-a4d0-76b2e1d5db11')) (d9a1b200-4313-4c57-adb2-fbc57ccdaf4b)
Jun 20 13:13:16 p3.f rq[8719]: pulp: ansible_galaxy.installed_namespaces_db:ERROR: [Errno 2] No such file or directory: '/tmp/tmpecfibmx5/ansible_collections'
Jun 20 13:13:16 p3.f rq[8719]: Traceback (most recent call last):
Jun 20 13:13:16 p3.f rq[8719]:   File "/usr/local/lib/pulp/lib64/python3.6/site-packages/ansible_galaxy/installed_namespaces_db.py", line 24, in get_namespace_paths
Jun 20 13:13:16 p3.f rq[8719]:     namespace_paths = os.listdir(ansible_collections_path)
Jun 20 13:13:16 p3.f rq[8719]: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpecfibmx5/ansible_collections'
Jun 20 13:13:16 p3.f rq[8719]: pulp: ansible_galaxy.installed_namespaces_db:WARNING: The collections path /tmp/tmpecfibmx5/ansible_collections did not exist so no content or repositories were found.
...

Pulp installation from source June/20.

(pulp) [root@p3 pulp]# pip freeze | grep pulp
pulp-ansible==0.2.0b1.dev0
pulp-certguard==0.1.0rc1
pulp-docker==4.0.0b5.dev0
pulp-file==0.1.0b1.dev0
pulpcore==3.0.0rc3.dev0
pulpcore-plugin==0.1.0rc3.dev0

Associated revisions

Revision 3d08cc62 View on GitHub
Added by bmbouter over 1 year ago

Fix mazer log errors about 'ansible_collections'

This fix gratuitously creates the 'ansible_collections' directory to work around the error. I've filed an issue against Mazer and once fixed, this workaround can be removed.

https://pulp.plan.io/issues/4999 closes #4999

History

#1 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - DUPLICATE

This is a very clearly filed issue; thank you.

I believe it's a duplicate of #4920 so I'm going to close it as such. Please reopen if after testing the #4920 fix this is not fully resolved.

#2 Updated by bmbouter over 1 year ago

  • Status changed from CLOSED - DUPLICATE to NEW

whoops wrong issue, moving back to NEW

#3 Updated by bmbouter over 1 year ago

I filed an issue against Mazer since what I've done is just a workaround: https://github.com/ansible/mazer/issues/287

#4 Updated by bmbouter over 1 year ago

  • Status changed from NEW to POST
  • Assignee set to bmbouter

#5 Updated by bmbouter over 1 year ago

  • Status changed from POST to MODIFIED

#6 Updated by bmbouter 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF