Project

General

Profile

Bug #11365

radosgw-agent num_workers default overrides setting in config file

Added by Ben Agricola almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Only noticed this recently when testing out the master branch of radosgw-agent. My config file currently contains the following:

num_workers: 24
source: http://********:7480
src_access_key: *
src_secret_key: *
destination: http://********:7480
dest_access_key: *
dest_secret_key: *
log_file: /var/log/radosgw/radosgw-sync.log

What I'd expect here is that radosgw-agent spawns 24 worker threads for syncing, but that's not the case. This wasn't really obvious (aka. I didn't check!) until updating to master which prints the current settings when run:

2015-04-10 11:12:01,219 38356 [radosgw_agent][INFO  ]  __            __           __   ___      ___
2015-04-10 11:12:01,220 38356 [radosgw_agent][INFO  ] /__` \ / |\ | /  `     /\  / _` |__  |\ |  |
2015-04-10 11:12:01,220 38356 [radosgw_agent][INFO  ] .__/  |  | \| \__,    /~~\ \__> |___ | \|  |
2015-04-10 11:12:01,220 38356 [radosgw_agent][INFO  ]                                      v1.2.1
2015-04-10 11:12:01,221 38356 [radosgw_agent][INFO  ] agent options:
2015-04-10 11:12:01,221 38356 [radosgw_agent][INFO  ]  args:
2015-04-10 11:12:01,222 38356 [radosgw_agent][INFO  ]    conf                          : None
2015-04-10 11:12:01,222 38356 [radosgw_agent][INFO  ]    dest_access_key               : ****************
2015-04-10 11:12:01,222 38356 [radosgw_agent][INFO  ]    dest_secret_key               : ****************
2015-04-10 11:12:01,223 38356 [radosgw_agent][INFO  ]    destination                   : http://********:7480
2015-04-10 11:12:01,223 38356 [radosgw_agent][INFO  ]    incremental_sync_delay        : 30
2015-04-10 11:12:01,224 38356 [radosgw_agent][INFO  ]    lock_timeout                  : 60
2015-04-10 11:12:01,224 38356 [radosgw_agent][INFO  ]    log_file                      : /var/log/radosgw/radosgw-sync.log
2015-04-10 11:12:01,224 38356 [radosgw_agent][INFO  ]    log_lock_time                 : 20
2015-04-10 11:12:01,225 38356 [radosgw_agent][INFO  ]    max_entries                   : 1000
2015-04-10 11:12:01,225 38356 [radosgw_agent][INFO  ]    metadata_only                 : False
2015-04-10 11:12:01,225 38356 [radosgw_agent][INFO  ]    num_workers                   : 1
2015-04-10 11:12:01,226 38356 [radosgw_agent][INFO  ]    object_sync_timeout           : 216000
2015-04-10 11:12:01,226 38356 [radosgw_agent][INFO  ]    prepare_error_delay           : 10
2015-04-10 11:12:01,226 38356 [radosgw_agent][INFO  ]    quiet                         : False
2015-04-10 11:12:01,227 38356 [radosgw_agent][INFO  ]    rgw_data_log_window           : 30
2015-04-10 11:12:01,227 38356 [radosgw_agent][INFO  ]    source                        : http://********:7480
2015-04-10 11:12:01,228 38356 [radosgw_agent][INFO  ]    src_access_key                : ****************
2015-04-10 11:12:01,228 38356 [radosgw_agent][INFO  ]    src_secret_key                : ****************
2015-04-10 11:12:01,228 38356 [radosgw_agent][INFO  ]    src_zone                      : None
2015-04-10 11:12:01,229 38356 [radosgw_agent][INFO  ]    sync_scope                    : full
2015-04-10 11:12:01,229 38356 [radosgw_agent][INFO  ]    test_server_host              : None
2015-04-10 11:12:01,229 38356 [radosgw_agent][INFO  ]    test_server_port              : 8080
2015-04-10 11:12:01,230 38356 [radosgw_agent][INFO  ]    verbose                       : False
2015-04-10 11:12:01,230 38356 [radosgw_agent][INFO  ]    versioned                     : False

Note the num_workers setting is still 1, which is the default defined in the parser.add_argument function call, line 131 of radosgw_agent/cli.py.

I suspect that the default setting there is overriding the default settings passed in by parser.set_defaults from the config file, and needs to be handled in a slightly different manner.

Passing --num-workers 24 on the command line works perfectly but isn't any use when starting radosgw-agent by init script.

History

#2 Updated by Abhishek Lekshmanan over 8 years ago

  • Status changed from New to Resolved
  • Regression set to No

Also available in: Atom PDF