in ceph/ceph-container we've realized that `e2fsprogs` isn't installed in
centos container image because ceph hasn't a dependency for it.
It has for consequence to fail when deploying a containerized cluster
with dmcrypt when using centos image.
Typical error encountered:
typical error:
```
......
get_dm_uuid: get_dm_uuid /dev/sda uuid path is /sys/dev/block/8:0/dm/uuid
get_dm_uuid: get_dm_uuid /dev/sda uuid path is /sys/dev/block/8:0/dm/uuid
get_dm_uuid: get_dm_uuid /dev/sda5 uuid path is /sys/dev/block/8:5/dm/uuid
populate: Creating lockbox fs on %s: mkfs -t ext4 /dev/sda5
command_check_call: Running command: /usr/sbin/mkfs -t ext4 /dev/sda5
mkfs.ext4: No such file or directory
Traceback (most recent call last):
File "/usr/sbin/ceph-disk", line 9, in <module>
load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')()
......
```
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Add the ability to list the contents of a bucket without the results
being sorted. This can have performance benefits since all bucket
shards do not need to be queried. This is done by adding a parameter
to the REST query string (i.e., "allow_unordered" [note underscore]
for swift or "allow-unordered" [note hyphen] for s3) to true.
This works with other request parameters such as marker, end_marker,
and prefix. But it does not work when delimeter is used. Also, because
the results are not in order, a subsequent marker may precede an
earlier marker.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
common: retry_sys_call no need take address of a function pointer
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
this silences following errors:
9: ./awsauth.py:42:1: E722 do not use bare except'
9: ./awsauth.py:116:13: E722 do not use bare except'
Signed-off-by: Kefu Chai <kchai@redhat.com>
unlike ceph-disk and ceph-detect-init, dashboard is not a standalone
python application, it is a python application hosted by ceph-mgr,
so no need to create a venv in which it is deployed. the python env
created by tox would suffice.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we should test the python version of MGR_PYTHON_VERSION_MAJOR, if we are
testing both py2.7 and py3, we are preparing for distributing dashboard
as a separated package independent of ceph-mgr.
restructure the dashboard tests as 2 matrices, so we have 2*2 tests for
coverage and lint respectively.
Signed-off-by: Kefu Chai <kchai@redhat.com>
As we are rapidly expanding our code base beyond C++ and C, it is a good
idea to enforce coding styles for other languages.
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
This implementation is basically a Rados Gateway reverse proxy. It
additionally takes care of the authentication to the Rados Gateway, but to use
it you will have to be authenticated against the dashboards RESTful API.
The corresponding credentials can be configured using the following commands:
dashboard set-rgw-api-secret-key <secret-key>
dashboard set-rgw-api-access-key <access-key>
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
This commit will include the `python-requests-aws` [1] library. This library
extends the `requests` library by an authentication mechanism to S3 gateways.
[1] https://github.com/tax/python-requests-aws
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
The error case in validate_command() where the command is found but the
command itself is somehow invalid raises an UnboundLocalError, because it
tries to refer to a variable named 'e', but it should be 'ex'. For example:
# ceph balancer mode
Traceback (most recent call last):
File "/usr/bin/ceph", line 1178, in <module>
retval = main()
File "/usr/bin/ceph", line 1109, in main
verbose)
File "/usr/bin/ceph", line 535, in new_style_command
valid_dict = validate_command(sigdict, cmdargs, verbose)
File "/usr/lib/python3.6/site-packages/ceph_argparse.py", line 1090, in validate_command
print("Invalid command:", e, file=sys.stderr)
UnboundLocalError: local variable 'e' referenced before assignment
Replacing 'e' with 'ex' gives the desired output:
# ceph balancer mode
Invalid command: missing required parameter mode(none|crush-compat|upmap)
balancer mode none|crush-compat|upmap : Set balancer mode
Error EINVAL: invalid command
Signed-off-by: Tim Serong <tserong@suse.com>