Project

Profile

Help

Issue #2744

closed

DeprecationWarning is being spammed in the logs when running pulp in production

Added by daviddavis about 7 years ago. Updated about 5 years ago.

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

Description

Not sure if this is an issue with pulp or the way katello is configuring pulp but we're seeing DeprecationWarning in the logs.

Appears to mostly fit two patterns. The first is:

May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[797]: celery.worker.strategy:INFO: Received task: pulp.server.controllers.repository.download_deferred[ae136c7a-72fe-44ae-b330-4c84dc9ab429]
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904) /usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py:536: DeprecationWarning: update is deprecat
ed. Use replace_one, update_one or update_many instead.
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904)   TaskStatus._get_collection().update({'task_id': task_id}, update, upsert=True)
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904)
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904) /usr/lib64/python2.7/site-packages/pymongo/topology.py:74: UserWarning: MongoClient opened before fork. Creat
e MongoClient with connect=False, or create client after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#using-pymongo-with-multiprocessing>
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904)   "MongoClient opened before fork. Create MongoClient "
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[13334]: py.warnings:WARNING: (13334-91904)
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[791]: celery.worker.job:INFO: Task pulp.server.controllers.repository.queue_download_deferred[65b7fed6-2913-4148-9600-6643b065e7ad] succeeded in 0.06172
22450674s: None
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672) /usr/lib/python2.7/site-packages/mongoengine/queryset/base.py:461: DeprecationWarning: update is deprecated. Us
e replace_one, update_one or update_many instead.
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672)   upsert=upsert, **write_concern)
May 03 00:05:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672)
May 03 00:05:31 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672) /usr/lib/python2.7/site-packages/mongoengine/document.py:367: DeprecationWarning: update is deprecated. Use rep
lace_one, update_one or update_many instead.
May 03 00:05:31 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672)   upsert=upsert, **write_concern)
May 03 00:05:31 sat-r220-09.lab.eng.rdu2.redhat.com pulp[8733]: py.warnings:WARNING: (8733-12672)
May 03 00:05:31 sat-r220-09.lab.eng.rdu2.redhat.com pulp[797]: celery.worker.job:INFO: Task pulp.server.controllers.repository.download_deferred[ae136c7a-72fe-44ae-b330-4c84dc9ab429] succeeded in 1.04428261891
s: None

The second:

May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[9133]: py.warnings:WARNING: (9133-34368) /usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py:536: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[9133]: py.warnings:WARNING: (9133-34368)   TaskStatus._get_collection().update({'task_id': task_id}, update, upsert=True)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[9133]: py.warnings:WARNING: (9133-34368)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544) /usr/lib/python2.7/site-packages/mongoengine/queryset/base.py:461: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544)   upsert=upsert, **write_concern)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[794]: celery.worker.job:INFO: Task pulp.server.controllers.repository.queue_download_deferred[6235facf-a058-4667-94dd-d581f9bf0eae] succeeded in 0.0407170839608s: None
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544) /usr/lib/python2.7/site-packages/mongoengine/document.py:367: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544)   upsert=upsert, **write_concern)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[10053]: py.warnings:WARNING: (10053-60544)
May 03 00:15:30 sat-r220-09.lab.eng.rdu2.redhat.com pulp[810]: celery.worker.job:INFO: Task pulp.server.controllers.repository.download_deferred[0ce23253-42f8-4001-a9d9-59b9a74f4d8c] succeeded in 0.0416361950338s: None

Related issues

Is duplicate of Pulp - Issue #2004: Pulp logs many DeprecationWarningsCLOSED - CURRENTRELEASEsemyersActions
Actions #3

Updated by daviddavis about 7 years ago

Actually, I found some more DeprecationWarnings on a different Katello server:

May  2 14:13:40 satellite1 pulp: pulp.server.db.connection:INFO: Attempting to connect to localhost:27017
May  2 14:13:40 satellite1 pulp: pulp.server.db.connection:INFO: Attempting to connect to localhost:27017
May  2 14:13:40 satellite1 pulp: pulp.server.db.connection:INFO: Write concern for Mongo connection: {}
May  2 14:13:40 satellite1 pulp: py.warnings:WARNING: (3406-68096) /usr/lib/python2.7/site-packages/pulp/server/db/connection.py:159: DeprecationWarning: add_son_manipulator is deprecated
May  2 14:13:40 satellite1 pulp: py.warnings:WARNING: (3406-68096)   _DATABASE.add_son_manipulator(NamespaceInjector())
May  2 14:13:40 satellite1 pulp: py.warnings:WARNING: (3406-68096)
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: docker_blob = pulp_docker.plugins.models:Blob
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: docker_image = pulp_docker.plugins.models:Image
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: docker_tag = pulp_docker.plugins.models:Tag
May  2 14:13:40 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loaded plugin iso_importer for types: iso
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loaded plugin puppet_whole_repo_profiler for types: puppet_module
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loaded plugin yum_profiler for types: rpm,erratum
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loaded plugin yum for types: rpm
May  2 14:13:41 satellite1 pulp: pulp.plugins.loader.manager:INFO: Loaded plugin rhui for types: rpm
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096) /usr/lib/python2.7/site-packages/pulp/server/db/model/base.py:96: DeprecationWarning: ensure_index is deprecated. Use create_index instead.
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096)   unique=unique, background=True)
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096)
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096) /usr/lib/python2.7/site-packages/mongoengine/queryset/base.py:420: DeprecationWarning: remove is deprecated. Use delete_one or delete_many instead.
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096)   result = queryset._collection.remove(queryset._query, **write_concern)
May  2 14:13:41 satellite1 pulp: py.warnings:WARNING: (3406-68096)
Actions #4

Updated by bmbouter about 7 years ago

  • Platform Release deleted (2.8.7)

This issue is newly reported so it couldn't have been fixed in 2.8.7. I'm unsetting the platform release.

Actions #5

Updated by bmbouter about 7 years ago

I think this issue is being tracked over 4-5 other issues already in the tracker and fixed in various places. Before accepting at triage we need to determine if this is reporting something new or if it should be closed as a duplicate.

Actions #6

Updated by daviddavis about 7 years ago

  • Is duplicate of Issue #2004: Pulp logs many DeprecationWarnings added
Actions #7

Updated by daviddavis about 7 years ago

  • Status changed from NEW to CLOSED - DUPLICATE
Actions #8

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF