https://github.com/citellusorg/citellus
Recording at https://www.youtube.com/watch?v=SDzzqrUdn5A
The tool, started by Robin Černín after a long weekend shift checking one and over again several sosreports for the same data on different hosts.
It started with some tests + shell wrapper, and was added a python wrapper by Pablo Iranzo to bring in more powerful features.
After some design discussions with Engineering, a simpler reporting and design of tests was implemented.
bugzilla : 15 ['openstack/swift: 1', 'openstack/keystone/templates: 1', 'openstack/ceph: 1', 'httpd: 1', 'openstack/keystone: 1', 'openstack/ceilometer: 1', 'openstack/nova: 2', 'openstack/httpd: 1', 'systemd: 1', 'openstack/tripleo: 1', 'openstack/neutron: 4']
launchpad : 1 ['openstack/keystone: 1']
network : 1 []
openstack : 54 ['nova: 8', 'mysql: 6', 'rabbitmq: 3', 'containers/rabbitmq: 1', 'network: 3', 'glance: 1', 'containers/docker: 2', 'containers: 4', 'cinder: 1', 'hardware: 1', 'swift: 2', 'systemd: 1', 'iptables: 1', 'ceph: 4', 'keystone: 3', 'system: 1', 'redis: 1', 'neutron: 1', 'crontab: 3', 'ceilometer: 3']
pacemaker : 7 []
security : 12 ['meltdown: 2', 'spectre: 8']
system : 28 []
virtualization : 1 []
![](citellusrun.png" height=“20%” border=0>
Note: Change speaker after this
citellus.html
over http.
![](www.png" height=“40%” border=0>At the moment, there’s a strong presence on OpenStack plugins as it is where we solve our issues on everyday basis, but allows anything, as long as there are tests written for it.
For example, it will be easy to report on systems registered against RHN instead of CDN or systems with a specific version of pacemaker known to have lot of issues or check amount of free memory or memory usage from a process.
Read contributing doc at: https://github.com/citellusorg/citellus/blob/master/CONTRIBUTING.md for more details.
XSOS: Provides information on ram usage, etc, no analysis, more like a ‘fancy’ sosreport viewer.
TripleO-validations: only runs live from the environment, for customer support most of times we cannot afford to do that.
Note: Change speaker after this
Philosophy is very simple:
Tests are even simpler:
$RC_OKAY
for success / $RC_FAILED
for error / $RC_SKIPPED
for skipped tests / Other for unexpected errorCITELLUS_ROOT
) or if running live (CITELLUS_LIVE
) that provide required details. No user input should be required.Check disk usage:
#!/bin/bash
# Load common functions
[ -f "${CITELLUS_BASE}/common-functions.sh" ] && . "${CITELLUS_BASE}/common-functions.sh"
# description: error if disk usage is greater than $CITELLUS_DISK_MAX_PERCENT
: ${CITELLUS_DISK_MAX_PERCENT=75}
if [[ $CITELLUS_LIVE = 0 ]]; then
is_required_file "${CITELLUS_ROOT}/df"
DISK_USE_CMD="cat ${CITELLUS_ROOT}/df"
else
DISK_USE_CMD="df -P"
fi
result=$($DISK_USE_CMD |awk -vdisk_max_percent=$CITELLUS_DISK_MAX_PERCENT '/^\/dev/ && substr($5, 0, length($5)-1) > disk_max_percent { print $6,$5 }')
if [ -n "$result" ]; then
echo "${result}" >&2
exit $RC_FAILED
else
exit $RC_OKAY
fi
There are more tests for OpenStack at the moment as this is the speciality where it started, but it’s open and able to extend to whatever is needed.
Each test should take care of checking if it should run or not and output return code and stderr. Wrapper just runs all the tests or specific ones (filtering options)
~/~/.../plugins/core/rhev/hosted-engine.sh
chmod +x hosted-engine.sh
$RC_OKAY
(ok), $RC_FAILED
(failed) or $RC_SKIPPED
(skipped)if [ “$CITELLUS_LIVE” = “0” ]; then
grep -q ovirt-hosted-engine-ha $CITELLUS_ROOT/installed-rpms
returncode=$?
if [ “x$returncode” == “x0” ]; then
exit $RC_OKAY
else
echo “ovirt-hosted-engine is not installed “ >&2
exit $RC_FAILED
fi
else
echo “Not running on Live system” >&2
exit $RC_SKIPPED
fi
# Load common functions
[ -f "${CITELLUS_BASE}/common-functions.sh" ] && . "${CITELLUS_BASE}/common-functions.sh"
if is_rpm ovirt-hosted-engine-ha; then
exit $RC_OKAY
else
echo “ovirt-hosted-engine is not installed “ >&2
exit $RC_FAILED
fi
Use tox
to run some UT’s (utf8, bashate, python 2.7, python 3.5)
Specify the plugin to use:
[piranzo@host citellus]$ ~/citellus/citellus.py sosreport-20170724-175510/crta02 -i hosted-engine.sh
_________ .__ __ .__ .__
\_ ___ \|__|/ |_ ____ | | | | __ __ ______
/ \ \/| \ __\/ __ \| | | | | | \/ ___/
\ \___| || | \ ___/| |_| |_| | /\___ \
\______ /__||__| \___ >____/____/____//____ >
\/ \/ \/
mode: fs snapshot sosreport-20170724-175510/crta02
# ~/~/.../plugins/core/rhev/hosted-engine.sh: failed
“ovirt-hosted-engine is not installed “
For example, Galera requires to check seqno
across all controllers running database.
It’s delivered in citellus repo and can be executed by specifying sosreports:
[piranzo@collab-shell]$ ~/citellus/magui.py * -i seqno
_
_( )_ Magui:
(_(ø)_)
/(_) Multiple Analisis Generic Unifier and Interpreter
\|
|/
{'~/~/.../plugins/core/openstack/mysql/seqno.sh': {'controller0': {'err': u'2b65adb0-787e-11e7-81a8-26480628c14c:285019879\n',
'out': u'',
'rc': 10},
'controller1': {'err': u'2b65adb0-787e-11e7-81a8-26480628c14c:285019879\n',
'out': u'',
'rc': 10},
'controller2': {'err': u'2b65adb0-787e-11e7-81a8-26480628c14c:285019878\n',
'out': u'',
'rc': 10}}}
seqno
and highest seqno
in Galeraseqno
or pipeline-yaml but lot of other issues can benefit from this).THANK YOU FOR ATTENDING!!
For additional questions, come to #citellus on Freenode or email us:
Blog posts: