]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Thu, 19 Sep 2024 03:44:54 +0000 (09:14 +0530)
commita939c75f10780a5d3a086ab3db1f0c07e40fb8f8
treeb51cb9611a95e5aec0b06eaf59a35d44bd9608fc
parent82de5f05d351d817e776937da492c135b66c836e
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>
src/pybind/mgr/dashboard/services/nvmeof_conf.py
src/pybind/mgr/dashboard/services/orchestrator.py