Skip to content

Instantly share code, notes, and snippets.

View ksingh7's full-sized avatar

karan singh ksingh7

View GitHub Profile
@ksingh7
ksingh7 / openstack error
Last active August 29, 2015 14:23
openstack nova : No valid host was found OR Build of instance ID was re-scheduled internal error no supported architecture for os type 'hvm'
Environment:
Openstack Juno installed on 3 nodes of virtualbox ( compute , network and controller )
CentOS7
Just after fresh installation i received below error while launching instnace
2015-06-15 19:27:25.498 10480 ERROR nova.scheduler.utils [req-2237e384-b3a9-4aa1-ac96-898f5c5d72db None] [instance: 3def536d-858d-4631-954a-ca09e56bd71b] Error from last host: compute (node compute): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2033, in _do_build_and_run_instance\n filter_properties)\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2164, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n', u"RescheduledException: Build of instance 3def536d-858d-4631-954a-ca09e56bd71b was re-scheduled: internal error: no supported architecture for os type 'hvm'\n"]
2015-06-15 19:27:25.568 10480 WARNING nova.scheduler.driver [req-2237e384-b3a9-4aa1-ac96-898f5c5d72db None] [instance: 3def
@ksingh7
ksingh7 / vagrant-provision-shell
Created June 17, 2015 13:52
vagrant-provision-shell
puppet.vm.provision 'shell', inline: 'systemctl stop firewalld'
puppet.vm.provision 'shell', inline: 'setenforce 0'
puppet.vm.provision 'shell', inline: "sed -i s'/SELINUX.*=.*enforcing/SELINUX=disabled'/g /etc/selinux/config"
puppet.vm.provision 'shell', inline: 'rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm'
puppet.vm.provision 'shell', inline: 'yum install -y puppet-server'
puppet.vm.provision 'shell', inline: 'puppet resource package puppet-server ensure=latest'
puppet.vm.provision 'shell', inline: 'yum update -y'
puppet.vm.provision 'shell', inline: 'systemctl enable puppetmaster'
puppet.vm.provision 'shell', inline: 'systemctl start puppetmaster'
puppet.vm.provision 'shell', inline: 'systemctl disable firewalld'
@ksingh7
ksingh7 / Vagrantfile
Last active August 29, 2015 14:24
CentOS7 virtual machines for openstack deployment
# Licensed under the Apache License, Version 2.0
# Copyright Karan Singh (Karan_singh1@live.com)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
### IMPORTANT NOTE ###
# make sure you install $ sudo vagrant plugin install vagrant-hostmanager
VAGRANTFILE_API_VERSION = "2"
@ksingh7
ksingh7 / dd_disk_test.sh
Last active August 29, 2015 14:25
DD test for Spinning and SSD disk
## Change these variables for your environment
SPINNING_DISK_OUTPUT_FILE_PATH=
SSD_DISK_OUTPUT_FILE_PATH=
COUNT=262000
BLOCK_SIZE=4k
##############
TEMP_FILE=/dev/zero
> /tmp/dd_output ;
@ksingh7
ksingh7 / Default ceph osd config parameters - Ceph Hammer
Last active September 27, 2015 10:16
Default ceph configuration parameters
[root@ceph-node1 ceph]# ceph --admin-daemon ceph-osd.0.asok config show
{
"name": "osd.0",
"cluster": "ceph",
"debug_none": "0\/5",
"debug_lockdep": "0\/1",
"debug_context": "0\/1",
"debug_crush": "1\/1",
"debug_mds": "1\/5",
"debug_mds_balancer": "1\/5",
@ksingh7
ksingh7 / clear_journal_error.py
Last active February 16, 2016 08:39
CentOS7_clear_journal_error
#!/bin/python
import subprocess
cmd = "journalctl --verify"
restart_journal_service = "False"
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.PIPE, shell=True)
out, err = p.communicate()
p_status = p.wait()
if p_status >= 1:
def get_stats(self):
"""Retrieves stats from ceph mons"""
#ceph_cluster = "%s-%s" % (self.prefix, self.cluster)
ceph_cluster = 'ceph'
data = { ceph_cluster: { 'cluster': { 'slow_rq': 0 } } }
output = None
try:
output = subprocess.check_output('./slow-request.sh', shell=True)
@ksingh7
ksingh7 / UML_Diagram_Spacewalk_OS_deployment
Last active October 30, 2016 15:42
UML diagram for Spacewalk OS Deployment
```sequence
Note left of Node:Power UP
Node->Spacewalk Service:PXE broadcast
Spacewalk Service-->Node: PXE boot
Spacewalk Service-->Node: PXE check for OS
Spacewalk Service-->Node: PXE: If OS already deployed
Note left of Spacewalk Service:Boot node from Local disk
Spacewalk Service-->Node: PXE: If fresh install required
Note left of Spacewalk Service:Boot node from network
Node->DHCP Service:Request IP address ?
@ksingh7
ksingh7 / ceph.conf
Created December 27, 2016 11:56
QCT Lab RGW configuration 27 December
# Please do not change this file directly since it is managed by Ansible and will be overwritten
[global]
#cephx cluster require signatures = True
#cephx require signatures = True
#mon clock drift warn backoff = 30
#mon osd min down reporters = 7
#mon osd report timeout = 900
#mon osd down out interval = 600
#mon osd allow primary affinity = True
@ksingh7
ksingh7 / conky_rpi3
Created January 20, 2018 17:47
Conky Rpi3 configuration
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager