Nizamudeen A [Wed, 11 May 2022 10:47:00 +0000 (16:17 +0530)]
mgr/dashboard: avoid overriding the configuration in package.json
the warning in npm run build is `Option "configuration" was already specified with value "en-US". The
new value "production" will override it.`
This causes the dist for production env to be created in dist/ whereas
it should be dist/en-US (or whatever npm_config_locale. That prevented
from dashboard to load and cause the cephadm e2e checks to fail.
cephfs-shell: get cmd must get both path and should validate them
Description:
- While using `get` command, `local_path` parameter is optional. Changing it
to mandatory.
- Rationale: Till now, there used to be a default path of `local_path` as
`default='.'` but wasn't mentioned anywhere. It led to confusion.
On top of it, considering get command to be a ssh inspired utlity,
or any other CLI tool that copies file between filesystems, source
and destination path are always mandatory. Therefore in order to
simulate this behavior in cephfs-shell`s command(s), my opinion is
to make get command accept both the paths.
- Added checks to make sure:
1) File does exist at `remote_path`
2) File with the same name doesn't exist in `local_path`
3) Removed code that would run through the directory and if it finds
nothing in `root_src_dir`, then it will try to do:
`os.makedirs(root_dst_dir + b'/' + root_src_dir)`, but it will
never be empty as 1) takes care of it.
cephfs-shell: get command should never create a directory on its own
Descrption: When using the get command on a single file, it would append the remote path to
source path and create directories that shouldn't be created. For instance,
file 'foo.txt' resides at `/dir1/dir2/` and `get` command is used to copy it to
/tmp/foo then it would do `/tmp/dir1/dir2/foo.txt` which is not the expected
behavior. Therefore this PR intends to correct this behavior.
dparmar18 [Wed, 4 May 2022 11:26:48 +0000 (16:56 +0530)]
qa: removed test_without_target_dir
Rationale: get and put now demand both the paths mandatorily.
Also testing of get and put without target paths
have been take of in other tests in class TestGetAndPut().
cephfs-shell: put cmd must accept both paths and validate local_path
Description:
- `put` command didn't display any error when file at local_path was not
found. This PR intends to add that check.
- Rationale: Till now, there used to be a default path of `remote_path` as
`default='.'` but wasn't mentioned anywhere. It could lead to confusion.
On top of it, considering put command to be a ssh inspired utlity,
or any other CLI tool that copies file between filesystems, source
and destination path are always mandatory. Therefore in order to
simulate this behavior in cephfs-shell`s command(s), my opinion is
to make put command accept both the paths.
Nizamudeen A [Sun, 8 May 2022 14:27:34 +0000 (19:57 +0530)]
mgr/dashboard: smart data for devices with scsi protocol
In the dashboard, we've been showing smart data for hdd devices with ata
protocol only. Otherwise we show a No Smart Data found error which is
clearly misleading since Smart Data is returned even in the api call.
So this PR is trying to show the smart data for hdd devices
that uses scsi protocol too.
Fixes: https://tracker.ceph.com/issues/55574 Signed-off-by: Nizamudeen A <nia@redhat.com>
Rishabh Dave [Thu, 5 May 2022 13:17:08 +0000 (18:47 +0530)]
qa/vstart_runner: minor bug fix and minor adjustments
The message regarding deletion of helper tools is printed for every
command. This message should be printed only when applicable.
Besides -
* Move XXX comments to _do_run() since it increases visibility of
these messages.
* Move omission of arguments stuff to new method clear up the clutter.
* And remove shell as a parameter from _perform_checks_and_adjustments
since it's redundant.
Samuel Just [Sat, 7 May 2022 07:02:58 +0000 (07:02 +0000)]
crimson/common/operation: trim AggregateBlockingEvent::events entries
PglogBasedRecovery and BackfillRecovery reuse the same Operation
until their respective operations are complete. Each recovery
operation adds an entry to AggregateBlockingEvent::events. This
way, we only retain entries that are currently blocking.
Volker Theile [Mon, 9 May 2022 13:31:15 +0000 (15:31 +0200)]
mgr/dashboard: Creating and editing Prometheus AlertManager silences is buggy
When creating a new monitoring silence the form is pre-filled with the wrong alert data. It is always used the alert data from the very first object in the list of the API response but not the specified alert identified by the 'fingerprint' property.
The same problem applies to editing silences. The selected silence is not edited, it's always the first one in the list returned API response but not that with the specified 'id' property.
The main problem of the origin implementation is that the Prometheus Alertmanager API endpoints /api/v1/[alerts/silences] do not support querying. To fix that, filtering is done in the frontend.
dparmar18 [Mon, 2 May 2022 11:03:30 +0000 (16:33 +0530)]
cephfs-shell: make onecmd() print proper error msg
Rationale: Whenever a python exception occurred in cephfs-shell,
it would often only be the exception message but doesn't
say anything about the type of exception. For example if
`ZeroDivisionError: division by zero` occurred, the onecmd()
would print `division by zero` but will omit the type of
exception. In this case it's easy to understand but let's
say an `KeyError` exception occurred for a key `9999` which
is not existent in the dictionary, onecmd() would print
just `9999` in this scenario and it would be very difficult
to interpret what type of error it is.
qa/cephfs/test_cephfs_shell: Fixed pep8 formatting violations
NOTE: Although most of the issues are fixed but a few function
and variable names are unchanged in order to prevent
ambiguity and preserve their meaning.
They are:
- functions: setUp(), test_ls_H_prints_human_readable_file_size(),
- variables: ls_H_output, ls_H_file_size
Nizamudeen A [Fri, 6 May 2022 15:19:18 +0000 (20:49 +0530)]
mgr/dashboard: fix smart data error
the error in the log was this
```
"/usr/share/ceph/mgr/dashboard/services/ceph_service.py", line 253, in _get_smart_data_by_device
May 06 07:38:39 occldlr750-1.occl208.lab conmon[2142938]: svc_type, svc_id = daemon.split('.')
May 06 07:38:39 occldlr750-1.occl208.lab conmon[2142938]: ValueError: too many values to unpack (expected 2)
```
on the cluster, the output of `ceph device ls-by-host` looks like this
the first device is mon and its name is mon.occldlr750-1.occl208.lab.
In our dashboard code, when fetching the smart data we have a line like
this
`svc_type, svc_id = daemon.split('.')`
so for the mon the output of `daemon.split('.') will be ['mon', 'occldlr750-1', 'occl208', 'lab']. The svc_id gets split into three because of the split. I am changing that and giving the criteria as splitting only on the first occurence of the dot and the considering everything that comes after the dot as the svc_id of the device.
Fixes: https://tracker.ceph.com/issues/55571 Signed-off-by: Nizamudeen A <nia@redhat.com>
Nizamudeen A [Thu, 5 May 2022 17:43:38 +0000 (23:13 +0530)]
mgr/dashboard: devices with same UID causes multiselection
In the Physical Disks page, the uids for multiple devices are coming in
as same and that causes the selection to go berserk and select multiple
rows with same UID. The uid is generated in the frontend service call
itself. I just added some more parameters to it inorder to make it more
unique.
The second issue is the number of selected number getting multiplied
exponentially. Its because each time the table is updated or refreshed,
we push the row with the number of selected items we had before and that
causes the number of selection to multiply.
Fixes: https://tracker.ceph.com/issues/55523 Signed-off-by: Nizamudeen A <nia@redhat.com>
Samuel Just [Wed, 4 May 2022 23:00:35 +0000 (23:00 +0000)]
crimson: refactor RecoverySubRequest to use start_pg_operation
A side effect of this PR is that RecoverySubRequest will now use the
peering pipeline for ordering. Not using before was, I think, actually
a bug which could result in pull operations ordering ahead of the
activation message when pulling objects from non-acting osds.