Project

Profile

Help

Issue #4997

Pulp3 Ansible Collection remote doesn't seem to be able to sync more than 1 repo

Added by sajha over 1 year ago. Updated about 1 month ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 55
Quarter:

Description

*Steps to Reproduce:*++
Steps based on httpie and jq from documentation: https://pulp-ansible.readthedocs.io/en/latest/workflows/index.html

#Create 2 separate repos:
http POST $BASE_ADDR/pulp/api/v3/repositories/ name=test1
http POST $BASE_ADDR/pulp/api/v3/repositories/ name=test2

export REPO_HREF1=$(http $BASE_ADDR/pulp/api/v3/repositories/ | \
jq -r '.results[] | select(.name == "test1") | ._href')

export REPO_HREF2=$(http $BASE_ADDR/pulp/api/v3/repositories/ | \
jq -r '.results[] | select(.name == "test2") | ._href')

#Create collection remote:

http POST $BASE_ADDR/pulp/api/v3/remotes/ansible/collection/ \
name='bar' \
url='https://galaxy-dev.ansible.com' \
whitelist='newswangerd.collection_demo'

export REMOTE_HREF=$(http $BASE_ADDR/pulp/api/v3/remotes/ansible/collection/ | jq -r '.results[] | select(.name == "bar") | ._href')

#Sync both repos with the remote

export TASK_URL1=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF1 \
| jq -r '.task')

export TASK_URL2=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF2 \
| jq -r '.task')

#Notice that a new repo version is created by 1st task but none by the 2nd.

http $BASE_ADDR$TASK_URL1

http $BASE_ADDR$TASK_URL2

***********************************************************

I tried with a second remote pointing to the same URL and with the same whitelist and it doesn't seem to create a repo version either.


Related issues

Related to Ansible Plugin - Test #5264: Test - Pulp3 Ansible Collection remote doesn't seem to be able to sync more than 1 repoNEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Is duplicate of Ansible Plugin - Issue #4920: Collection - Repository versions not being update after successive syncsCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 440f092b View on GitHub
Added by bmbouter over 1 year ago

Collection sync bugfix and progress reporting

Previously the sync had no progress reports. Some users want progress reporting even for fast tasks, e.g. Katello. This gives some basic progress reporting.

https://pulp.plan.io/issues/5023 closes #5023

Cause second sync content to associate correctly

The content associate only occured when the sync created the content unit. When that content unit is associated with another repository the sync doesn't associate the content correctly.

This associates content regardless of if this sync created it or it already existed.

https://pulp.plan.io/issues/4997 closes #4997

History

#1 Updated by sajha over 1 year ago

Don't have perms I guess to update description. Please mind extra \ in the above 2:

export TASK_URL1=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF1 \ | jq -r '.task')

export TASK_URL2=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF2 \ | jq -r '.task')

should just be:

export TASK_URL1=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF1 | jq -r '.task')

export TASK_URL2=$(http POST $BASE_ADDR$REMOTE_HREF'sync/' repository=$REPO_HREF2 | jq -r '.task')

#2 Updated by sajha over 1 year ago

"versions": [
{
"component": "pulpcore",
"version": "3.0.0rc3.dev0"
},
{
"component": "pulpcore-plugin",
"version": "0.1.0rc3.dev0"
},
{
"component": "pulp_docker",
"version": "4.0.0b5.dev0"
},
{
"component": "pulp_file",
"version": "0.1.0b1.dev0"
},
{
"component": "pulp_ansible",
"version": "0.2.0b1.dev0"
}
]

#3 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - DUPLICATE

This is a very clearly filed issue; thank you.

I believe it's a duplicate of #4920 so I'm going to close it as such. Please reopen if after testing the #4920 fix this is not fully resolved.

#4 Updated by bmbouter over 1 year ago

  • Is duplicate of Issue #4920: Collection - Repository versions not being update after successive syncs added

#5 Updated by sajha over 1 year ago

  • Status changed from CLOSED - DUPLICATE to NEW

Reopening this. The issue I am seeing is if you run through the steps above, the 2nd repository synced gets a version created but it doesn't have any content. Only the first repository to get synced with a unique remote gets content added.

Post the steps above check the repo_versions:

#Get repo version 1
export REPO_VERSION1=$(http $BASE_ADDR$TASK_URL1 | jq -r '.created_resources[0]')
#Get repo version 2
export REPO_VERSION2=$(http $BASE_ADDR$TASK_URL2 | jq -r '.created_resources[0]')

#View Repo Version 1 and notice there's content added in content summary
http $BASE_ADDR$REPO_VERSION1

#View Repo Version 2 and notice there's no content added in content summary
http $BASE_ADDR$REPO_VERSION2

#6 Updated by sajha over 1 year ago

  • Tags Katello-P2 added

#7 Updated by jsherril@redhat.com over 1 year ago

  • Tags Katello-P1 added
  • Tags deleted (Katello-P2)

#8 Updated by amacdona@redhat.com over 1 year ago

  • Project changed from Pulp to Ansible Plugin

#9 Updated by bmbouter over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#10 Updated by bmbouter over 1 year ago

  • Status changed from ASSIGNED to POST
  • Sprint set to Sprint 55

PR available at: https://github.com/pulp/pulp_ansible/pull/123

Also adding to Sprint since it's a P1

#11 Updated by bmbouter over 1 year ago

PR is now available here instead: https://github.com/pulp/pulp_ansible/pull/125

#12 Updated by bmbouter over 1 year ago

  • Status changed from POST to MODIFIED

#13 Updated by kersom about 1 year ago

  • Related to Test #5264: Test - Pulp3 Ansible Collection remote doesn't seem to be able to sync more than 1 repo added

#14 Updated by ggainey 6 months ago

  • Priority changed from Normal to High

#15 Updated by ggainey 6 months ago

  • Tags Katello added
  • Tags deleted (Katello-P1)

#16 Updated by bmbouter about 1 month ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF