rhevm-qe-automation / ovirt-ansible Goto Github PK
View Code? Open in Web Editor NEWAnsible playbooks for ovirt management
License: GNU General Public License v3.0
Ansible playbooks for ovirt management
License: GNU General Public License v3.0
@pkubica was so nice and added this role recently ๐
I just enabled tests to run this role, and it failed on File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'
In order to reproduce just enable test in tests/test.yml
for ovirt-engine-cleanup
role.
Also please add link to main README to include this role.
TASK [ovirt-engine-cleanup : run engine-cleanup with answerfile] ***************
fatal: [engine_centos7]: FAILED! => {"changed": true, "cmd": "engine-cleanup --config-append=/tmp/answerfile.txt", "delta": "0:00:00.382200", "end": "2017-03-03 15:41:39.559123", "failed": true, "rc": 1, "start": "2017-03-03 15:41:39.176923", "stderr": "", "stdout": "[ INFO ] Stage: Initializing\n[ ERROR ] Failed to execute stage 'Initializing': File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'\n[ INFO ] Stage: Clean up\n Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-remove-20170303154139-ixrrys.log\n[ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup'\n[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170303154139-cleanup.conf'\n[ INFO ] Stage: Pre-termination\n[ INFO ] Stage: Termination\n[ ERROR ] Execution of cleanup failed", "stdout_lines": ["[ INFO ] Stage: Initializing", "[ ERROR ] Failed to execute stage 'Initializing': File contains parsing errors: /tmp/answerfile.txt \t[line 11]: 'ovirt-engine-websocket-proxy\\n'", "[ INFO ] Stage: Clean up", " Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-remove-20170303154139-ixrrys.log", "[ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup'", "[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170303154139-cleanup.conf'", "[ INFO ] Stage: Pre-termination", "[ INFO ] Stage: Termination", "[ ERROR ] Execution of cleanup failed"], "warnings": []}
Paswords for database should be editable for upgrade support
Remove variables from task names -> ovirt
TASK [ovirt-common : create repository backup] *********************************
changed: [192.168.1.1]
TASK [ovirt-common : copy {{ovirt_engine_type}} repository file] ***************
skipping: [192.168.1.1]
TASK [ovirt-engine-install-packages : yum install {{ovirt_engine_type}} engine]
ok: [192.168.1.1]
Create test directory which contains playbook.
This playbook will use ovirt-engine roles to deploy ovirt on Travis CI environment.
You can find nice how to about it on ansible galaxy site.
https://www.ansible.com/blog/testing-ansible-roles-with-docker
I the section Continuous Integration with TravisCI + Docker
At the moment when we want to install GA on our VMs we need to know ip/hostnames of all the VMs where we want to run this, with this RFE we can get IPs from engine with dynamic inventory
For future it is planned to connect this module with openstack instances, based on the stack properties inventory and playbooks should be generated from json
Hi,
I was planning to reuse our roles. Unfortunatelly I can`t since the roles are not in their own repository. As an improvement I would recommend having the playbook in one repo and the roles in other repos.
If want to reuse your work, I need to copy your roles . This is not ideal.
Thanks for your efforts.
Add tests for upgrade between versions 4.0 -> 4.1, 4.1 - > 4.2..
And add some doc / notes about it into ovirt-engine-setup readme.
Seems it was intended to use: ansible_ssh_pass=fillme
Collect information about processes and how many memory they use
I want to avoid to
TASK [ovirt-deployment/roles/ovirt-common : copy repository files] *************
skipping: [X.Y.Z.A] => (item=)
TASK [ovirt-deployment/roles/ovirt-common : install rpm repository package] ****
skipping: [X.Y.Z.A]
TASK [ovirt-deployment/roles/ovirt-common : create repository files] ***********
skipping: [X.Y.Z.A] => (item=)
it is redundant and can be replaced by "ansible_fqdn"
Today the ovirt-common role allows you to use ovirt-release-rpm and url to repository itself.
Apparently it expect url to repo file which is copied on target system.
Today I can not find such file which I could use on official ovirt site, so only use case for this parameter is that I can prepare repo file somewhere and then use it.
I would expect, that it accepts url to yum repository, as I did in #62 .
But that is just my point of view ... please make a decision in this manner.
for changing engine fqdn (backup and restore on different hosts)
it should also collect hosted-engine related logs
TASK [ovirt-deployment/roles/ovirt-common : create repository files] ***********
[DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this
will be a fatal error.: 'ovirt_repo_file' is undefined.
This feature will be
removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
"The repository at StLuke/rhevm-ansible was not found."
Hi,
I was test driving the installation quite sucessfull. There was only one issue when deploying engine and hypervisor on the same host.
First I ran the ansible roles for the engine and the GUI came up. Second I was able add the a new host over the GUI. After the sucessfully adding the host the engine GUI was offline, because firewalld was off. I turned it on and the gui was working again.
[root@vm01 ~]# systemctl status firewalld.service
โ firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Do 2016-12-29 09:42:21 CET; 9min ago
Docs: man:firewalld(1)
Main PID: 19477 (firewalld)
CGroup: /system.slice/firewalld.service
โโ19477 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Workaround
[root@vm01 ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/basic.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@vm01 ~]# systemctl start firewalld
Possible solution:
Have firewalld on at all times.
Anyway to cirumvent this odd behavior? Is it a bug?
In order to reproduce just enable test in tests/test.yml for ovirt-collect-logs
role.
TASK [ovirt-collect-logs : Dump system information using shell commands] *******
changed: [engine_centos7] => (item={'key': u'iptables', 'value': u'iptables -L'})
changed: [engine_centos7] => (item={'key': u'sysctl', 'value': u'sysctl -a'})
failed: [engine_centos7] (item={'key': u'netstat', 'value': u'netstat -lnp'}) => {"changed": true, "cmd": "netstat -lnp &> /var/tmp/ovirt-logs/netstat.txt", "delta": "0:00:00.037480", "end": "2017-03-03 15:12:59.485342", "failed": true, "item": {"key": "netstat", "value": "netstat -lnp"}, "rc": 127, "start": "2017-03-03 15:12:59.447862", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}
changed: [engine_centos7] => (item={'key': u'rpm-list', 'value': u'rpm -qa | sort -f'})
changed: [engine_centos7] => (item={'key': u'yum-list', 'value': u'yum list installed'})
changed: [engine_centos7] => (item={'key': u'services', 'value': u"systemctl -t service --failed --no-legend | awk '{print $1}' | xargs -r -n1 journalctl -u"})
changed: [engine_centos7] => (item={'key': u'lsmod', 'value': u'lsmod'})
changed: [engine_centos7] => (item={'key': u'memory_usage', 'value': u'ps -e -orss=,args= | sort -b -k1,1n | tac'})
failed: [engine_centos7] (item={'key': u'lspci', 'value': u'lspci'}) => {"changed": true, "cmd": "lspci &> /var/tmp/ovirt-logs/lspci.txt", "delta": "0:00:00.037323", "end": "2017-03-03 15:13:02.818711", "failed": true, "item": {"key": "lspci", "value": "lspci"}, "rc": 127, "start": "2017-03-03 15:13:02.781388", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}
failed: [engine_centos7] (item={'key': u'lsof', 'value': u'lsof -P'}) => {"changed": true, "cmd": "lsof -P &> /var/tmp/ovirt-logs/lsof.txt", "delta": "0:00:00.037518", "end": "2017-03-03 15:13:03.225583", "failed": true, "item": {"key": "lsof", "value": "lsof -P"}, "rc": 127, "start": "2017-03-03 15:13:03.188065", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}
...ignoring
failed: [engine_centos7] (item={'key': u'pstree', 'value': u'pstree -p'}) => {"changed": true, "cmd": "pstree -p &> /var/tmp/ovirt-logs/pstree.txt", "delta": "0:00:00.037774", "end": "2017-03-03 15:13:03.655815", "failed": true, "item": {"key": "pstree", "value": "pstree -p"}, "rc": 127, "start": "2017-03-03 15:13:03.618041", "stderr": "", "stdout": "", "stdout_lines": [], "warnings": []}
TASK [ovirt-collect-logs : Link common logs] ***********************************
failed: [engine_centos7] (item={u'dest': u'messages', u'src': u'/var/log/messages'}) => {"failed": true, "item": {"dest": "messages", "src": "/var/log/messages"}, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /var/log/messages", "path": "/var/tmp/ovirt-logs/messages", "src": "/var/log/messages", "state": "absent"}
need roles for installation of different versions of satellite (currently 6.0, 6.1, 6.2)
Generate this variable from engine version (3.6) and other parameters such as dwh_enabled
SSIA
User should be able to not specify rpm nor repo of ovirt and rather do it manually with his custom repositories
Now role engine-install need package libselinux-python on the host.
Check:
Currently it's possible to specify multiple repos by using ovirt_rpm_repo, ovirt_repo_files and ovirt_repo_url variables at the same time.All repos will be installed. This can bring problems and dependencies hell.
I see few possible solutions (maybe there're more):
I run ansible with
-e '{"ovirt_repo_file": "http://host.fqdn/rhev.repo", "ovirt_engine_answer_file_type": "4.0_basic"}' playbooks/rhel-host-deploy/config.yml
and see this error:
fatal: [10.35.149.116]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'url'\n\nThe error appears to have been in '/root/provision/ansible/ansible-playbooks/roles/ovirt-deployment/roles/ovirt-common/tasks/main.yml': line 36, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# 1) get repository files\n- name: copy repository files\n ^ here\n"}
the roles itself are not checked
Read the roles, and propose list of tags which would be useful there.
For example setting repositories.
There are roles which defines password for engine and DWH database.
Please allow to omit this option and let engine to generate this password.
There should be task, which is able to collect relevant logs from systems which are used as part of ovirt deployment.
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.