Bug 1291624 - Enabling repos concurrently doesnt release lock even if its 100% completed.
Summary: Enabling repos concurrently doesnt release lock even if its 100% completed.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.1.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-15 10:10 UTC by Pradeep Kumar Surisetty
Modified: 2017-10-16 11:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-16 11:27:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16401 0 None None None 2016-08-31 21:44:47 UTC

Description Pradeep Kumar Surisetty 2015-12-15 10:10:56 UTC
Description of problem:

Enable repos concurrently as shown below.   They never release lock even its 100% completed


time hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" repository-set enable --name="Red Hat Enterprise Linux 5 Server (RPMs)" --basearch="x86_64" --releasever="5Server" --product "Red Hat Enterprise Linux Server" --organization "${ORG}" 2>&1 &

time hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" repository-set enable --name="Red Hat Enterprise Linux 5 Server (RPMs)" --basearch="i386" --releasever="5Server" --product "Red Hat Enterprise Linux Server" --organization "${ORG}" 2>&1 &

  time hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" repository-set enable --name="Red Hat Enterprise Linux 6 Server (RPMs)" --basearch="x86_64" --releasever="6Server" --product "Red Hat Enterprise Linux Server" --organization "${ORG}"  2>&1 &

time hammer -u "${ADMIN_USER}" -p "${ADMIN_PASSWORD}" repository-set enable --name="Red Hat Enterprise Linux 6 Server (RPMs)" --basearch="i386" --releasever="6Server" --product "Red Hat Enterprise Linux Server" --organization "${ORG}" 2>&1 &


Once its done, if i try to sync 

  
  Required lock: read
  Conflicts with tasks:
  - https://<sat-server>/foreman_tasks/tasks/bf03ad39-8f58-4d75-a762-650b3d2f3350
Could not synchronize the repository:
  Required lock is already taken by other running tasks.
  Please inspect their state, fix their errors and resume them.
  
  Required lock: read
  Conflicts with tasks:
  - https://<sat-server>/foreman_tasks/tasks/3fe6659f-3975-4be4-96e5-b4cfc1034737
Could not synchronize the repository:
  Required lock is already taken by other running tasks.
  Please inspect their state, fix their errors and resume them.



Version-Release number of selected component (if applicable):

katello-2.2.0.16-1.el7sat.noarch
pulp-server-2.6.0.17-1.el7sat.noarch
candlepin-0.9.49.9-1.el7.noarch

How reproducible:


Steps to Reproduce:
1.Enable repos concurrently ( with background process)
2.
3.

Actual results:

Lock is not released. 

Expected results:

Release lock, such that user can procede for syning of content.
Additional info:

Comment 4 Brad Buckingham 2016-08-31 21:44:43 UTC
Created redmine issue http://projects.theforeman.org/issues/16401 from this bug

Comment 6 Justin Sherrill 2016-09-14 18:57:02 UTC
can you reproduce this and upload a foreman-debug?  Most likely one of the tasks errored but there is not enough info here to see why.

Comment 7 Pradeep Kumar Surisetty 2017-10-16 11:27:35 UTC
Havent noticed this issue lately. 
Will re-open, if i notice it again


Note You need to log in before you can comment on or make changes to this bug.