Bug Fixes:
-In file list, the path or prefix was converted to boolean value. Fixed.
+-Thread options did not work [#4616]
Changes:
1. Make astakosclient a mantatory requirement for kamaki [#4312]
2. Make post_user_catalogs obsolete, but keep for one more version [#4337]
3. Rename user commands for cached account requests as /user session [#4340]
+4. Remove max_theads from config, move control to threaded commands [#4617]
Features:
fake_cmd = _command_init(dict(config=config_argument))
fake_cmd.client = auth_base
fake_cmd._set_log_params()
- fake_cmd._update_max_threads()
tmp_base.authenticate(token)
auth_base = tmp_base
except ClientError as ce:
if _debug:
raise err
exit(1)
+ except KeyboardInterrupt:
+ print('Canceled by user')
+ exit(1)
except Exception as er:
print('Unknown Error: %s' % er)
if _debug:
return foo(self, *args, **kwargs)
finally:
self._set_log_params()
- self._update_max_threads
return wrap
log.debug('Failed to read custom log_pid setting:'
'%s\n default for log_pid is off' % e)
- def _update_max_threads(self):
- if getattr(self, 'client', None):
- max_threads = int(self['config'].get('global', 'max_threads'))
- assert max_threads > 0, 'invalid max_threads config option'
- self.client.MAX_THREADS = max_threads
-
def _safe_progress_bar(
self, msg, arg='progress_bar', countdown=False, timeout=100):
"""Try to get a progress bar, but do not raise errors"""
'Create a cluster of servers of this size. In this case, the name'
'parameter is the prefix of each server in the cluster (e.g.,'
'srv1, srv2, etc.',
- '--cluster-size')
+ '--cluster-size'),
+ max_threads=IntArgument(
+ 'Max threads in cluster mode (default 1)', '--threads')
)
@errors.cyclades.cluster_size
personality=self['personality']) for i in range(1, 1 + size)]
if size == 1:
return [self.client.create_server(**servers[0])]
+ self.client.MAX_THREADS = int(self['max_threads'] or 1)
try:
r = self.client.async_run(self.client.create_server, servers)
return r
'( "read=user1,grp1,user2,... write=user1,grp2,... )']),
parsed_name='--sharing'),
public=FlagArgument('make object publicly accessible', '--public'),
- poolsize=IntArgument('set pool size', '--with-pool-size'),
+ max_threads=IntArgument('set max threads (default 5)', '--threads'),
progress_bar=ProgressBarArgument(
'do not show progress bar',
('-N', '--no-progress-bar'),
@errors.pithos.object_path
@errors.pithos.local_path
def _run(self, local_path, remote_path):
- if self['poolsize'] > 0:
- self.client.MAX_THREADS = int(self['poolsize'])
+ self.client.MAX_THREADS = int(self['max_threads'] or 5)
params = dict(
content_encoding=self['content_encoding'],
content_type=self['content_type'],
'show output unmodified since then', '--if-unmodified-since'),
object_version=ValueArgument(
'get the specific version', ('-O', '--object-version')),
- poolsize=IntArgument('set pool size', '--with-pool-size'),
+ max_threads=IntArgument('set max threads (default 5)', '--threads'),
progress_bar=ProgressBarArgument(
'do not show progress bar', ('-N', '--no-progress-bar'),
default=False),
@errors.pithos.object_path
@errors.pithos.local_path
def _run(self, local_path):
- poolsize = self['poolsize']
- if poolsize:
- self.client.MAX_THREADS = int(poolsize)
+ self.client.MAX_THREADS = int(self['max_threads'] or 5)
progress_bar = None
try:
for f, rpath in self._outputs(local_path):
'log_token': 'off',
'log_data': 'off',
'log_pid': 'off',
- 'max_threads': 7,
'history_file': HISTORY_PATH,
'user_cli': 'astakos',
'admin_cli': 'astakos',
self.config_file_content = [
HEADER,
'[global]\n',
- 'max_threads = 5\n',
'default_cloud = ~mycloud\n',
'file_cli = pithos\n',
'history_file = /home/user/.kamaki.history\n',
class Client(Logged):
- MAX_THREADS = 7
+ MAX_THREADS = 1
DATE_FORMATS = ['%a %b %d %H:%M:%S %Y', ]
CONNECTION_RETRY_LIMIT = 0