Skip to content

Commit

Permalink
xcute: Only allow one job at the same time on all meta2 services
Browse files Browse the repository at this point in the history
When the peers are changed, the old value is overwritten.
Thus, if 2 jobs change the peers at the same time,
one of the 2 values will be overwritten by the other
and the peers will not be good.
  • Loading branch information
AymericDu committed Jan 20, 2021
1 parent 54b1065 commit 82fc117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oio/xcute/jobs/meta2_decommissioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def sanitize_params(cls, job_params):

sanitized_job_params['dst'] = job_params.get('dst')

return sanitized_job_params, 'meta2/%s' % src
return sanitized_job_params, 'meta2'

def __init__(self, conf, logger=None):
super(Meta2DecommissionJob, self).__init__(conf, logger=logger)
Expand Down
2 changes: 1 addition & 1 deletion oio/xcute/jobs/meta2_rebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def sanitize_params(cls, job_params):
raise ValueError('Missing service ID')
sanitized_job_params['service_id'] = service_id

return sanitized_job_params, 'meta2/%s' % service_id
return sanitized_job_params, 'meta2'

def __init__(self, conf, logger=None):
super(Meta2RebuildJob, self).__init__(conf, logger=logger)
Expand Down

0 comments on commit 82fc117

Please sign in to comment.