Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
from __future__ import print_function
import argparse
import hpilo
from ironicclient import client
import os
import sys
def get_ilo_connection(hostname, username, password):
return hpilo.Ilo(hostname, username, password)
[Mon Dec 15 10:43:25.340778 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] mod_wsgi (pid=7870): Target WSGI script '/usr/lib/cgi-bin/keystone/main' cannot be loaded as Python module.
[Mon Dec 15 10:43:25.341470 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] mod_wsgi (pid=7870): Exception occurred processing WSGI script '/usr/lib/cgi-bin/keystone/main'.
[Mon Dec 15 10:43:25.342049 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] Traceback (most recent call last):
[Mon Dec 15 10:43:25.342308 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] File "/usr/lib/cgi-bin/keystone/main", line 32, in <module>
[Mon Dec 15 10:43:25.342627 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] from keystone import service
[Mon Dec 15 10:43:25.342824 2014] [:error] [pid 7870:tid 140563332552448] [remote 172.28.128.4:3706] File "/usr/lib/python2.7/dist-packages/keystone/service.py", line 21, in <module>
[Mon Dec 15 11:57:39.770472 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] Traceback (most recent call last):
[Mon Dec 15 11:57:39.770756 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] File "/usr/lib/cgi-bin/keystone/main", line 33, in <module>
[Mon Dec 15 11:57:39.771066 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] from keystone import service
[Mon Dec 15 11:57:39.771341 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] File "/usr/lib/python2.7/dist-packages/keystone/service.py", line 21, in <module>
[Mon Dec 15 11:57:39.771580 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] from keystone import auth
[Mon Dec 15 11:57:39.771799 2014] [:error] [pid 28529:tid 140715160504064] [remote 172.28.128.4:46291] File "/usr/lib/python2.7/dist-packages/keystone/auth/__init__.py", line 17, in <module>
[Mon Dec 15 11:57:39.772095 2014] [:error] [pid 28529:tid 14071516050406
[Wed Dec 17 10:46:36.175352 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] mod_wsgi (pid=4366): Target WSGI script '/usr/lib/python2.7/dist-packages/keystone_wsgi/__init__.py' cannot be loaded as Python module.
[Wed Dec 17 10:46:36.175449 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] mod_wsgi (pid=4366): Exception occurred processing WSGI script '/usr/lib/python2.7/dist-packages/keystone_wsgi/__init__.py'.
[Wed Dec 17 10:46:36.175485 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] Traceback (most recent call last):
[Wed Dec 17 10:46:36.175507 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] File "/usr/lib/python2.7/dist-packages/keystone_wsgi/__init__.py", line 57, in <module>
[Wed Dec 17 10:46:36.175542 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] name=name)
[Wed Dec 17 10:46:36.175558 2014] [:error] [pid 4366:tid 139963189692160] [remote 172.28.128.5:62654] File "/us
Keystone erroring out on an off with below exception. I see that /usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1782 expect self._args None and if not, it just throws this exception, when this happens, I see self._args value is set to empty list. I was working with Rohit to fix this and adding empty list to the condition actually fixing this error.
>>> The following change is fixing this issue
1780c1780
+ if self._args is not None and self._args != []:
- if self._args is not None:
>>>> Here is the exceptions I get (first line is something I print the value of self._args)
@hkumarmk
hkumarmk / gist:0dc519043701faa17ccc
Created March 13, 2015 06:01
how to run deploy.sh
source /var/lib/jenkins/cloud.at.env
unset http_proxy
unset https_proxy
unset env_http_proxy
unset env_https_proxy
export consul_discovery_token=$(curl http://consuldiscovery.linux2go.dk/new)
export BUILD_NUMBER=external1
export env=at
export cloud_provider=jio
export KEY_NAME=jenkins
#!/usr/bin/env python
#
# Copyright 2015 Reliance Jio Infocomm, Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@hkumarmk
hkumarmk / gist:fd036a3d0715e2740981
Last active August 29, 2015 14:19
ceph osd move
#!/bin/bash
id=$1
op=$2
function osd_out {
ceph osd out $id
}
function osd_reset {
service ceph stop osd.${id}
@hkumarmk
hkumarmk / gist:89fecf3f21cab3a2575b
Created June 18, 2015 19:13
to get data in contrail
import sys
pool = ConnectionPool('config_db_uuid')
col_fam = ColumnFamily(pool, 'obj_uuid_table')
zk = KazooClient(hosts='127.0.0.1:2181')
zk.start()
uuid = sys.argv[1]
print 'Looking up %s in Cassandra... ' % (uuid,),
@hkumarmk
hkumarmk / gist:0730bade578e5634d4e5
Last active September 25, 2015 05:51
docker build

Here is how dbuild work

  • Build an image (by installing the scripts they have and install appropriate packages) from a base image downloaded from dockerhub (they use arguments for distribution etc to determine correct image)
  • Create the container in each command/step (using the image from previous step)
    • do docker run with the command in each step (its attaching /home/buildd/build directory from host to container where the builds will save the artifacts)
    • Once done with the command, stop the container
    • Then commit the container - which means create image out of that container

Problems in this approach

  • docker base image (from dockerhub) may get updated on which we dont have any control