[Pulp-list] rpm distribution not deleted when deleting a repo

Juan Cabrera juan.cabrera at unamur.be
Wed May 22 15:43:56 UTC 2019


I see in the ticket that:

"We decided that we'll allow users to create distributions without
distributing anything. This could be to reserve a path namespace, take a
publication offline quickly without having to delete the distribution, etc"

So, if I'm not wrong, the distribution can be reused and recreating the
repo and the publication and doing again

|http POST http://localhost:24817/pulp/api/v3/distributions/rpm/rpm/
name='baz' base_path='foo' publication=$PUBLICATION_HREF|

no new distribution will be created and the publication will be set to
the already existing distribution, is that correct?

Juan

On 22/05/19 16:52, David Davis wrote:
> Actually I think this is the expected behavior. Distributions can
> exist without serving a publication[0] so I don't think deleting a
> repository or publication should in turn delete the distribution.
>
> [0] https://pulp.plan.io/issues/4840
>
> David
>
>
> On Wed, May 22, 2019 at 10:46 AM Dennis Kliban <dkliban at redhat.com
> <mailto:dkliban at redhat.com>> wrote:
>
>     No it is not. Please file an issue at https://pulp.plan.io/issues/new
>
>     On Wed, May 22, 2019 at 10:13 AM Juan Cabrera
>     <juan.cabrera at unamur.be <mailto:juan.cabrera at unamur.be>> wrote:
>
>         Hi,
>
>         I'm updating my ansible/vagrant project to take into account
>         the new release 3.0.0rc2.
>
>         I use now:
>
>         pulp_source_dir:
>         "git+https://github.com/pulp/pulpcore.git@3.0.0rc2"
>         <mailto:git+https://github.com/pulp/pulpcore.git@3.0.0rc2>
>         pulp_plugin_source_dir:
>         "git+https://github.com/pulp/pulpcore-plugin.git@0.1.0rc2"
>         <mailto:git+https://github.com/pulp/pulpcore-plugin.git@0.1.0rc2>
>           pulp-rpm:
>             app_label: "rpm"
>             source_dir:
>         "git+https://github.com/pulp/pulp_rpm.git@3.0.0b3"
>         <mailto:git+https://github.com/pulp/pulp_rpm.git@3.0.0b3>
>
>         I realized that when removing a repository, the publication
>         that depends on it are removed but that the distribution that
>         depends on the publication are still there.
>
>         Is this the expected result?
>
>         sincerely
>
>         Juan
>
>         PS: Some details:
>
>         - After doing all steps in the documentation
>         <https://pulp-rpm.readthedocs.io/en/latest/workflows/create_sync_publish.html#>
>         I delete the repo
>
>         [vagrant at dev-pulp-server ~]$ http DELETE $PORT$REPO_HREF
>         HTTP/1.1 202 Accepted
>         Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
>         Connection: close
>         Content-Length: 67
>         Content-Type: application/json
>         Date: Wed, 22 May 2019 14:05:42 GMT
>         Server: gunicorn/19.9.0
>         Vary: Accept, Cookie
>         X-Frame-Options: SAMEORIGIN
>
>         {
>             "task":
>         "/pulp/api/v3/tasks/d5e34bc4-f9fc-4184-b991-7619a888a57b/"
>         }
>
>         The distribution is still there but with *"publication": null*
>
>         [vagrant at dev-pulp-server ~]$ http
>         $PORT/pulp/api/v3/distributions/rpm/rpm/
>         HTTP/1.1 200 OK
>         Allow: GET, POST, HEAD, OPTIONS
>         Connection: close
>         Content-Length: 308
>         Content-Type: application/json
>         Date: Wed, 22 May 2019 14:05:47 GMT
>         Server: gunicorn/19.9.0
>         Vary: Accept, Cookie
>         X-Frame-Options: SAMEORIGIN
>
>         {
>             "count": 1,
>             "next": null,
>             "previous": null,
>             "results": [
>                 {
>                     "_created": "2019-05-22T14:04:14.749447Z",
>                     "_href":
>         "/pulp/api/v3/distributions/rpm/rpm/2b2ad506-1ea4-48ec-8406-d941554ca54e/",
>
>                     "base_path": "foo",
>                     "base_url":
>         "dev-pulp-server.ptci.dev:8080/pulp/content/foo
>         <http://dev-pulp-server.ptci.dev:8080/pulp/content/foo>",
>                     "content_guard": null,
>                     "name": "baz",
>                     *"publication": null*
>                 }
>             ]
>         }
>
>         The publication has been removed:
>
>         [vagrant at dev-pulp-server ~]$ http
>         $PORT/pulp/api/v3/publications/rpm/rpm/
>         HTTP/1.1 200 OK
>         Allow: GET, POST, HEAD, OPTIONS
>         Connection: close
>         Content-Length: 52
>         Content-Type: application/json
>         Date: Wed, 22 May 2019 14:06:17 GMT
>         Server: gunicorn/19.9.0
>         Vary: Accept, Cookie
>         X-Frame-Options: SAMEORIGIN
>
>         {
>             "count": 0,
>             "next": null,
>             "previous": null,
>             "results": []
>         }
>
>         -- 
>
>         Juan CABRERA
>         Correspondant informatique
>         Département de Mathématiques
>
>         T. 081724919
>         juan.cabrera at unamur.be <mailto:juan.cabrera at unamur.be>
>         http://staff.unamur.be/jbcabrer
>
>         Université de Namur ASBL
>         Rue de Bruxelles 61 - 5000 Namur
>         Belgique
>
>         Let’s respect the environment together.
>         Only print this message if necessary!
>
>         _______________________________________________
>         Pulp-list mailing list
>         Pulp-list at redhat.com <mailto:Pulp-list at redhat.com>
>         https://www.redhat.com/mailman/listinfo/pulp-list
>
>     _______________________________________________
>     Pulp-list mailing list
>     Pulp-list at redhat.com <mailto:Pulp-list at redhat.com>
>     https://www.redhat.com/mailman/listinfo/pulp-list
>
-- 

Juan CABRERA
Correspondant informatique
Département de Mathématiques

T. 081724919
juan.cabrera at unamur.be <mailto:juan.cabrera at unamur.be>
http://staff.unamur.be/jbcabrer

Université de Namur ASBL
Rue de Bruxelles 61 - 5000 Namur
Belgique

Let’s respect the environment together.
Only print this message if necessary!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190522/c23e24bf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iflbefpfhfnjndkd.png
Type: image/png
Size: 9356 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190522/c23e24bf/attachment.png>


More information about the Pulp-list mailing list