Mongo guest status check doesn't work with 3.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Medium
|
Doug Shelley |
Bug Description
For Mongo the _get_actual_
mongostat --host <ip addr> -n 1 | grep connected
to check if MongoDB is running. Prior to version 3.0 of Mongo, the mongostat command returned output like this:
connected to: 172.16.200.3
insert query update delete getmore command flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn time
*0 *0 *0 *0 0 1|0 0 80m 342m 51m 0 local:0.0% 0 0|0 0|0 62b 2k 1 15:18:03
In this case, the "grep connected" returns "connected to:..." and the _get_actual_
For MongoDB 3.0, the output was changed to this:
insert query update delete getmore command flushes mapped vsize res faults idx miss % qr|qw ar|aw netIn netOut conn time
*0 *0 *0 *0 0 1|0 0 80.0M 356.0M 49.0M 0 0 0|0 0|0 79b 10k 1 14:56:14
Of note, the "connected to: .." line is no longer emitted and the grep returns NULL so the instance is marked as SHUTDOWN.
I believe we can just check the return code from the output as mongostat (without the "grep connected") will return non-zero if it fails (i.e. the mongo process isn't running or responding).
Changed in trove: | |
assignee: | nobody → Doug Shelley (0-doug) |
description: | updated |
Changed in trove: | |
milestone: | none → liberty-1 |
importance: | Undecided → Medium |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | liberty-1 → 4.0.0 |
tags: | added: kilo-backport-potential |
Fix proposed to branch: master /review. openstack. org/177381
Review: https:/