gsr-shanks / nexus Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
[root@beast ~]# yum install restraint-rhts
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package restraint-rhts.x86_64 0:0.1.17-3.el6eso will be obsoleting
---> Package rhts-test-env.noarch 0:4.63-1.el6eng will be obsoleted
--> Processing Conflict: rhts-python-4.63-1.el6eng.noarch conflicts rhts-test-env < 4.44
--> Finished Dependency Resolution
Error: rhts-python conflicts with restraint-rhts-0.1.17-3.el6eso.x86_64
You could try using --skip-broken to work around the problem
yum remove You could try running: rpm -Va --nofiles --nodigest
[root@beast ~]#
remove rhts-python on the resources that get provisioned.
Traceback (most recent call last):
File "idm_ci.py", line 41, in
main()
File "idm_ci.py", line 34, in main
projects.ipa_ci.beaker_run()
File "/home/jenkins/workspace/ipa-beaker-rhel6.5-x86_64-2-runtest/nexus/projects/ipa_ci.py", line 66, in beaker_run
restraint_setup.restraint_junit(junit.xml)
NameError: global name 'junit' is not defined
Build step 'Execute shell' marked build as failure
Traceback (most recent call last):
File "ipa_ci.py", line 27, in
my_node = tuple(os.environ.get('EXISTING_NODES').split(","))
AttributeError: 'NoneType' object has no attribute 'split'
probably can use job.xml or junit.xml to check for test case failures.
I have a requirement for the need of Independent tool which can do following:
A. Run commands (install packages etc)
B. Copy some files (repo files,ssh keys, etc)
C. Run long running scripts
It's mostly used in cases where system has to be prepared before restraint is run.
common_ci.py:
username = "root"
password = "whatever"
common_ci.py:
def remove_rhts_python(self):
"""remove rhts-python as it conflicts with restraint-rhts"""
resources = ExistingNodes()
my_nodes = resources.node_check()
# TODO: move this pacakge name to config/idm_setup.cfg
r_pkgs = ("rhts-python")
def restraint_install(self):
resources = ExistingNodes()
my_nodes = resources.node_check()
# TODO: move this pacakge name to config/idm_setup.cfg
pkgs = ("restraint staf restraint-rhts")
14:54:05 2015-03-10 18:54:09,176 - restraint.py:run_restraint:224 - INFO - Running restraint...
14:54:05 2015-03-10 18:54:09,176 - restraint.py:restraint_setup:79 - INFO - Checking platform.dist of
14:54:05 Exception in thread Thread-1:
14:54:05 Traceback (most recent call last):
14:54:05 File "/usr/lib64/python2.6/threading.py", line 532, in *bootstrap_inner
14:54:05 self.run()
14:54:05 File "/usr/lib64/python2.6/threading.py", line 484, in run
14:54:05 self.__target(_self.__args, _self.__kwargs)
14:54:05 File "/root/nexus/nexus/lib/factory.py", line 42, in runit
14:54:05 result_info[1] = f(item, conf_dict)
14:54:05 File "/root/nexus/nexus/plugins/restraint.py", line 81, in restraint_setup
14:54:05 self.username, password = self.password)
14:54:05 File "/root/nexus/nexus/lib/factory.py", line 79, in __init
14:54:05 self.connect(self.hostname, port=self.port, username=self.username, password=self.password, timeout=30)
14:54:05 File "/usr/lib/python2.6/site-packages/paramiko/client.py", line 277, in connect
14:54:05 socket.getaddrinfo(hostname, port):
14:54:05 gaierror: [Errno -2] Name or service not known
14:54:05
File "idm_ci.py", line 40, in main
projects.rhcs_ci.beaker_run()
File "/home/jenkins/workspace/rhcs9-pki-ca-profile-cli-rhel71-x86_64-bkr-2-runtest/nexus/projects/rhcs_ci.py", line 128, in beaker_run
restraint_inst = restraint_setup()
File "/home/jenkins/workspace/rhcs9-pki-ca-profile-cli-rhel71-x86_64-bkr-2-runtest/nexus/projects/rhcs_ci.py", line 66, in restraint_setup
restraint_setup.restraint_repo()
File "/home/jenkins/workspace/rhcs9-pki-ca-profile-cli-rhel71-x86_64-bkr-2-runtest/nexus/common/restraint.py", line 74, in restraint_repo
if "rhel6" in job_name:
NameError: global name 'job_name' is not defined
Build step 'Execute shell' marked build as failure
Problem:
When using Jenkins Matrix plugin (https://wiki.jenkins-ci.org/display/JENKINS/Matrix+Project+Plugin) you can configure it with values that form a matrix. However, I could not find a way to export variables depending on the matrix values. i.e., the matrix has been configured to use distro_family and we can have multiple distro_names for each distro_family.
Fix:
Requirement for matrixPlugin_BkrVars script
2015-03-10 09:25:19,820 - brew.py:init:67 - INFO - Builds to download: ['ipa', 'sssd', 'pki-core', '389-ds-base', 'bind', 'bind-dyndb-ldap', 'tomcat6', 'nss', 'nspr', 'krb5-workstation', 'krb5', 'slapi-nis', 'resteasy-base', 'python-yubico', 'certmonger', 'python-nss', 'python-dns', 'redhat-access-plugin-ipa', 'python-qrcode', 'open-sans-fonts', 'fontawesome-fonts', 'python-kerberos', 'tomcat', 'python-ldap', 'libldb', 'pyusb', 'ding-libs', 'selinux-policy', 'openldap', 'mod_nss', 'mod_revocator', 'tomcatjss', 'jss', 'libtdb', 'libtevent', 'libtalloc', 'samba']
Exception in thread Thread-18:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in *bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 484, in run
self.__target(_self.__args, _self.__kwargs)
File "/root/nexus/nexus/lib/factory.py", line 42, in runit
result_info[1] = f(item, conf_dict)
File "/root/nexus/nexus/plugins/brew.py", line 85, in get_tagged
type=None, inherit=True)
File "/usr/lib/python2.6/site-packages/koji/__init.py", line 1555, in call
return self.func(self.__name,args,opts)
File "/usr/lib/python2.6/site-packages/koji/__init.py", line 1898, in _callMethod
return self._sendCall(handler, headers, request)
File "/usr/lib/python2.6/site-packages/koji/init.py", line 1809, in _sendCall
return self._sendOneCall(handler, headers, request)
File "/usr/lib/python2.6/site-packages/koji/init.py", line 1827, in _sendOneCall
cnx.endheaders()
File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
self._send_output()
File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
self.send(msg)
File "/usr/lib64/python2.6/httplib.py", line 739, in send
self.connect()
File "/usr/lib64/python2.6/httplib.py", line 720, in connect
self.timeout)
File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
raise error, msg
error: [Errno 111] Connection refused
2015-03-11 10:21:54,216 - ci_message.py:get_ci_msg_value:24 - INFO - null
Traceback (most recent call last):
File "/usr/bin/nexus", line 7, in
execfile(file)
File "/root/nexus/bin/nexus", line 12, in
cli.main()
File "/root/nexus/nexus/tasks/cli.py", line 100, in main
config = setup_conf(options)
File "/root/nexus/nexus/tasks/cli.py", line 111, in setup_conf
t = ci_msg.get_ci_msg_value('tag')
File "/root/nexus/nexus/lib/ci_message.py", line 29, in get_ci_msg_value
ci_msg_value = data[self.ci_message]
TypeError: 'NoneType' object is unsubscriptable
for e.g.,: restraint_dir = ("ipa-tests/restraint")
ipa-tests should come from the config file.
nexus (master<>)$ python idm_ci.py --project ipa --provisioner beaker
File "idm_ci.py", line 38
elif pj == "rhcs":
^
IndentationError: unindent does not match any outer indentation level
nexus (master %<>)$
The way jenkins job builder yaml is configured ... it expects junit xml in $WORKSPACE.
As there is functionality to have restraint repo file , Similarly have this function to work with any repo file. It's best to keep it generic like get_repo(project, repo_url). Also having this specify in setup.cfg would also work.
utils (dev <>)$ pylint --rcfile=~/.pylint restraint_repo_finder.py
************ Module restraint_repo_finder
C: 18, 0: Line too long (88/80) (line-too-long)
C: 23, 0: Trailing whitespace (trailing-whitespace)
C: 28, 0: Exactly one space required around assignment
version=platform.dist()
^ (bad-whitespace)
W: 21, 0: Unused import sys (unused-import)
W: 22, 0: Unused import os (unused-import)
utils (dev *<>)$
Read username and password from etc/global.conf
if username == None:
self.username = (username from etc/global.conf)
else:
self.username = username
similarly for password.
python ipa_ci.py --replicas 1 --clients 2
should print:
master = my_node[0]
replica1 = my_node[1]
client1 = my_node[2]
client2 = my_node[3]
If EXISTING_NODES does not have enough nodes, then should print "you don't have enough nodes for this topo" and sys.exit(1)
logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(name)
Above code is redundant and hence log_ci.py should be created and imported across for consistent logging.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.