]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: ignore exceptions raised when no cert/key found
authorNizamudeen A <nia@redhat.com>
Thu, 19 Sep 2024 03:39:20 +0000 (09:09 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 15 Oct 2024 04:34:10 +0000 (10:04 +0530)
commit5c4a09544b3ab995bf1844cdfdd90612a461d99b
tree547ca130b90f54b8b772b137eebb018e72dc6155
parent536088e525fc4818457e0430fb2b99e426579917
mgr/dashboard: ignore exceptions raised when no cert/key found

for nvmeof client, when there are no cert found, it raises an exception
which gets logged more often because the dashboard polls the client
frequently.

```
Sep 18 13:40:54 ceph-node-00 ceph-mgr[2716]: log_channel(cephadm) log [ERR] : No secret found for entity nvmeof_root_ca_cert with service name nvmeof.rbd.default
                                             Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in wrapper
                                                 return OrchResult(f(*args, **kwargs))
                                               File "/usr/share/ceph/mgr/cephadm/module.py", line 3271, in cert_store_get_cert
                                                 raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
                                             cephadm.inventory.OrchSecretNotFound: No secret found for entity nvmeof_root_ca_cert with service name nvmeof.rbd.default
Sep 18 13:40:54 ceph-node-00 ceph-mgr[2716]: [dashboard INFO orchestrator] is orchestrator available: True,
Sep 18 13:40:54 ceph-node-00 ceph-mgr[2716]: [cephadm ERROR orchestrator._interface] No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
                                             Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in wrapper
                                                 return OrchResult(f(*args, **kwargs))
                                               File "/usr/share/ceph/mgr/cephadm/module.py", line 3271, in cert_store_get_cert
                                                 raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
                                             cephadm.inventory.OrchSecretNotFound: No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]: 2024-09-18T13:40:54.529+0000 7fbbd9272640 -1 log_channel(cephadm) log [ERR] : No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]: Traceback (most recent call last):
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]:   File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in wrapper
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]:     return OrchResult(f(*args, **kwargs))
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]:   File "/usr/share/ceph/mgr/cephadm/module.py", line 3271, in cert_store_get_cert
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]:     raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
Sep 18 13:40:54 ceph-node-00 ceph-0377c7c2-75c1-11ef-bb0e-5254000e47d2-mgr-ceph-node-00-cvrrld[2712]: cephadm.inventory.OrchSecretNotFound: No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
Sep 18 13:40:54 ceph-node-00 ceph-mgr[2716]: log_channel(cephadm) log [ERR] : No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
                                             Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in wrapper
                                                 return OrchResult(f(*args, **kwargs))
                                               File "/usr/share/ceph/mgr/cephadm/module.py", line 3271, in cert_store_get_cert
                                                 raise OrchSecretNotFound(entity=entity, service_name=service_name, hostname=hostname)
                                             cephadm.inventory.OrchSecretNotFound: No secret found for entity nvmeof_server_cert with service name nvmeof.rbd.default
Sep 18 13:40:54 ceph-node-00 ceph-mgr[2716]: [dashboard INFO nvmeof_client] Insecurely connecting to: 192.168.100.101:5500
```

Fixes: https://tracker.ceph.com/issues/68141
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit a939c75f10780a5d3a086ab3db1f0c07e40fb8f8)
src/pybind/mgr/dashboard/services/nvmeof_conf.py
src/pybind/mgr/dashboard/services/orchestrator.py