Project

General

Profile

Actions

Bug #73538

closed
VA

teuthology: cephadm.wait_for_service takes 20+ mins in nvmeof suite

Bug #73538: teuthology: cephadm.wait_for_service takes 20+ mins in nvmeof suite

Added by Vallari Agrawal about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-4805-ge662dcaa46
Released In:
v21.2.0~1455
Upkeep Timestamp:
2026-10-24T02:00:04+00:00

Description

Right after initial deployment of nvmeof service, we wait for all daemons to be up by checking "ceph orch ls -f json" in loop. Weirdly this is taking ~20mins for all 4 gateways to be up. It's always stuck at "3/4 running" for 20mins.

Using job https://pulpito.ceph.com/vallariag-2025-10-14_15:18:13-nvmeof-wip-vallari-testing-13Oct-distro-default-smithi/8551119/ to explain:

I went into one of the servers and seems like 1 gateway is in "unknown" state for this long duration before it switches to "running" state:

[vallariag@smithi115 ~]$ ceph orch ps
NAME             HOST       PORTS                   STATUS        REFRESHED  AGE  MEM USE  MEM LIM  VERSION                IMAGE ID      CONTAINER ID
mgr.x            smithi115  *:9283,8765             running (8m)     4m ago   8m     552M        -  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  700171f21c2e
mon.a            smithi115                          running (8m)     4m ago   9m    47.9M    2048M  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  10a129d9847e
mon.b            smithi146                          running (7m)     4m ago   7m    41.2M    2048M  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  681300093ed5
mon.c            smithi154                          running (7m)     4m ago   7m    44.4M    2048M  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  ae0ace6f1114
nvmeof.nvmeof.a  smithi115  *:5500,4420,8009,10008  running (4m)     4m ago   4m    56.8M        -  1.6.1                  25cb11dd8adf  fe62fbcc68f1
nvmeof.nvmeof.b  smithi146  *:5500,4420,8009,10008  unknown          4m ago   5m        -        -  <unknown>              <unknown>     <unknown>
nvmeof.nvmeof.c  smithi154  *:5500,4420,8009,10008  running (4m)     4m ago   4m    56.9M        -  1.6.1                  25cb11dd8adf  565a2bf93035
nvmeof.nvmeof.d  smithi160  *:5500,4420,8009,10008  running (5m)     4m ago   4m    54.7M        -  1.6.1                  25cb11dd8adf  1f545439f639
osd.0            smithi115                          running (6m)     4m ago   7m    55.0M    16.6G  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  b99290e8f34d
osd.1            smithi146                          running (6m)     4m ago   6m    48.1M    20.6G  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  b5c82c165f21
osd.2            smithi154                          running (6m)     4m ago   6m    58.0M    20.6G  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  50f72371920a
osd.3            smithi160                          running (5m)     4m ago   6m    42.8M    21.6G  20.3.0-3562-g4a65ccaf  4e8ff70a9d06  6bf794bd564f
[vallariag@smithi115 ~]$

Starting of wait_for_service:

2025-10-14T15:53:59.350 INFO:teuthology.run_tasks:Running task cephadm.wait_for_service...
2025-10-14T15:53:59.359 INFO:tasks.cephadm:Waiting for ceph service nvmeof.mypool.mygroup0 to start (timeout 300)...
2025-10-14T15:53:59.360 DEBUG:teuthology.orchestra.run.smithi115:> sudo /home/ubuntu/cephtest/cephadm --image quay-quay-quay.apps.os.sepia.ceph.com/ceph-ci/ceph:4a65ccafd61d1785005ca927e57087252ef08b45 shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid edc9ebac-a914-11f0-8770-adfe0268badd -- ceph orch ls -f json

Last "3/4 running" state (before cephadm reported all gateways are up):
(See here last updated: "last_refresh": "2025-10-14T15:54:27.924282Z")

2025-10-14T16:03:36.289 DEBUG:teuthology.orchestra.run.smithi115:> sudo /home/ubuntu/cephtest/cephadm --image quay-quay-quay.apps.os.sepia.ceph.com/ceph-ci/ceph:4a65ccafd61d1785005ca927e57087252ef08b45 shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid edc9ebac-a914-11f0-8770-adfe0268badd -- ceph orch ls -f json
2025-10-14T16:03:36.632 INFO:teuthology.orchestra.run.smithi115.stderr:Inferring config /var/lib/ceph/edc9ebac-a914-11f0-8770-adfe0268badd/mon.a/config
...
2025-10-14T16:03:37.500 INFO:teuthology.orchestra.run.smithi115.stdout:
2025-10-14T16:03:37.508 INFO:teuthology.orchestra.run.smithi115.stdout:[{"events": ["2025-10-14T15:51:42.488483Z service:mgr [INFO] \"service was created\""], "placement": {"count": 1, "hosts": ["smithi115=x"]}, "service_name": "mgr", "service_type": "mgr", "status": {"created": "2025-10-14T15:51:41.655153Z", "last_refresh": "2025-10-14T15:54:27.980089Z", "running": 1, "size": 1}}, {"events": ["2025-10-14T15:51:38.053322Z service:mon [INFO] \"service was created\""], "placement": {"count": 3, "hosts": ["smithi115:172.21.15.115=a", "smithi146:172.21.15.146=b", "smithi154:172.21.15.154=c"]}, "service_name": "mon", "service_type": "mon", "status": {"created": "2025-10-14T15:51:22.489283Z", "last_refresh": "2025-10-14T15:54:27.979988Z", "running": 3, "size": 3}}, {"events": ["2025-10-14T15:54:27.024303Z service:nvmeof.mypool.mygroup0 [INFO] \"service was created\""], "placement": {"hosts": ["smithi115=nvmeof.a", "smithi146=nvmeof.b", "smithi154=nvmeof.c", "smithi160=nvmeof.d"]}, "service_id": "mypool.mygroup0", "service_name": "nvmeof.mypool.mygroup0", "service_type": "nvmeof", "spec": {"abort_discovery_on_errors": true, "abort_on_errors": true, "allowed_consecutive_spdk_ping_failures": 1, "break_update_interval_sec": 25, "cluster_connections": 32, "conn_retries": 10, "discovery_port": 8009, "enable_monitor_client": true, "enable_prometheus_exporter": true, "group": "mygroup0", "log_directory": "/var/log/ceph/", "log_files_enabled": true, "log_files_rotation_enabled": true, "log_level": "INFO", "max_gws_in_grp": 16, "max_hosts": 2048, "max_hosts_per_namespace": 8, "max_hosts_per_subsystem": 128, "max_log_directory_backups": 10, "max_log_file_size_in_mb": 10, "max_log_files_count": 20, "max_namespaces": 4096, "max_namespaces_per_subsystem": 512, "max_namespaces_with_netmask": 1000, "max_ns_to_change_lb_grp": 8, "max_subsystems": 128, "monitor_timeout": 1.0, "notifications_interval": 60, "omap_file_lock_duration": 20, "omap_file_lock_on_read": true, "omap_file_lock_retries": 30, "omap_file_lock_retry_sleep_interval": 1.0, "omap_file_update_attempts": 500, "omap_file_update_reloads": 10, "pool": "mypool", "port": 5500, "prometheus_connection_list_cache_expiration": 60, "prometheus_cycles_to_adjust_speed": 3, "prometheus_frequency_slow_down_factor": 3.0, "prometheus_port": 10008, "prometheus_startup_delay": 240, "prometheus_stats_interval": 10, "rebalance_period_sec": 7, "rpc_socket_dir": "/var/tmp/", "rpc_socket_name": "spdk.sock", "spdk_path": "/usr/local/bin/nvmf_tgt", "spdk_ping_interval_in_seconds": 2.0, "spdk_protocol_log_level": "WARNING", "spdk_timeout": 60.0, "state_update_interval_sec": 5, "state_update_notify": true, "subsystem_cache_expiration": 5, "tgt_path": "/usr/local/bin/nvmf_tgt", "transport_tcp_options": {"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7}, "transports": "tcp", "verbose_log_messages": true, "verify_keys": true, "verify_listener_ip": true, "verify_nqns": true}, "status": {"created": "2025-10-14T15:53:46.088849Z", "last_refresh": "2025-10-14T15:54:27.924282Z", "ports": [5500, 4420, 8009, 10008], "running": 3, "size": 4}}, {"events": ["2025-10-14T15:52:52.858835Z service:osd.default [INFO] \"service was created\""], "placement": {"host_pattern": "smithi160"}, "service_id": "default", "service_name": "osd.default", "service_type": "osd", "spec": {"data_devices": {"paths": ["vg_nvme/lv_4"]}, "filter_logic": "AND", "objectstore": "bluestore"}, "status": {"created": "2025-10-14T15:52:52.856560Z", "last_refresh": "2025-10-14T15:54:27.924090Z", "running": 4, "size": 4}}]
2025-10-14T16:03:37.515 INFO:[email protected]:Oct 14 16:03:37 smithi115 ceph-mon[35860]: pgmap v428: 33 pgs: 33 active+clean; 609 KiB data, 111 MiB used, 358 GiB / 358 GiB avail; 8.0 KiB/s rd, 0 B/s wr, 11 op/s
2025-10-14T16:03:37.667 INFO:[email protected]:Oct 14 16:03:37 smithi146 ceph-mon[36837]: pgmap v428: 33 pgs: 33 active+clean; 609 KiB data, 111 MiB used, 358 GiB / 358 GiB avail; 8.0 KiB/s rd, 0 B/s wr, 11 op/s
2025-10-14T16:03:37.723 INFO:[email protected]:Oct 14 16:03:37 smithi154 ceph-mon[37319]: pgmap v428: 33 pgs: 33 active+clean; 609 KiB data, 111 MiB used, 358 GiB / 358 GiB avail; 8.0 KiB/s rd, 0 B/s wr, 11 op/s
2025-10-14T16:03:37.868 INFO:tasks.cephadm:nvmeof.mypool.mygroup0 has 3/4

End of wait_for_service (4/4 running):
(see "last_refresh": "2025-10-14T16:03:38.412172Z")

2025-10-14T16:03:38.927 DEBUG:teuthology.orchestra.run.smithi115:> sudo /home/ubuntu/cephtest/cephadm --image quay-quay-quay.apps.os.sepia.ceph.com/ceph-ci/ceph:4a65ccafd61d1785005ca927e57087252ef08b45 shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid edc9ebac-a914-11f0-8770-adfe0268badd -- ceph orch ls -f json
..
2025-10-14T16:03:40.686 INFO:teuthology.orchestra.run.smithi115.stdout:
2025-10-14T16:03:40.729 INFO:teuthology.orchestra.run.smithi115.stdout:[{"events": ["2025-10-14T15:51:42.488483Z service:mgr [INFO] \"service was created\""], "placement": {"count": 1, "hosts": ["smithi115=x"]}, "service_name": "mgr", "service_type": "mgr", "status": {"created": "2025-10-14T15:51:41.655153Z", "last_refresh": "2025-10-14T16:03:38.715730Z", "running": 1, "size": 1}}, {"events": ["2025-10-14T15:51:38.053322Z service:mon [INFO] \"service was created\""], "placement": {"count": 3, "hosts": ["smithi115:172.21.15.115=a", "smithi146:172.21.15.146=b", "smithi154:172.21.15.154=c"]}, "service_name": "mon", "service_type": "mon", "status": {"created": "2025-10-14T15:51:22.489283Z", "last_refresh": "2025-10-14T16:03:38.483421Z", "running": 3, "size": 3}}, {"events": ["2025-10-14T15:54:27.024303Z service:nvmeof.mypool.mygroup0 [INFO] \"service was created\""], "placement": {"hosts": ["smithi115=nvmeof.a", "smithi146=nvmeof.b", "smithi154=nvmeof.c", "smithi160=nvmeof.d"]}, "service_id": "mypool.mygroup0", "service_name": "nvmeof.mypool.mygroup0", "service_type": "nvmeof", "spec": {"abort_discovery_on_errors": true, "abort_on_errors": true, "allowed_consecutive_spdk_ping_failures": 1, "break_update_interval_sec": 25, "cluster_connections": 32, "conn_retries": 10, "discovery_port": 8009, "enable_monitor_client": true, "enable_prometheus_exporter": true, "group": "mygroup0", "log_directory": "/var/log/ceph/", "log_files_enabled": true, "log_files_rotation_enabled": true, "log_level": "INFO", "max_gws_in_grp": 16, "max_hosts": 2048, "max_hosts_per_namespace": 8, "max_hosts_per_subsystem": 128, "max_log_directory_backups": 10, "max_log_file_size_in_mb": 10, "max_log_files_count": 20, "max_namespaces": 4096, "max_namespaces_per_subsystem": 512, "max_namespaces_with_netmask": 1000, "max_ns_to_change_lb_grp": 8, "max_subsystems": 128, "monitor_timeout": 1.0, "notifications_interval": 60, "omap_file_lock_duration": 20, "omap_file_lock_on_read": true, "omap_file_lock_retries": 30, "omap_file_lock_retry_sleep_interval": 1.0, "omap_file_update_attempts": 500, "omap_file_update_reloads": 10, "pool": "mypool", "port": 5500, "prometheus_connection_list_cache_expiration": 60, "prometheus_cycles_to_adjust_speed": 3, "prometheus_frequency_slow_down_factor": 3.0, "prometheus_port": 10008, "prometheus_startup_delay": 240, "prometheus_stats_interval": 10, "rebalance_period_sec": 7, "rpc_socket_dir": "/var/tmp/", "rpc_socket_name": "spdk.sock", "spdk_path": "/usr/local/bin/nvmf_tgt", "spdk_ping_interval_in_seconds": 2.0, "spdk_protocol_log_level": "WARNING", "spdk_timeout": 60.0, "state_update_interval_sec": 5, "state_update_notify": true, "subsystem_cache_expiration": 5, "tgt_path": "/usr/local/bin/nvmf_tgt", "transport_tcp_options": {"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7}, "transports": "tcp", "verbose_log_messages": true, "verify_keys": true, "verify_listener_ip": true, "verify_nqns": true}, "status": {"created": "2025-10-14T15:53:46.088849Z", "last_refresh": "2025-10-14T16:03:38.412172Z", "ports": [5500, 4420, 8009, 10008], "running": 4, "size": 4}}, {"events": ["2025-10-14T15:52:52.858835Z service:osd.default [INFO] \"service was created\""], "placement": {"host_pattern": "smithi160"}, "service_id": "default", "service_name": "osd.default", "service_type": "osd", "spec": {"data_devices": {"paths": ["vg_nvme/lv_4"]}, "filter_logic": "AND", "objectstore": "bluestore"}, "status": {"created": "2025-10-14T15:52:52.856560Z", "last_refresh": "2025-10-14T16:03:38.412029Z", "running": 4, "size": 4}}]
2025-10-14T16:03:40.761 INFO:tasks.cephadm:nvmeof.mypool.mygroup0 has 4/4
2025-10-14T16:03:40.769 INFO:teuthology.run_tasks:Running task workunit...

That "unknown" state gateway (nvmeof.b) was restarted (see two nvmeof log files: https://qa-proxy.ceph.com/teuthology/vallariag-2025-10-14_15:18:13-nvmeof-wip-vallari-testing-13Oct-distro-default-smithi/8551119/remote/smithi146/log/edc9ebac-a914-11f0-8770-adfe0268badd/). Let's see that:

nvmeof.b gateway went down:

[14-Oct-2025 15:53:56] INFO server.py:255 (2): MonitorGroup server is listening on 172.21.15.146:5499 for group id
[14-Oct-2025 15:54:28] ERROR server.py:54 (2): GatewayServer: SIGCHLD received signum=17
[14-Oct-2025 15:54:28] ERROR server.py:58 (2): PID of terminated child process is 19
[14-Oct-2025 15:54:28] ERROR server.py:190 (2): GatewayServer exception occurred
Traceback (most recent call last):
  File "/src/control/__main__.py", line 32, in <module>
    gateway.serve()
  File "/src/control/server.py", line 306, in serve
    self._start_monitor_client()
  File "/src/control/server.py", line 427, in _start_monitor_client
    self._wait_for_group_id()
  File "/src/control/server.py", line 257, in _wait_for_group_id
    self.monitor_event.wait()
  File "/usr/lib64/python3.9/threading.py", line 581, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib64/python3.9/threading.py", line 312, in wait
    waiter.acquire()
  File "/src/control/server.py", line 67, in sigchld_handler
    raise SystemExit(f"Gateway subprocess terminated {pid=} {exit_code=}")
SystemExit: Gateway subprocess terminated pid=19 exit_code=-6
[14-Oct-2025 15:54:28] INFO server.py:731 (2): Terminating sub process of (client.nvmeof.nvmeof.b) pid 19 args ['/usr/bin/ceph-nvmeof-monitor-client', '--gateway-name', 'client.nvmeof.nvmeof.b', '--gateway-address', '172.21.15.146:5500', '--gateway-pool', 'mypool', '--gateway-group', 'mygroup0', '--monitor-group-address', '172.21.15.146:5499', '-c', '/etc/ceph/ceph.conf', '-n', 'client.nvmeof.nvmeof.b', '-k', '/etc/ceph/keyring'] ...
[14-Oct-2025 15:54:28] INFO state.py:1059 (2): Cleanup OMAP on exit (gateway-client.nvmeof.nvmeof.b)
[14-Oct-2025 15:54:28] INFO server.py:236 (2): Exiting the gateway process.

gateway came back up and was ready:

[14-Oct-2025 15:58:46] INFO prometheus.py:185 (2): Stats for all bdevs will be provided

So nvmeof.b was up and running at 15:58:46, but cephadm showed it in "unknown" state till 16:03:38.


Related issues 1 (0 open — 1 closed)

Copied to nvme-of - Backport #74483: tentacle: teuthology: cephadm.wait_for_service takes 20+ mins in nvmeof suiteResolvedVallari Agrawal

Actions

VA Updated by Vallari Agrawal about 1 year ago Actions #1

  • Subject changed from tuethology: cephadm.wait_for_service takes 20+ mins to teuthology: cephadm.wait_for_service takes 20+ mins in nvmeof suite
  • Pull request ID set to 65941

Fix: use --refresh for cephadm.wait_for_service so it refreshes service status quicker and it doesn't take 20+ mins.
https://github.com/ceph/ceph/pull/65941

UB Updated by Upkeep Bot 11 months ago Actions #2

  • Status changed from New to Resolved
  • Merge Commit set to e662dcaa4633e70b22529adc412a3ea5b45cf63a
  • Fixed In set to v20.3.0-4805-ge662dcaa46
  • Upkeep Timestamp set to 2026-01-12T16:00:03+00:00

VA Updated by Vallari Agrawal 11 months ago Actions #3

  • Status changed from Resolved to Pending Backport
  • Backport set to tentacle

UB Updated by Upkeep Bot 11 months ago Actions #4

  • Copied to Backport #74483: tentacle: teuthology: cephadm.wait_for_service takes 20+ mins in nvmeof suite added

UB Updated by Upkeep Bot 11 months ago Actions #5

  • Tags (freeform) set to backport_processed

VA Updated by Vallari Agrawal 6 months ago Actions #6

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot 3 months ago Actions #7

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-01-12T16:00:03+00:00 to 2026-08-28T01:39:01+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #8

  • Released In set to v21.2.0~1455
  • Upkeep Timestamp changed from 2026-08-28T01:39:01+00:00 to 2026-10-24T02:00:04+00:00
Actions

Also available in: PDF Atom