Comment 0 for bug 1969000

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote : [SRU] mon crashes when improper json is passed to rados

[Impact]
If improper json data is passed to rados, it can end up crashing the mon.

[Test Plan]
The malformed request looks like -

curl -k -H "Authorization: Basic $TOKEN" "https://juju-3b3d82-10-lxd-0:8003/request" -X POST -d '{"prefix":"auth add","entity":"client.testuser02","caps":"mon '\''allow r'\'' osd '\''allow rw pool=testpool01'\''"}'

The request status shows it is still in the queue.

[
    {
        "failed": [],
        "finished": [],
        "has_failed": false,
        "id": "140576245092648",
        "is_finished": false,
        "is_waiting": false,
        "running": [
            {
                "command": "auth add entity=client.testuser02 caps=mon 'allow r' osd 'allow rw pool=testpool01'",
                "outb": "",
                "outs": ""
            }
        ],
        "state": "pending",
        "waiting": []
    }
]

[Where problems could occur]
No problems foreseen because the exception is hit only in case of malformed json data, and not otherwise, and it is a desirable thing to catch and handle it instead of allowing process termination due to uncaught exception.

[Other Info]
Reported upstream at https://tracker.ceph.com/issues/54558 (including reproducer, and fix testing details) and fixed through https://github.com/ceph/ceph/pull/45547

PR for Octopus is at https://github.com/ceph/ceph/pull/45891