Project

Profile

Help

Issue #2723

closed

As a user GET /crane/repositories/v2 shows v2 repositories

Added by Ichimonji10 almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
3. High
Version - Crane:
Platform Release:
2.14.0
Target Release - Crane:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 20
Quarter:

Description

Let's say that you've correctly installed the pulp_docker plugin and Crane. Let's say that you've also created, synced and published some Docker repositories. (v1 or v2 - it doesn't matter) You can now issue an HTTP GET request to /crane/repositories and get a report stating which repositories are available and the contents of each of those repositories. The report that's returned should look like this:

{
    "pulpdemo-busybox": {
        "image_ids": [
            "2982ec56c8d910121e7594ca7890b062f6d37fadf7575f6a6f3adbabbafac9f5",
            "2aed48a4e41d3931167146e9b7492aa5639e7f6478be9eac584726ecec6824ed",
            "492dad4279bae5bb73648efe9bf467b2cfa8bab1d593595226e3e7a95d9f6c35",
            "4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125",
            "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
            "618b1fc306b06d11e192812ede4c685dcbf886d2a0189e9a552c550fd7663df0",
            "df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b",
            "e8a999563c473139dc74d02eefb7b13ffea63799bc05b8936b9ad7119b37742f",
            "ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2",
            "f6169d24347d30de48e4493836bec15c78a34f08cc7f17d6a45a19d68dc283ac"
        ],
        "protected": false,
        "tags": {
            "buildroot-2013.08.1": "2982ec56c8d910121e7594ca7890b062f6d37fadf7575f6a6f3adbabbafac9f5",
            "buildroot-2014.02": "2aed48a4e41d3931167146e9b7492aa5639e7f6478be9eac584726ecec6824ed",
            "latest": "4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125",
            "ubuntu-12.04": "492dad4279bae5bb73648efe9bf467b2cfa8bab1d593595226e3e7a95d9f6c35",
            "ubuntu-14.04": "f6169d24347d30de48e4493836bec15c78a34f08cc7f17d6a45a19d68dc283ac"
        }
    },
    "pulpdemo-busybox2": {
        "image_ids": [
            "2982ec56c8d910121e7594ca7890b062f6d37fadf7575f6a6f3adbabbafac9f5",
            "2aed48a4e41d3931167146e9b7492aa5639e7f6478be9eac584726ecec6824ed",
            "492dad4279bae5bb73648efe9bf467b2cfa8bab1d593595226e3e7a95d9f6c35",
            "4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125",
            "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
            "618b1fc306b06d11e192812ede4c685dcbf886d2a0189e9a552c550fd7663df0",
            "df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b",
            "e8a999563c473139dc74d02eefb7b13ffea63799bc05b8936b9ad7119b37742f",
            "ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2",
            "f6169d24347d30de48e4493836bec15c78a34f08cc7f17d6a45a19d68dc283ac"
        ],
        "protected": false,
        "tags": {
            "buildroot-2013.08.1": "2a4d48a4e51d39a1167146e9b7492aa5639e7f6478be9eac584726ecec6824ed",
            "latest": "4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125",
            "ubuntu-12.04": "492dad4279bae5bb73648efe9bf467b2cfa8bab1d593595226e3e7a95d9f6c35",
            "ubuntu-14.04": "f6169d24347d30de48e4493836bec15c78a34f08cc7f17d6a45a19d68dc283ac"
        }
    }
}

Instead, the reports look like this:

{
    "pulpdemo-busybox": {
        "image_ids": [],
        "protected": false,
        "tags": {}
    },
    "pulpdemo-busybox2": {
        "image_ids": [],
        "protected": false,
        "tags": {}
    }
}

That's not right. Here's a script to reproduce the issue:

#!/usr/bin/env bash
pulp-admin docker repo create --repo-id foo --feed https://index.docker.io --upstream-name library/busybox
pulp-admin docker repo sync run --repo-id foo
pulp-admin docker repo publish run --repo-id foo

pulp-admin docker repo create --repo-id bar --feed https://registry-1.docker.io --upstream-name library/busybox
pulp-admin docker repo sync run --repo-id bar
pulp-admin docker repo publish run --repo-id bar

systemctl restart httpd  # make crane read metadata
curl -H 'accept:application/json' http://localhost:5000/crane/repositories | python -m json.tool

Here's the tail end of its output:

{
    "bar": {
        "image_ids": [],
        "protected": false,
        "tags": {}
    },
    "foo": {
        "image_ids": [],
        "protected": false,
        "tags": {}
    }
}

I've tested this issue against a matrix of nine VMs, where one axis is nightly builds of Pulp 2.12, 2.13 and 2.14, and the other axis is F24, F25 and RHEL7.

Also available in: Atom PDF