Skip to content

Instantly share code, notes, and snippets.

View mbukatov's full-sized avatar

Martin Bukatovic mbukatov

View GitHub Profile
@mbukatov
mbukatov / task_details_messages.md
Created September 20, 2017 09:02
Import Cluster fails from 2017-09-19
Failure in Job ab8f7f26-d98d-4e36-a13e-34fb7f5097e2 Flow tendrl.flows.ImportCluster with error: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/tendrl/commons/jobs/__init__.py", line 212, in process_job the_flow.run() File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/import_cluster/__init__.py", line 81, in run raise ex IOError: [Errno 2] No such file or directory: '/etc/tendrl/gluster-integration/gluster-integration_logging.yaml' 

On one storage server, I see:

# rpm -qa | egrep '(tendrl|gluster)' | sort
glusterfs-4.0dev-0.125.git2ec0dfe.el7.centos.x86_64
glusterfs-api-4.0dev-0.125.git2ec0dfe.el7.centos.x86_64
@mbukatov
mbukatov / gluster_import.py
Created August 18, 2017 08:13
Tendrl Gluster Import
#!/usr/bin/python3
"""
Import gluster cluster via Tendrl API.
The code here comes from usmqe module, which can't be directly used because
it's tighly integrated with usmqe test and logging modules.
"""
import json

Using etcd directly.

Without authentication

etcdctl --endpoints http://${HOSTNAME}:2379 ls /

Enabling password based authentication

@mbukatov
mbukatov / tendrl-api.rst
Created August 18, 2017 06:46
Tendrl API Cleanup
@mbukatov
mbukatov / gist:0fadf4d51f5ab4934236c2b26f34c9ec
Created May 5, 2017 17:56
list all rpm package names from given repourl
$ repoquery --repofrompath="tendrl-deps,https://copr-be.cloud.fedoraproject.org/results/tendrl/dependencies/epel-7-x86_64/" --repoid=tendrl-deps --all --qf='%{name}'
ansible
gstatus
gstatus-debuginfo
hwinfo
hwinfo-debuginfo
hwinfo-devel
libx86emu-debuginfo
libx86emu-devel
libx86emu1
@mbukatov
mbukatov / README.rst
Created April 3, 2017 11:59
no-doc-info-example

Default behaviour with DocInfo transformation:

$ rst2pseudoxml nodocinfo_example.rst
<document ids="no-docinfo-example" names="no\ docinfo\ example" source="nodocinfo_example.rst" title="No DocInfo Example">
    <title>
        No DocInfo Example
    <docinfo>
        <author>
            mbukatov
        <date>
@mbukatov
mbukatov / check result
Created January 5, 2017 09:17
search for missing ending newlines
$ find . -type f | egrep -v '\.(tox|env|git|egg-info)' | egrep -v '(pyc|png|gz)$' | xargs -n 1 ./check-last-newline.sh 2>/dev/null # sed 's/.*\.\(.*\)$/\1/' | sort | uniq
./alerting/tendrl/alerting/tests/README.rst
./alerting/etc/tendrl_definitions_performance_monitoring.yaml
./alerting/.travis.yml
./node_agent/tendrl/node_agent/tests/test_configure_uuid.sample
./node_agent/tendrl/node_agent/tests/README.rst
./node_agent/.travis.yml
./node_agent/tendrl-noded.service
./tendrl-site/source/javascripts/vendor/jquery.backstretch.min.js
./tendrl-site/source/javascripts/vendor/codemirror.js
@mbukatov
mbukatov / tendrl-conf-check.py
Created January 4, 2017 17:40
tendrl-conf-check
#!/usr/bin/env python3
# -*- coding: utf8 -*-
import os
import pprint
import sys
TENDRL_PROJECTS = [
"performance_monitoring",
"alerting",

The script runs the change in place, but you can check what it will do via dry-run mode:

$ tree /home/martin/projects/webstr/webstr/common
/home/martin/projects/webstr/webstr/common
├── __init__.py
├── models
│   ├── actionpopups.py
│   ├── containers.py
│   ├── dialogs.py