Project

Profile

Help

Issue #7786

closed

Pulp_rpm sync reports "completed" but does not update packages

Added by Aant over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
4. Urgent
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

This is a copy of https://pulp.plan.io/issues/7535?next_issue_id=7534. The issue persists. Even if I delete and recreate the publication and distribution after synchronization I still experience this issue. This is a very severe bug as it makes me believe that my systems are up to date while they are not.

What would be the proper workflow to resynchronise a repo after it is created?

I have set up Pulpcore v3.6.3 with Pulp_rpm v3.6.2 - later updated both to 3.7.0. I created the following remote:

{
  "pulp_href": "/pulp/api/v3/remotes/rpm/rpm/d8fb524c-e73b-4afc-ba2e-05eea7f5b6a8/",
  "pulp_created": "2020-08-18T08:47:19.183836Z",
  "name": "centos8_base",
  "url": "http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os/",
  "ca_cert": null,
  "client_cert": null,
  "client_key": null,
  "tls_validation": true,
  "proxy_url": "http://<proxy server>",
  "username": null,
  "password": null,
  "pulp_last_updated": "2020-08-18T08:47:19.183855Z",
  "download_concurrency": 10,
  "policy": "immediate",
  "sles_auth_token": null
}

and this repository:

{
  "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/7696b222-3788-4754-b4a6-747e64228d7a/",
  "pulp_created": "2020-08-18T08:47:17.704104Z",
  "versions_href": "/pulp/api/v3/repositories/rpm/rpm/7696b222-3788-4754-b4a6-747e64228d7a/versions/",
  "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/7696b222-3788-4754-b4a6-747e64228d7a/versions/1/",
  "name": "centos8_base",
  "description": null,
  "remote": null,
  "metadata_signing_service": null,
  "retain_package_versions": 0
}

If I sync, it reports success:

http --auth admin --auth-type basic :9000/pulp/api/v3/repositories/rpm/rpm/7696b222-3788-4754-b4a6-747e64228d7a/sync/ remote=/pulp/api/v3/remotes/rpm/rpm/d8fb524c-e73b-4afc-ba2e-05eea7f5b6a8/
http: password for admin@localhost:9000:
HTTP/1.1 202 Accepted
Allow: POST, OPTIONS
Connection: close
Content-Length: 67
Content-Type: application/json
Date: Mon, 21 Sep 2020 08:10:11 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "task": "/pulp/api/v3/tasks/655d2e7b-2783-4496-a851-3bcd8d5e442e/"
}

Let's take a closer look at the task:

 http --auth admin --auth-type basic :9000/pulp/api/v3/tasks/655d2e7b-2783-4496-a851-3bcd8d5e442e/
http: password for admin@localhost:9000:
HTTP/1.1 200 OK
Allow: GET, PATCH, DELETE, HEAD, OPTIONS
Connection: close
Content-Length: 743
Content-Type: application/json
Date: Mon, 21 Sep 2020 08:10:29 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "child_tasks": [],
    "created_resources": [],
    "error": null,
    "finished_at": "2020-09-21T08:10:11.585792Z",
    "name": "pulp_rpm.app.tasks.synchronizing.synchronize",
    "parent_task": null,
    "progress_reports": [
        {
            "code": "optimizing.sync",
            "done": 1,
            "message": "Optimizing Sync",
            "state": "completed",
            "suffix": null,
            "total": null
        }
    ],
    "pulp_created": "2020-09-21T08:10:11.257796Z",
    "pulp_href": "/pulp/api/v3/tasks/655d2e7b-2783-4496-a851-3bcd8d5e442e/",
    "reserved_resources_record": [
        "/pulp/api/v3/remotes/rpm/rpm/d8fb524c-e73b-4afc-ba2e-05eea7f5b6a8/",
        "/pulp/api/v3/repositories/rpm/rpm/7696b222-3788-4754-b4a6-747e64228d7a/"
    ],
    "started_at": "2020-09-21T08:10:11.507912Z",
    "state": "completed",
    "task_group": null,
    "worker": "/pulp/api/v3/workers/80ca382e-fdec-4eef-94b4-6c1c67433511/"
}

Let's use this repo on the same machine:

cat /etc/yum.repos.d/CentOS-Base.repo
[Base]
name=CentOS-$releasever - Base
enabled=1
baseurl=https://<myurl>/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

Now if I do yum check-update it does not find any package to update. If I change baseurl= to http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os/ (which is the same url I have in the remote) and I do yum check-update, then it finds 28 outdated packages. How is it possible?


Related issues

Copied from RPM Support - Issue #7535: Pulp_rpm sync reports "completed" but does not update packagesCLOSED - WORKSFORMEActions
Actions #1

Updated by Aant over 3 years ago

  • Copied from Issue #7535: Pulp_rpm sync reports "completed" but does not update packages added
Actions #2

Updated by ttereshc over 3 years ago

The 'Optimizing Sync' means that there were no changes in the upstream repository since your last sync. So when you see ''Optimizing Sync' , nothing is changed in pulp. If you want to skip optimization and force sync, use optimize=False during sync.

Could you take a look at a repository you are configuring in your yum.repos.d? Put the url in the browser and check what is there. Is there a centos 8 repo indeed and does it have any packages which yum check-update (for external url) shows as the ones to upgrade? Thank you.

Actions #3

Updated by ggainey over 3 years ago

Pulp always uses the first-mirror-available, where yum may not (for a variety of reasons) - and mirrors can be in different states at different times. One thing to look at, is whether the behavior persists if you pick a specific CentOS repo-url for both pulp and yum, rather than relying on mirror.centos.org and yum's /var/cache/yum/timedhosts.txt to pick it for us.

Actions #4

Updated by dalley over 3 years ago

@Aant, does optimize=False successfully workaround the problem?

And could you try the yum check-verify step that Tanya suggested? Thank you.

Actions #5

Updated by dalley over 3 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

@Aant, could you please let us know what your outcome was? None of us have been able to encounter this bug thus far, but if you could help us narrow it down and confirm whether it is or is not in the Pulp optimization algorithms, we can dig deeper.

Without that information, there is not much we can do. Please reopen this issue when you respond.

Also available in: Atom PDF