Issue #4479
closedFailure when syncing repository with different remote content types
Description
Using the smash API client:
1 - Create a repository.
2 - Create a remote using url=https://repos.fedorapeople.org/pulp/pulp/demo_repos/test_file_repo/PULP_MANIFEST
3 - Create a second remote using url=https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/
Sync the repository using the first remote.
Verify the status of the task.
Sync the repository using the second remote.
Verify the status of the task.
Traceback:
[root@p3 ~]# journalctl -f
-- Logs begin at Thu 2018-12-20 15:22:38 EST. --
Feb 26 17:09:14 p3.pulp.vm systemd[1]: Started Session 3 of user root.
Feb 26 17:09:14 p3.pulp.vm sshd[902]: pam_unix(sshd:session): session opened for user root by (uid=0)
Feb 26 17:09:14 p3.pulp.vm audit[902]: USER_START pid=902 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_namespace,pam_keyinit,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="root" exe="/usr/sbin/sshd" hostname=192.168.122.1 addr=192.168.122.1 terminal=ssh res=success'
Feb 26 17:09:14 p3.pulp.vm audit[905]: CRYPTO_KEY_USER pid=905 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:8b:6d:ec:d8:bb:83:9a:97:48:94:6f:6a:7f:c4:a5:5e:e8:86:03:29:e2:25:b3:2d:df:11:f1:16:25:9c:a4:ef direction=? spid=905 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:14 p3.pulp.vm audit[905]: CRYPTO_KEY_USER pid=905 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:05:24:79:01:95:10:79:7e:c3:6c:a4:38:f5:5f:47:75:81:99:9f:5b:32:1d:f4:d0:62:21:49:33:55:1b:52:3c direction=? spid=905 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:14 p3.pulp.vm audit[905]: CRYPTO_KEY_USER pid=905 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:bb:33:a9:e3:a4:50:f1:19:3a:da:f7:28:30:00:ca:65:24:77:f6:5d:07:79:cf:81:0b:ec:3b:19:7d:2a:87:bb direction=? spid=905 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:14 p3.pulp.vm audit[905]: CRED_ACQ pid=905 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_localuser,pam_unix acct="root" exe="/usr/sbin/sshd" hostname=192.168.122.1 addr=192.168.122.1 terminal=ssh res=success'
Feb 26 17:09:14 p3.pulp.vm audit[902]: USER_LOGIN pid=902 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/sbin/sshd" hostname=? addr=192.168.122.1 terminal=/dev/pts/1 res=success'
Feb 26 17:09:14 p3.pulp.vm audit[902]: USER_START pid=902 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/sbin/sshd" hostname=? addr=192.168.122.1 terminal=/dev/pts/1 res=success'
Feb 26 17:09:14 p3.pulp.vm audit[902]: CRYPTO_KEY_USER pid=902 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:bb:33:a9:e3:a4:50:f1:19:3a:da:f7:28:30:00:ca:65:24:77:f6:5d:07:79:cf:81:0b:ec:3b:19:7d:2a:87:bb direction=? spid=906 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:10:38 p3.pulp.vm audit[746]: AVC avc: denied { name_connect } for pid=746 comm="nginx" dest=8000 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:soundd_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:38 p3.pulp.vm audit[840]: AVC avc: denied { name_connect } for pid=840 comm="gunicorn" dest=5432 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:38 p3.pulp.vm audit[840]: AVC avc: denied { name_connect } for pid=840 comm="gunicorn" dest=6379 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:redis_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:38 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function synchronize at 0x7f5a7a463ae8>, '5cb293da-40e6-4f31-955e-ccb85a2d0b21', ['/pulp/api/v3/repositories/1/', '/pulp/api/v3/remotes/file/file/2/'], (), {'remote_pk': 2, 'repository_pk': 1, 'mirror': True}, {}) (9429d5be-3777-4f81-b32b-e5e16e2bb2ac)
Feb 26 17:10:38 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulp_file.app.tasks.synchronizing.synchronize(mirror=True, remote_pk=2, repository_pk=1) (5cb293da-40e6-4f31-955e-ccb85a2d0b21)
Feb 26 17:10:38 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (9429d5be-3777-4f81-b32b-e5e16e2bb2ac)
Feb 26 17:10:39 p3.pulp.vm audit[940]: AVC avc: denied { name_connect } for pid=940 comm="rq" dest=443 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:39 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (5cb293da-40e6-4f31-955e-ccb85a2d0b21)
Feb 26 17:10:39 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('5cb293da-40e6-4f31-955e-ccb85a2d0b21') (189f1b6e-b69a-4860-8413-2b2ed268ff3b)
Feb 26 17:10:39 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (189f1b6e-b69a-4860-8413-2b2ed268ff3b)
Feb 26 17:10:41 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function synchronize at 0x7f5a7a45b840>, '6fbfa453-0571-42b1-b993-fce3b4d16dca', ['/pulp/api/v3/repositories/1/', '/pulp/api/v3/remotes/rpm/rpm/1/'], (), {'remote_pk': 1, 'repository_pk': 1}, {}) (50831c0d-7d01-4d7f-a145-ca17bf53744e)
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulp_rpm.app.tasks.synchronizing.synchronize(remote_pk=1, repository_pk=1) (6fbfa453-0571-42b1-b993-fce3b4d16dca)
Feb 26 17:10:41 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (50831c0d-7d01-4d7f-a145-ca17bf53744e)
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Synchronizing: repository=43ff3efc-1759-461c-a712-8554cdc06423 remote=18f990d0-17dd-492e-a026-85670f6da203
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: group. Skipped.
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: group_gz. Skipped.
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: other_db. Skipped.
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: primary_db. Skipped.
Feb 26 17:10:41 p3.pulp.vm rq[819]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: filelists_db. Skipped.
Feb 26 17:10:43 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (6fbfa453-0571-42b1-b993-fce3b4d16dca)
Feb 26 17:10:43 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('6fbfa453-0571-42b1-b993-fce3b4d16dca') (831d1d88-d6e7-49cc-b27a-a5ffa7c2b5fd)
Feb 26 17:10:43 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (831d1d88-d6e7-49cc-b27a-a5ffa7c2b5fd)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: /usr/local/lib/pulp/lib64/python3.7/site-packages/whitenoise/base.py:104: UserWarning: No directory at: /var/lib/pulp/static/
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: warnings.warn(u'No directory at: {}'.format(root))
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/tasks/2/
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: Traceback (most recent call last):
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: response = get_response(request)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: response = self.process_exception_by_middleware(e, request)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: return view_func(*args, **kwargs)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/viewsets.py", line 116, in view
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: return self.dispatch(request, *args, **kwargs)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 495, in dispatch
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: response = self.handle_exception(exc)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 455, in handle_exception
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: self.raise_uncaught_exception(exc)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 492, in dispatch
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: response = handler(request, *args, **kwargs)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/mixins.py", line 58, in retrieve
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: return Response(serializer.data)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 563, in data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: ret = super(Serializer, self).data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 262, in data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: self._data = self.to_representation(self.instance)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: ret[field.field_name] = field.to_representation(attribute)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/relations.py", line 542, in to_representation
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: for value in iterable
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/relations.py", line 542, in <listcomp>
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: for value in iterable
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/pulpcore/app/serializers/task.py", line 25, in to_representation
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: return serializer.data.get('_href')
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 563, in data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: ret = super(Serializer, self).data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 262, in data
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: self._data = self.to_representation(self.instance)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: ret[field.field_name] = field.to_representation(attribute)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/fields.py", line 1893, in to_representation
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: return method(value)
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/pulpcore/app/serializers/repository.py", line 405, in get_content_removed_hrefs
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: ctype_model = obj.content.filter(_type=ctype).first().cast().__class__
Feb 26 17:10:45 p3.pulp.vm gunicorn[808]: AttributeError: 'NoneType' object has no attribute 'cast'
Feb 26 17:10:45 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function delete at 0x7f5a7a819c80>, '46134d53-d6ff-4ec4-a1f0-b532d2d045f8', ['/pulp/api/v3/repositories/1/'], (), {'repo_id': 1}, {}) (7c5edbd9-c3ee-47d1-bc7e-15d9f5808905)
Feb 26 17:10:45 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: pulpcore.app.tasks.repository.delete(repo_id=1) (46134d53-d6ff-4ec4-a1f0-b532d2d045f8)
Feb 26 17:10:45 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (7c5edbd9-c3ee-47d1-bc7e-15d9f5808905)
Feb 26 17:10:45 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: Job OK (46134d53-d6ff-4ec4-a1f0-b532d2d045f8)
Feb 26 17:10:45 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('46134d53-d6ff-4ec4-a1f0-b532d2d045f8') (174b3e7c-85e3-4b4e-9620-8cc542a5e0c3)
Feb 26 17:10:46 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: Job OK (174b3e7c-85e3-4b4e-9620-8cc542a5e0c3)
Feb 26 17:10:47 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function general_delete at 0x7f5a7a819b70>, 'd28287ce-5560-4d55-9ef7-d9991124d41a', ['/pulp/api/v3/remotes/file/file/2/'], ('2', 'file', 'FileRemoteSerializer'), {}, {}) (6b3b1976-c1bb-4767-8b80-e17168e9caed)
Feb 26 17:10:48 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.app.tasks.base.general_delete('2', 'file', 'FileRemoteSerializer') (d28287ce-5560-4d55-9ef7-d9991124d41a)
Feb 26 17:10:48 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (6b3b1976-c1bb-4767-8b80-e17168e9caed)
Feb 26 17:10:48 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (d28287ce-5560-4d55-9ef7-d9991124d41a)
Feb 26 17:10:48 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('d28287ce-5560-4d55-9ef7-d9991124d41a') (d2701836-1d53-4108-97e5-ce915b2af880)
Feb 26 17:10:48 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (d2701836-1d53-4108-97e5-ce915b2af880)
Feb 26 17:10:50 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function general_delete at 0x7f5a7a819b70>, '52e0daf5-dafb-4e71-9a1d-90e07f763a94', ['/pulp/api/v3/remotes/rpm/rpm/1/'], ('1', 'rpm', 'RpmRemoteSerializer'), {}, {}) (dec1b511-c694-4614-8f1d-b2ae0788807f)
Feb 26 17:10:50 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.app.tasks.base.general_delete('1', 'rpm', 'RpmRemoteSerializer') (52e0daf5-dafb-4e71-9a1d-90e07f763a94)
Feb 26 17:10:50 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (dec1b511-c694-4614-8f1d-b2ae0788807f)
Feb 26 17:10:50 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (52e0daf5-dafb-4e71-9a1d-90e07f763a94)
Feb 26 17:10:50 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('52e0daf5-dafb-4e71-9a1d-90e07f763a94') (2f360f51-718e-467a-8408-9c1ce54ade31)
Feb 26 17:10:50 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (2f360f51-718e-467a-8408-9c1ce54ade31)
Using a script:
http POST http://localhost:80/pulp/api/v3/repositories/ name=foo
export REPO_HREF=$(http localhost:80/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')
http POST http://localhost:80/pulp/api/v3/remotes/file/file/ name='bar' url='https://repos.fedorapeople.org/pulp/pulp/demo_repos/test_file_repo/PULP_MANIFEST'
export FILE_REMOTE_HREF=$(http localhost:80/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "bar") | ._href')
http POST http://localhost:80${FILE_REMOTE_HREF}sync/ repository=$REPO_HREF mirror=True
sleep 3
http GET http://localhost:80/pulp/api/v3/tasks/1/
http POST http://localhost:80/pulp/api/v3/remotes/rpm/rpm/ name='zoo' url='https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/'
export RPM_REMOTE_HREF=$(http :80/pulp/api/v3/remotes/rpm/rpm/ | jq -r '.results[] | select(.name == "zoo") | ._href')
http POST http://localhost:80${RPM_REMOTE_HREF}sync/ repository=$REPO_HREF mirror=True
sleep 3
http GET http://localhost:80/pulp/api/v3/tasks/2/
Traceback.
[root@p3 ~]# journalctl -f
-- Logs begin at Thu 2018-12-20 15:22:38 EST. --
Feb 26 17:09:10 p3.pulp.vm audit[904]: CRYPTO_KEY_USER pid=904 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:05:24:79:01:95:10:79:7e:c3:6c:a4:38:f5:5f:47:75:81:99:9f:5b:32:1d:f4:d0:62:21:49:33:55:1b:52:3c direction=? spid=904 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:10 p3.pulp.vm audit[904]: CRYPTO_KEY_USER pid=904 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:bb:33:a9:e3:a4:50:f1:19:3a:da:f7:28:30:00:ca:65:24:77:f6:5d:07:79:cf:81:0b:ec:3b:19:7d:2a:87:bb direction=? spid=904 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:10 p3.pulp.vm audit[904]: CRED_ACQ pid=904 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_localuser,pam_unix acct="root" exe="/usr/sbin/sshd" hostname=192.168.122.1 addr=192.168.122.1 terminal=ssh res=success'
Feb 26 17:09:10 p3.pulp.vm audit[901]: USER_LOGIN pid=901 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/sbin/sshd" hostname=? addr=192.168.122.1 terminal=/dev/pts/1 res=success'
Feb 26 17:09:10 p3.pulp.vm audit[901]: USER_START pid=901 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/sbin/sshd" hostname=? addr=192.168.122.1 terminal=/dev/pts/1 res=success'
Feb 26 17:09:10 p3.pulp.vm audit[901]: CRYPTO_KEY_USER pid=901 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:bb:33:a9:e3:a4:50:f1:19:3a:da:f7:28:30:00:ca:65:24:77:f6:5d:07:79:cf:81:0b:ec:3b:19:7d:2a:87:bb direction=? spid=905 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:09:11 p3.pulp.vm chronyd[710]: Selected source 107.181.191.189
Feb 26 17:09:12 p3.pulp.vm chronyd[710]: Source 69.10.161.7 replaced with 198.46.223.227
Feb 26 17:09:18 p3.pulp.vm audit[901]: USER_START pid=901 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/sbin/sshd" hostname=? addr=192.168.122.1 terminal=/dev/pts/2 res=success'
Feb 26 17:09:18 p3.pulp.vm audit[901]: CRYPTO_KEY_USER pid=901 uid=0 auid=0 ses=3 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:bb:33:a9:e3:a4:50:f1:19:3a:da:f7:28:30:00:ca:65:24:77:f6:5d:07:79:cf:81:0b:ec:3b:19:7d:2a:87:bb direction=? spid=927 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Feb 26 17:10:29 p3.pulp.vm audit[746]: AVC avc: denied { name_connect } for pid=746 comm="nginx" dest=8000 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:soundd_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:29 p3.pulp.vm audit[840]: AVC avc: denied { name_connect } for pid=840 comm="gunicorn" dest=5432 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:30 p3.pulp.vm audit[840]: AVC avc: denied { name_connect } for pid=840 comm="gunicorn" dest=6379 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:redis_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:30 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function synchronize at 0x7f5a7a463ae8>, '7d7edd3d-f619-43bd-a4ba-8bf6aa41081b', ['/pulp/api/v3/repositories/1/', '/pulp/api/v3/remotes/file/file/1/'], (), {'remote_pk': 1, 'repository_pk': 1, 'mirror': True}, {}) (b0ab11fe-f36e-4441-956c-70fcadd997dd)
Feb 26 17:10:30 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulp_file.app.tasks.synchronizing.synchronize(mirror=True, remote_pk=1, repository_pk=1) (7d7edd3d-f619-43bd-a4ba-8bf6aa41081b)
Feb 26 17:10:30 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (b0ab11fe-f36e-4441-956c-70fcadd997dd)
Feb 26 17:10:30 p3.pulp.vm audit[996]: AVC avc: denied { name_connect } for pid=996 comm="rq" dest=443 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=1
Feb 26 17:10:33 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (7d7edd3d-f619-43bd-a4ba-8bf6aa41081b)
Feb 26 17:10:33 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('7d7edd3d-f619-43bd-a4ba-8bf6aa41081b') (51e443f0-59bf-4dab-80b9-3b3d55a9939a)
Feb 26 17:10:33 p3.pulp.vm rq[819]: pulp: rq.worker:INFO: reserved-resource-worker-1@p3.pulp.vm: Job OK (51e443f0-59bf-4dab-80b9-3b3d55a9939a)
Feb 26 17:10:35 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: pulpcore.tasking.tasks._queue_reserved_task(<function synchronize at 0x7f5a7a45b840>, '0686f7b1-94f5-4dba-b062-d527c7776634', ['/pulp/api/v3/repositories/1/', '/pulp/api/v3/remotes/rpm/rpm/2/'], (), {'remote_pk': 2, 'repository_pk': 1}, {}) (b9089fa5-e1b1-43ef-8ca9-0caf15f0384c)
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: pulp_rpm.app.tasks.synchronizing.synchronize(remote_pk=2, repository_pk=1) (0686f7b1-94f5-4dba-b062-d527c7776634)
Feb 26 17:10:35 p3.pulp.vm rq[811]: pulp: rq.worker:INFO: resource-manager: Job OK (b9089fa5-e1b1-43ef-8ca9-0caf15f0384c)
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Synchronizing: repository=foo remote=zoo
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: group. Skipped.
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: group_gz. Skipped.
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: other_db. Skipped.
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: primary_db. Skipped.
Feb 26 17:10:35 p3.pulp.vm rq[815]: pulp: pulp_rpm.app.tasks.synchronizing:INFO: Unknown repodata type: filelists_db. Skipped.
Feb 26 17:10:36 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: Job OK (0686f7b1-94f5-4dba-b062-d527c7776634)
Feb 26 17:10:36 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: pulpcore.tasking.tasks._release_resources('0686f7b1-94f5-4dba-b062-d527c7776634') (1fbabb27-c80d-4301-806d-2d73cc97f1be)
Feb 26 17:10:36 p3.pulp.vm rq[815]: pulp: rq.worker:INFO: reserved-resource-worker-2@p3.pulp.vm: Job OK (1fbabb27-c80d-4301-806d-2d73cc97f1be)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: /usr/local/lib/pulp/lib64/python3.7/site-packages/whitenoise/base.py:104: UserWarning: No directory at: /var/lib/pulp/static/
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: warnings.warn(u'No directory at: {}'.format(root))
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: /usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/pagination.py:198: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'pulpcore.app.models.repository.Repository'> QuerySet.
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: paginator = self.django_paginator_class(queryset, page_size)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: /usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/pagination.py:198: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'pulp_file.app.models.FileRemote'> QuerySet.
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: paginator = self.django_paginator_class(queryset, page_size)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: /usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/pagination.py:198: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'pulp_rpm.app.models.RpmRemote'> QuerySet.
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: paginator = self.django_paginator_class(queryset, page_size)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/tasks/2/
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: Traceback (most recent call last):
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: response = get_response(request)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: response = self.process_exception_by_middleware(e, request)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: return view_func(*args, **kwargs)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/viewsets.py", line 116, in view
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: return self.dispatch(request, *args, **kwargs)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 495, in dispatch
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: response = self.handle_exception(exc)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 455, in handle_exception
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: self.raise_uncaught_exception(exc)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 492, in dispatch
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: response = handler(request, *args, **kwargs)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/mixins.py", line 58, in retrieve
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: return Response(serializer.data)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 563, in data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: ret = super(Serializer, self).data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 262, in data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: self._data = self.to_representation(self.instance)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: ret[field.field_name] = field.to_representation(attribute)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/relations.py", line 542, in to_representation
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: for value in iterable
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/relations.py", line 542, in <listcomp>
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: for value in iterable
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/pulpcore/app/serializers/task.py", line 25, in to_representation
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: return serializer.data.get('_href')
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 563, in data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: ret = super(Serializer, self).data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 262, in data
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: self._data = self.to_representation(self.instance)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: ret[field.field_name] = field.to_representation(attribute)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/fields.py", line 1893, in to_representation
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: return method(value)
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: File "/usr/local/lib/pulp/lib64/python3.7/site-packages/pulpcore/app/serializers/repository.py", line 405, in get_content_removed_hrefs
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: ctype_model = obj.content.filter(_type=ctype).first().cast().__class__
Feb 26 17:10:38 p3.pulp.vm gunicorn[808]: AttributeError: 'NoneType' object has no attribute 'cast'
Pulp 3 - installation from source from FEB/26.
Related issues
Updated by kersom almost 6 years ago
- Related to Test #4274: Test that one repo can be synced with different remote content types added
Updated by bmbouter over 5 years ago
I just tried to reproduce this against the source checkout of rc1. I was not able to reproduce the traceback. I used this reproducer:
http POST http://localhost:8000/pulp/api/v3/repositories/ name=foo
export REPO_HREF=$(http localhost:8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')
http POST http://localhost:8000/pulp/api/v3/remotes/file/file/ name='bar' url='https://repos.fedorapeople.org/pulp/pulp/demo_repos/test_file_repo/PULP_MANIFEST'
export FILE_REMOTE_HREF=$(http localhost:8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "bar") | ._href')
http POST http://localhost:8000${FILE_REMOTE_HREF}sync/ repository=$REPO_HREF mirror=True
sleep 3
http POST http://localhost:8000/pulp/api/v3/remotes/rpm/rpm/ name='zoo' url='https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/'
export RPM_REMOTE_HREF=$(http :8000/pulp/api/v3/remotes/rpm/rpm/ | jq -r '.results[] | select(.name == "zoo") | ._href')
http POST http://localhost:8000${RPM_REMOTE_HREF}sync/ repository=$REPO_HREF mirror=True
The second task had the following good output:
Connection: close
Content-Length: 1000
Content-Type: application/json
Date: Mon, 08 Apr 2019 21:00:07 GMT
Server: gunicorn/19.9.0
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"_created": "2019-04-08T20:59:58.059377Z",
"_href": "/pulp/api/v3/tasks/4828b401-fecd-47ae-882e-685e81876b21/",
"created_resources": [
"/pulp/api/v3/repositories/b0722625-52db-4265-bfca-4b9e215cfe48/versions/2/"
],
"error": null,
"finished_at": "2019-04-08T20:59:59.529326Z",
"name": "pulp_rpm.app.tasks.synchronizing.synchronize",
"non_fatal_errors": [],
"parent": null,
"progress_reports": [
{
"done": 5,
"message": "Downloading and Parsing Metadata",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/4828b401-fecd-47ae-882e-685e81876b21/",
"total": 5
},
{
"done": 35,
"message": "Downloading Artifacts",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/4828b401-fecd-47ae-882e-685e81876b21/",
"total": 35
},
{
"done": 39,
"message": "Associating Content",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/4828b401-fecd-47ae-882e-685e81876b21/",
"total": 39
}
],
"spawned_tasks": [],
"started_at": "2019-04-08T20:59:58.163725Z",
"state": "completed",
"worker": "/pulp/api/v3/workers/b7c3d78c-e98d-48e5-9e6b-9d1413de16b6/"
}
Updated by kersom over 5 years ago
Tested against Pulp 3 installation from source - April/09.
Last task output.
[root@p3 ~]# http GET http://localhost:80/pulp/api/v3/tasks/81bdeb74-ee54-4848-a004-cb2d020d5912/
HTTP/1.1 200 OK
Allow: GET, DELETE, HEAD, OPTIONS
Connection: keep-alive
Content-Length: 1000
Content-Type: application/json
Date: Fri, 21 Dec 2018 00:15:53 GMT
Server: nginx/1.14.2
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"_created": "2018-12-21T00:15:33.694207Z",
"_href": "/pulp/api/v3/tasks/81bdeb74-ee54-4848-a004-cb2d020d5912/",
"created_resources": [
"/pulp/api/v3/repositories/0bb9330d-af79-4da3-9099-c7dc8a8739ff/versions/2/"
],
"error": null,
"finished_at": "2018-12-21T00:15:35.007874Z",
"name": "pulp_rpm.app.tasks.synchronizing.synchronize",
"non_fatal_errors": [],
"parent": null,
"progress_reports": [
{
"done": 5,
"message": "Downloading and Parsing Metadata",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/81bdeb74-ee54-4848-a004-cb2d020d5912/",
"total": 5
},
{
"done": 35,
"message": "Downloading Artifacts",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/81bdeb74-ee54-4848-a004-cb2d020d5912/",
"total": 35
},
{
"done": 39,
"message": "Associating Content",
"state": "completed",
"suffix": "",
"task": "/pulp/api/v3/tasks/81bdeb74-ee54-4848-a004-cb2d020d5912/",
"total": 39
}
],
"spawned_tasks": [],
"started_at": "2018-12-21T00:15:33.824896Z",
"state": "completed",
"worker": "/pulp/api/v3/workers/c99c02bb-4cd1-4f1a-9fe9-4322fa6e47c7/"
}
Pulp component versions:
([{'component': 'pulpcore', 'version': '3.0.0rc1'},
{'component': 'pulpcore-plugin', 'version': '0.1.0rc1'},
{'component': 'pulp_rpm', 'version': '3.0.0b2'},
{'component': 'pulp_file', 'version': '0.0.1b10'},
{'component': 'pulp_docker', 'version': '4.0.0b2'},
{'component': 'pulp_certguard', 'version': '0.1.0rc1'},
{'component': 'pulp_ansible', 'version': '0.1.0rc4'}],)
Updated by kersom over 5 years ago
- Status changed from NEW to CLOSED - WORKSFORME