Skip to content

Instantly share code, notes, and snippets.

View sthirugn's full-sized avatar

sthirugn sthirugn

View GitHub Profile
@JacobCallahan
JacobCallahan / Silent_Bugzilla_CLI
Last active September 26, 2019 15:32
How to update bugs, without sending an email, in the CLI
For this, we will be using the python-bugzilla module
pip install python-bugzilla
This provides 'bugzilla' command, which is the interface we'll be using.
bugzilla has a "modify" sub command which allows us to update a bug via the CLI.
The most important piece of this is to pass the following argument, which surpresses email updates.
--field=minor_update=1
@iNecas
iNecas / capsule-sync-analyze.rb
Created October 10, 2018 10:46
capsule-sync-analyze.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'set'
require 'yaml'
require 'time'
# Usage:
#
# # run inside a directory with extracted task export
@JacobCallahan
JacobCallahan / chd-setup.yaml
Last active May 20, 2018 20:03
Ansible playbook to setup a RHEL 7.4 docker image. Also provides flood.py script
---
# This playbook will setup a docker-ized content host deployment
# environment on the target system(s).
# After completion, a RHEL 7.4 docker image will be available
# and the git repo will be located at /root/content-host-d
- hosts: beaker
remote_user: root
tasks:
- name: Install Docker
package: name=docker state=latest
@johnpmitsch
johnpmitsch / gist:e84d42a12067426f40a164617ef772ce
Created April 4, 2017 16:57
OOM errors for NFS workaround
you could generate a swapfile on the FS and then use that
dd if=/dev/zero of=/path/to/swapfile bs=1014 count=$(expr <megabytes> \* 1024)
mkswap /path/to/swapfile
swapon /path/to/swapfile
then add it to the fstab if you want it to persist past reboots
or
you could dd, mkswap, add to fstab, then swapon -a
@johnpmitsch
johnpmitsch / setup_sat_clone.sh
Last active November 12, 2020 07:26
setup satellite clone script
#!/bin/bash
subscription-manager register
subscription-manager attach --auto
yum install -y vim git
git clone https://github.com/RedHatSatellite/satellite-clone
cd satellite-clone/
chmod -R 755 helpers/
# Change RHEL version as needed
sed -ie 's/RHEL_MAJOR_VERSION="0"/RHEL_MAJOR_VERSION="7"/g' ./helpers/control_node_setup.sh
./helpers/control_node_setup.sh
@JacobCallahan
JacobCallahan / genvirt.py
Last active February 4, 2021 16:27
generate virt-who esx json data
import argparse
import json
import uuid
def gen_json(hypervisors, guests):
virtwho = {}
hypervisor_list = []
for i in range(hypervisors):
guest_list = []
@johnpmitsch
johnpmitsch / qpid_deadlock.md
Last active December 12, 2016 14:32
qpid deadlock check

These steps can be used to check for a qpid deadlock when tasks are stuck in Katello

  • In the dynflow console, click the step that the task is stuck on and find the pulp worker it is assigned to in "worker_name" or "queue"
    • i.e. queue: reserved_resource_worker-1@foo.example.com.dq
  • run ps -awfux | grep celery | grep reserved_resource_worker-X where X is the worker number
    • i.e. ps -awfux | grep celery | grep reserved_resource_worker-1
  • Check the child process (usually the bottom one) and get that pid
    • for example:
@jlsherrill
jlsherrill / 6.2_remove_host.md
Last active March 28, 2017 20:07
6.2 remove host

error "Katello::Resources::Candlepin::Consumer: 410 Gone
{"displayMessage":"Unit 370f8333-fd19-4c0b-9408-dff6d80ce28d has been deleted"}

foreman-rake console

Katello::System.find_by(:uuid => '370f8333-fd19-4c0b-9408-dff6d80ce28d').try(:destroy!)
host = Katello::Host::SubscriptionFacet.find_by(:uuid => '370f8333-fd19-4c0b-9408-dff6d80ce28d').try(:host)
host.subscription_facet.try(:destroy! ) if host

Register both Satellite and Capsule systems

Run these commands on both Satellite and Capsule systems to properly register them to CDN and to remove Beaker repositories (only needed for Red Hat QE folks)

export USER_NAME=""
export USER_PASSWORD=""
export POOLID=""
export ADMIN_USER="admin"
@omaciel
omaciel / quality.md
Last active November 12, 2020 07:13
Characteristics Of A Good Quality Engineer
Also, I would be grateful if you could give me some advice about the skills I need in order to have a career as a Quality Engineer.

I think that the most important skill a Quality Engineer (QE for short) should have is to always strive to deliver quality and never compromise on this goal. Sure, being flexible is just as important, and in order to position yourself in a place where you don't have to compromise on delivering quality, the second important skill is to always, always, do your homework and present facts (backed up with real data and numbers) about the current state of the product you're working on. Don't say things like "the product is too buggy" or "the usability is bad." Instead, focus on showing the type and number of issues you've encountered during your testing cycle or exploratory testing period. Show them numbers! Tell them instead, "our automation shows that feature X has failed Y number of tests out of a total of Z tests, which represents a percentage of P. Furthermore, since feat