Project

Profile

Help

Issue #4997

closed

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

Added by sajha over 4 years ago. Updated over 3 years 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 repoCLOSED - WONTFIXActions
Is duplicate of Ansible Plugin - Issue #4920: Collection - Repository versions not being update after successive syncsCLOSED - CURRENTRELEASEbmbouterActions
Actions #1

Updated by sajha over 4 years 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')

Actions #2

Updated by sajha over 4 years 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"
}
]

Actions #3

Updated by bmbouter over 4 years 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.

Actions #4

Updated by bmbouter over 4 years ago

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

Updated by sajha over 4 years 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
Actions #6

Updated by sajha over 4 years ago

  • Tags Katello-P2 added
Actions #7

Updated by jsherril@redhat.com over 4 years ago

  • Tags Katello-P1 added
  • Tags deleted (Katello-P2)
Actions #8

Updated by amacdona@redhat.com over 4 years ago

  • Project changed from Pulp to Ansible Plugin
Actions #9

Updated by bmbouter over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter
Actions #10

Updated by bmbouter over 4 years 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

Actions #11

Updated by bmbouter over 4 years ago

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

Added by bmbouter over 4 years ago

Revision 440f092b | View on GitHub

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

Actions #12

Updated by bmbouter over 4 years ago

  • Status changed from POST to MODIFIED
Actions #13

Updated by kersom over 4 years ago

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

Updated by ggainey almost 4 years ago

  • Priority changed from Normal to High
Actions #15

Updated by ggainey almost 4 years ago

  • Tags Katello added
  • Tags deleted (Katello-P1)
Actions #16

Updated by bmbouter over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF