Project

General

Profile

Actions

Bug #72857

open
KS KS

[Progress][Pg Autoscaler] Progress event for PG scale up/ down completes immediately

Bug #72857: [Progress][Pg Autoscaler] Progress event for PG scale up/ down completes immediately

Added by Kamoltat (Junior) Sirivadhna about 1 year ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Category:
progress module
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle, squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

We observe that the Progress event for PG scale up completes immediately, even though the scale up is in progress in background, and same can be seen in ceph status.

[root@ceph-pdhiran-dndye4-node6 ~]# ceph -s
  cluster:
    id:     279b48b4-5ada-11f0-9573-fa163ed7f945
    health: HEALTH_WARN
            Degraded data redundancy: 9112/396792 objects degraded (2.296%), 15 pgs degraded

  services:
    mon: 3 daemons, quorum ceph-pdhiran-dndye4-node1-installer,ceph-pdhiran-dndye4-node2,ceph-pdhiran-dndye4-node3 (age 6h)
    mgr: ceph-pdhiran-dndye4-node2.yqhklh(active, since 22m), standbys: ceph-pdhiran-dndye4-node3.sxdhkl, ceph-pdhiran-dndye4-node1-installer.hqiqpa
    mds: 1/1 daemons up, 2 standby
    osd: 24 osds: 24 up (since 6h), 24 in (since 6h); 13 remapped pgs
    rgw: 3 daemons active (3 hosts, 1 zones)

  data:
    volumes: 1/1 healthy
    pools:   9 pools, 529 pgs
    objects: 132.26k objects, 13 GiB
    usage:   49 GiB used, 311 GiB / 360 GiB avail
    pgs:     9112/396792 objects degraded (2.296%)
             3699/396792 objects misplaced (0.932%)
             483 active+clean
             20  active+clean+scrubbing
             15  active+recovery_wait+undersized+degraded+remapped
             9   active+clean+scrubbing+deep
             2   active+recovering+undersized+remapped

[root@ceph-pdhiran-dndye4-node6 ~]#

[root@ceph-pdhiran-dndye4-node6 ~]# ceph progress
[Complete]: PG autoscaler increasing pool 8 PGs from 32 to 512 (42s)
    [============================]
[Complete]: PG autoscaler increasing pool 9 PGs from 32 to 512 (41s)
    [============================]

[root@ceph-pdhiran-dndye4-node6 ~]# ceph progress json
{
    "completed": [

        {
            "add_to_ceph_s:": false,
            "finished_at": 1751880881.5641108,
            "id": "33ed1e61-3677-48f9-8393-15d7a5c21cac",
            "message": "PG autoscaler increasing pool 8 PGs from 32 to 512",
            "refs": [
                [
                    "pool",
                    8
                ]
            ],
            "started_at": 1751880880.5475712
        },
        {
            "add_to_ceph_s:": false,
            "finished_at": 1751880881.5644295,
            "id": "e2b1312c-9899-4974-9a3e-07889dd60276",
            "message": "PG autoscaler increasing pool 9 PGs from 32 to 512",
            "refs": [
                [
                    "pool",
                    9
                ]
            ],
            "started_at": 1751880881.5596368
        }
    ],
    "events": []
}

log snippet from mgr log: 
2025-07-07 09:34:35,268 [Dummy-2] [INFO] [root] Processing OSDMap change 3475..3476
2025-07-07 09:34:40,275 [Dummy-2] [INFO] [root] Processing OSDMap change 3476..3476
2025-07-07 09:34:40,547 [Dummy-4] [DEBUG] [root] refreshing mgr for 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:40,547 [Dummy-4] [INFO] [root] update: starting ev 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512)
2025-07-07 09:34:40,547 [Dummy-4] [DEBUG] [root] refreshing mgr for 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:40,548 [Dummy-4] [DEBUG] [root] refreshing mgr for 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:41,559 [Dummy-4] [DEBUG] [root] refreshing mgr for e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:41,560 [Dummy-4] [INFO] [root] update: starting ev e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512)
2025-07-07 09:34:41,560 [Dummy-4] [DEBUG] [root] refreshing mgr for e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:41,560 [Dummy-4] [DEBUG] [root] refreshing mgr for e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512) at 0.000000
2025-07-07 09:34:41,563 [Dummy-4] [DEBUG] [root] refreshing mgr for 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512) at 1.000000
2025-07-07 09:34:41,563 [Dummy-4] [INFO] [root] complete: finished ev 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512)
2025-07-07 09:34:41,563 [Dummy-4] [INFO] [root] Completed event 33ed1e61-3677-48f9-8393-15d7a5c21cac (PG autoscaler increasing pool 8 PGs from 32 to 512) in 1 seconds
2025-07-07 09:34:41,564 [Dummy-4] [DEBUG] [root] refreshing mgr for e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512) at 1.000000
2025-07-07 09:34:41,564 [Dummy-4] [INFO] [root] complete: finished ev e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512)
2025-07-07 09:34:41,564 [Dummy-4] [INFO] [root] Completed event e2b1312c-9899-4974-9a3e-07889dd60276 (PG autoscaler increasing pool 9 PGs from 32 to 512) in 0 seconds
2025-07-07 09:34:45,281 [Dummy-2] [INFO] [root] Writing back 11 completed events

[root@ceph-pdhiran-dndye4-node6 ~]# ceph df
--- RAW STORAGE ---
CLASS     SIZE    AVAIL    USED  RAW USED  %RAW USED
hdd    360 GiB  311 GiB  49 GiB    49 GiB      13.50
TOTAL  360 GiB  311 GiB  49 GiB    49 GiB      13.50

--- POOLS ---
POOL                 ID  PGS   STORED  OBJECTS     USED  %USED  MAX AVAIL
.mgr                  1    1  449 KiB        2  1.3 MiB      0     91 GiB
cephfs.cephfs.meta    2   16  3.5 KiB       22   96 KiB      0     91 GiB
cephfs.cephfs.data    3   32      0 B        0      0 B      0     91 GiB
.rgw.root             4   32  1.6 KiB        6   72 KiB      0     91 GiB
default.rgw.log       5   32  8.4 KiB      242  792 KiB      0     91 GiB
default.rgw.control   6   32      0 B        8      0 B      0     91 GiB
default.rgw.meta      7   32    416 B        2   24 KiB      0     91 GiB
test                  8  200  6.8 GiB   67.72k   20 GiB   6.81     92 GiB
test-1                9  196  6.7 GiB   67.05k   20 GiB   6.71     93 GiB

[root@ceph-pdhiran-dndye4-node6 ~]# ceph osd pool autoscale-status
POOL                   SIZE  TARGET SIZE  RATE  RAW CAPACITY   RATIO  TARGET RATIO  EFFECTIVE RATIO  BIAS  PG_NUM  NEW PG_NUM  AUTOSCALE  BULK
.mgr                 452.0k                3.0        359.9G  0.0000                                  1.0       1              on         False
cephfs.cephfs.meta   32768                 3.0        359.9G  0.0000                                  4.0      16              on         False
cephfs.cephfs.data       0                 3.0        359.9G  0.0000                                  1.0      32              on         False
.rgw.root            24576                 3.0        359.9G  0.0000                                  1.0      32              on         False
default.rgw.log      264.0k                3.0        359.9G  0.0000                                  1.0      32              on         False
default.rgw.control      0                 3.0        359.9G  0.0000                                  1.0      32              on         False
default.rgw.meta      8192                 3.0        359.9G  0.0000                                  4.0      32              on         False
test                  6753M                3.0        359.9G  0.0550                                  1.0     512              on         True
test-1                6695M                3.0        359.9G  0.0545                                  1.0     512              on         True

I suspect that we are using the wrong value in OSDMap to track progress of a pg_autoscaler event.

In src/pybind/mgr/pg_autoscaler/module.py:

    def _update_progress_events(self,
                                osdmap: OSDMap,
                                pools: Dict[str, Dict[str, Any]]) -> None:
        # Update progress events if necessary
        if self.has_noautoscale_flag():
            self.log.debug("noautoscale_flag is set.")
            return
        for pool_id in list(self._event):
            ev = self._event[pool_id]
            pool_data = self._get_pool_by_id(pools, pool_id)
            if (
                pool_data is None
                or pool_data["pg_num"] == pool_data["pg_num_target"]
                or ev.pg_num == ev.pg_num_target
            ):
                # pool is gone or we've reached our target
                self.remote('progress', 'complete', ev.ev_id)
                del self._event[pool_id]
                continue
            ev.update(self, (ev.pg_num - pool_data['pg_num']) / (ev.pg_num - ev.pg_num_target))

Might be worth checking.

KS Updated by Kamoltat (Junior) Sirivadhna about 1 year ago Actions #1

  • Subject changed from [Progress] Progress event for PG scale up/ down completes immediately to [Progress][Pg Autoscaler] Progress event for PG scale up/ down completes immediately

KS Updated by Kamoltat (Junior) Sirivadhna about 1 year ago Actions #2

  • Status changed from New to Fix Under Review
  • Backport set to tentacle, squid
  • Pull request ID set to 65451

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

Redmine Upkeep failure

The redmine-upkeep.py script failed to update this issue. I have added the flag "upkeep-failed" to avoid looking at this issue again.

Please manually fix the issue and remove "upkeep-failed" flag to allow future upkeep operations.

Transformation

The script was in the merged transformation.

Update Log

https://github.com/ceph/ceph/actions/runs/nil

Error

Issue #72857 with status Fix Under Review references PR #65451 which is closed but not merged.

Possible resolutions:

  • If the PR id is wrong, please update it.
  • If the issue was fixed through other means (e.g. in the kernel or Rook), please remove the PR id.
  • If the PR is already merged through other means (erroneous backport), mark the issue state as "Rejected".
  • Do nothing. This script will ignore this issue while the upkeep-failed tag is applied.
Actions

Also available in: PDF Atom