Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.all()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin
We use python-novaclient 2.23.3 currently on our backend machines. The os_nova.py filter plugin is actually not needed for local spawning so I usually just move it to os_nova.py.off. We need to implement support for newer python-novaclient.
On Mon, Dec 5, 2016 at 10:53 AM, Martin Juhl mj@casalogic.dk wrote:
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_ password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.all()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
Any ideas????
Fra: "mj" mj@casalogic.dk Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: mandag, 5. december 2016 10:53:35 Emne: python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.all()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Monday, December 5, 2016 11:47:59 AM CET Martin Juhl wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
Any ideas????
I usually try to run the playbook manually to spin up new VM and debug on lower level.
Pavel
Hi
Manually:
ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml/usr/lib/python2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module. warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
PLAY [create instance] ********************************************************
TASK: [generate builder name] ************************************************* changed: [localhost -> 127.0.0.1]
TASK: [debug msg="IP=127.0.0.1"] ********************************************** ok: [localhost] => { "msg": "IP=127.0.0.1" }
TASK: [debug msg="vm_name={{vm_name.stdout}}"] ******************************** ok: [localhost] => { "msg": "vm_name=Copr builder 494041090" }
PLAY RECAP ******************************************************************** localhost : ok=3 changed=1 unreachable=0 failed=0
Are there other playbooks I need to test???
/Martin
----- Original meddelelse ----- Fra: "praiskup" praiskup@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Cc: "mj" mj@casalogic.dk Sendt: mandag, 5. december 2016 12:46:51 Emne: Re: python-novaclient package??
On Monday, December 5, 2016 11:47:59 AM CET Martin Juhl wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
Any ideas????
I usually try to run the playbook manually to spin up new VM and debug on lower level.
Pavel _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Monday, December 5, 2016 1:49:22 PM CET Martin Juhl wrote:
Hi
Manually:
ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml/usr/lib/python2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module. warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
PLAY [create instance] ********************************************************
TASK: [generate builder name] ************************************************* changed: [localhost -> 127.0.0.1]
TASK: [debug msg="IP=127.0.0.1"] ********************************************** ok: [localhost] => { "msg": "IP=127.0.0.1" }
TASK: [debug msg="vm_name={{vm_name.stdout}}"] ******************************** ok: [localhost] => { "msg": "vm_name=Copr builder 494041090" }
PLAY RECAP ******************************************************************** localhost : ok=3 changed=1 unreachable=0 failed=0
Are there other playbooks I need to test???
For some reason you don't allocaate builder VM in OpenStack, but you rather use backend VM as a builder, is that expected?
But I think the playbook ends prematurely anyway, based on [1] -- though I am not expert there (ask Michal), I use different playbooks.
[1] https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/roles/copr/ba...
Pavel
Hi
This is, for now, just a test.. so I just want to keep the stuff on one server.. so I'm using the spawn_local.yml and terminate_local.yml from the backend package...
/Martin
----- Original meddelelse ----- Fra: "praiskup" praiskup@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Cc: "mj" mj@casalogic.dk Sendt: mandag, 5. december 2016 16:09:03 Emne: Re: python-novaclient package??
On Monday, December 5, 2016 1:49:22 PM CET Martin Juhl wrote:
Hi
Manually:
ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml/usr/lib/python2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module. warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
PLAY [create instance] ********************************************************
TASK: [generate builder name] ************************************************* changed: [localhost -> 127.0.0.1]
TASK: [debug msg="IP=127.0.0.1"] ********************************************** ok: [localhost] => { "msg": "IP=127.0.0.1" }
TASK: [debug msg="vm_name={{vm_name.stdout}}"] ******************************** ok: [localhost] => { "msg": "vm_name=Copr builder 494041090" }
PLAY RECAP ******************************************************************** localhost : ok=3 changed=1 unreachable=0 failed=0
Are there other playbooks I need to test???
For some reason you don't allocaate builder VM in OpenStack, but you rather use backend VM as a builder, is that expected?
But I think the playbook ends prematurely anyway, based on [1] -- though I am not expert there (ask Michal), I use different playbooks.
[1] https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/roles/copr/ba...
Pavel _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Mon, Dec 5, 2016 at 11:47 AM, Martin Juhl mj@casalogic.dk wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event _handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manag er.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
Any ideas????
I saw this error ('Inappropriate ioctl for device') when ansible2 default config was used by ansible1.9 being installed after ansible2. Can you show us your /etc/ansible/ansible.cfg? Is it default conf for ansible1.9 package? I assume that ssh mockbuilder@localhost otherwise works ok in your setup.
*Fra: *"mj" mj@casalogic.dk *Til: *"copr-devel" copr-devel@lists.fedorahosted.org *Sendt: *mandag, 5. december 2016 10:53:35 *Emne: *python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_pass word) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.all()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Hi
I haven't done anything to the ansible.cfg file... should I replace it with the one from the copr-backend package???
# config file for ansible -- http://ansible.com/ # ==============================================
# nearly all parameters can be overridden in ansible-playbook # or with command line flags. ansible will read ANSIBLE_CONFIG, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it # finds first
[defaults]
# some basic default values...
inventory = /etc/ansible/hosts #library = /usr/share/my_modules/ remote_tmp = $HOME/.ansible/tmp pattern = * forks = 5 poll_interval = 15 sudo_user = root #ask_sudo_pass = True #ask_pass = True transport = smart #remote_port = 22 module_lang = C
# plays will gather facts by default, which contain information about # the remote system. # # smart - gather by default, but don't regather if already gathered # implicit - gather by default, turn off with gather_facts: False # explicit - do not gather by default, must say gather_facts: True gathering = implicit
# additional paths to search for roles in, colon separated #roles_path = /etc/ansible/roles
# uncomment this to disable SSH key host checking #host_key_checking = False
# change this for alternative sudo implementations sudo_exe = sudo
# what flags to pass to sudo #sudo_flags = -H
# SSH timeout timeout = 10
# default user to use for playbooks if user is not specified # (/usr/bin/ansible will use current user as default) #remote_user = root
# logging is off by default unless this path is defined # if so defined, consider logrotate #log_path = /var/log/ansible.log
# default module name for /usr/bin/ansible #module_name = command
# use this shell for commands executed under sudo # you may need to change this to bin/bash in rare instances # if sudo is constrained #executable = /bin/sh
# if inventory variables overlap, does the higher precedence one win # or are hash values merged together? The default is 'replace' but # this can also be set to 'merge'. #hash_behaviour = replace
# list any Jinja2 extensions to enable here: #jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
# if set, always use this private key file for authentication, same as # if passing --private-key to ansible or ansible-playbook #private_key_file = /path/to/file
# format of string {{ ansible_managed }} available within Jinja2 # templates indicates to users editing templates files will be replaced. # replacing {file}, {host} and {uid} and strftime codes with proper values. ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# by default, ansible-playbook will display "Skipping [host]" if it determines a task # should not be run on a host. Set this to "False" if you don't want to see these "Skipping" # messages. NOTE: the task header will still be shown regardless of whether or not the # task is skipped. #display_skipped_hosts = True
# by default (as of 1.3), Ansible will raise errors when attempting to dereference # Jinja2 variables that are not set in templates or action lines. Uncomment this line # to revert the behavior to pre-1.3. #error_on_undefined_vars = False
# by default (as of 1.6), Ansible may display warnings based on the configuration of the # system running ansible itself. This may include warnings about 3rd party packages or # other conditions that should be resolved if possible. # to disable these warnings, set the following value to False: #system_warnings = True
# by default (as of 1.4), Ansible may display deprecation warnings for language # features that should no longer be used and will be removed in future versions. # to disable these warnings, set the following value to False: #deprecation_warnings = True
# (as of 1.8), Ansible can optionally warn when usage of the shell and # command module appear to be simplified by using a default Ansible module # instead. These warnings can be silenced by adjusting the following # setting or adding warn=yes or warn=no to the end of the command line # parameter string. This will for example suggest using the git module # instead of shelling out to the git command. # command_warnings = False
# set plugin path directories here, separate with colons action_plugins = /usr/share/ansible_plugins/action_plugins callback_plugins = /usr/share/ansible_plugins/callback_plugins connection_plugins = /usr/share/ansible_plugins/connection_plugins lookup_plugins = /usr/share/ansible_plugins/lookup_plugins vars_plugins = /usr/share/ansible_plugins/vars_plugins filter_plugins = /usr/share/ansible_plugins/filter_plugins
# by default callbacks are not loaded for /bin/ansible, enable this if you # want, for example, a notification or logging callback to also apply to # /bin/ansible runs #bin_ansible_callbacks = False
# don't like cows? that's unfortunate. # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 #nocows = 1
# don't like colors either? # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1 #nocolor = 1
# the CA certificate path used for validating SSL certs. This path # should exist on the controlling node, not the target nodes # common locations: # RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt # Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt #ca_file_path =
# the http user-agent string to use when fetching urls. Some web server # operators block the default urllib user agent as it is frequently used # by malicious attacks/scripts, so we set it to something unique to # avoid issues. #http_user_agent = ansible-agent
# if set to a persistent type (not 'memory', for example 'redis') fact values # from previous runs in Ansible will be stored. This may be useful when # wanting to use, for example, IP information from one group of servers # without having to talk to them in the same playbook run to get their # current IP information. fact_caching = memory
# retry files #retry_files_enabled = False #retry_files_save_path = ~/.ansible-retry
[privilege_escalation] #become=True #become_method=sudo #become_user=root #become_ask_pass=False
[paramiko_connection]
# uncomment this line to cause the paramiko connection plugin to not record new host # keys encountered. Increases performance on new host additions. Setting works independently of the # host key checking setting above. #record_host_keys=False
# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this # line to disable this behaviour. #pty=False
[ssh_connection]
# ssh arguments to use # Leaving off ControlPersist will result in poor performance, so use # paramiko on older platforms rather than removing it #ssh_args = -o ControlMaster=auto -o ControlPersist=60s
# The path to use for the ControlPath sockets. This defaults to # "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with # very long hostnames or very long path names (caused by long user names or # deeply nested home directories) this can exceed the character limit on # file socket names (108 characters for most platforms). In that case, you # may wish to shorten the string below. # # Example: # control_path = %(directory)s/%%h-%%r #control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
# Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant # performance improvement when enabled, however when using "sudo:" you must # first disable 'requiretty' in /etc/sudoers # # By default, this option is disabled to preserve compatibility with # sudoers configurations that have requiretty (the default on many distros). # #pipelining = False
# if True, make ansible use scp if the connection type is ssh # (default is sftp) #scp_if_ssh = True
[accelerate] accelerate_port = 5099 accelerate_timeout = 30 accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured # from the last activity to the accelerate daemon. accelerate_daemon_timeout = 30
# If set to yes, accelerate_multi_key will allow multiple # private keys to be uploaded to it, though each user must # have access to the system via SSH to add a new key. The default # is "no". #accelerate_multi_key = yes
[selinux] # file systems that require special treatment when dealing with security context # the default behaviour that copies the existing context or uses the user default # needs to be changed to use the file system dependant context. #special_context_filesystems=nfs,vboxsf,fuse
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: mandag, 5. december 2016 14:53:46 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 11:47 AM, Martin Juhl < mj@casalogic.dk > wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
BQ_BEGIN
Any ideas????
BQ_END
I saw this error ('Inappropriate ioctl for device') when ansible2 default config was used by ansible1.9 being installed after ansible2. Can you show us your /etc/ansible/ansible.cfg? Is it default conf for ansible1.9 package? I assume that ssh mockbuilder@localhost otherwise works ok in your setup.
BQ_BEGIN
Fra: "mj" < mj@casalogic.dk > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 10:53:35 Emne: python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.al l()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Mon, Dec 5, 2016 at 2:58 PM, Martin Juhl mj@casalogic.dk wrote:
Hi
I haven't done anything to the ansible.cfg file... should I replace it with the one from the copr-backend package???
You can try that (move backend/conf/playbooks/ansible.cfg into /etc/ansible) but on my machine I successfully use default ansible1.9 config and health checker works with that. Just to make sure...can you ssh mockbuilder@localhost as `copr` user (I assume your backend.service is running as `copr` user)?
# config file for ansible -- http://ansible.com/ # ==============================================
# nearly all parameters can be overridden in ansible-playbook # or with command line flags. ansible will read ANSIBLE_CONFIG, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it # finds first
[defaults]
# some basic default values...
inventory = /etc/ansible/hosts #library = /usr/share/my_modules/ remote_tmp = $HOME/.ansible/tmp pattern = * forks = 5 poll_interval = 15 sudo_user = root #ask_sudo_pass = True #ask_pass = True transport = smart #remote_port = 22 module_lang = C
# plays will gather facts by default, which contain information about # the remote system. # # smart - gather by default, but don't regather if already gathered # implicit - gather by default, turn off with gather_facts: False # explicit - do not gather by default, must say gather_facts: True gathering = implicit
# additional paths to search for roles in, colon separated #roles_path = /etc/ansible/roles
# uncomment this to disable SSH key host checking #host_key_checking = False
# change this for alternative sudo implementations sudo_exe = sudo
# what flags to pass to sudo #sudo_flags = -H
# SSH timeout timeout = 10
# default user to use for playbooks if user is not specified # (/usr/bin/ansible will use current user as default) #remote_user = root
# logging is off by default unless this path is defined # if so defined, consider logrotate #log_path = /var/log/ansible.log
# default module name for /usr/bin/ansible #module_name = command
# use this shell for commands executed under sudo # you may need to change this to bin/bash in rare instances # if sudo is constrained #executable = /bin/sh
# if inventory variables overlap, does the higher precedence one win # or are hash values merged together? The default is 'replace' but # this can also be set to 'merge'. #hash_behaviour = replace
# list any Jinja2 extensions to enable here: #jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
# if set, always use this private key file for authentication, same as # if passing --private-key to ansible or ansible-playbook #private_key_file = /path/to/file
# format of string {{ ansible_managed }} available within Jinja2 # templates indicates to users editing templates files will be replaced. # replacing {file}, {host} and {uid} and strftime codes with proper values. ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# by default, ansible-playbook will display "Skipping [host]" if it determines a task # should not be run on a host. Set this to "False" if you don't want to see these "Skipping" # messages. NOTE: the task header will still be shown regardless of whether or not the # task is skipped. #display_skipped_hosts = True
# by default (as of 1.3), Ansible will raise errors when attempting to dereference # Jinja2 variables that are not set in templates or action lines. Uncomment this line # to revert the behavior to pre-1.3. #error_on_undefined_vars = False
# by default (as of 1.6), Ansible may display warnings based on the configuration of the # system running ansible itself. This may include warnings about 3rd party packages or # other conditions that should be resolved if possible. # to disable these warnings, set the following value to False: #system_warnings = True
# by default (as of 1.4), Ansible may display deprecation warnings for language # features that should no longer be used and will be removed in future versions. # to disable these warnings, set the following value to False: #deprecation_warnings = True
# (as of 1.8), Ansible can optionally warn when usage of the shell and # command module appear to be simplified by using a default Ansible module # instead. These warnings can be silenced by adjusting the following # setting or adding warn=yes or warn=no to the end of the command line # parameter string. This will for example suggest using the git module # instead of shelling out to the git command. # command_warnings = False
# set plugin path directories here, separate with colons action_plugins = /usr/share/ansible_plugins/action_plugins callback_plugins = /usr/share/ansible_plugins/callback_plugins connection_plugins = /usr/share/ansible_plugins/connection_plugins lookup_plugins = /usr/share/ansible_plugins/lookup_plugins vars_plugins = /usr/share/ansible_plugins/vars_plugins filter_plugins = /usr/share/ansible_plugins/filter_plugins
# by default callbacks are not loaded for /bin/ansible, enable this if you # want, for example, a notification or logging callback to also apply to # /bin/ansible runs #bin_ansible_callbacks = False
# don't like cows? that's unfortunate. # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 #nocows = 1
# don't like colors either? # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1 #nocolor = 1
# the CA certificate path used for validating SSL certs. This path # should exist on the controlling node, not the target nodes # common locations: # RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt # Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt #ca_file_path =
# the http user-agent string to use when fetching urls. Some web server # operators block the default urllib user agent as it is frequently used # by malicious attacks/scripts, so we set it to something unique to # avoid issues. #http_user_agent = ansible-agent
# if set to a persistent type (not 'memory', for example 'redis') fact values # from previous runs in Ansible will be stored. This may be useful when # wanting to use, for example, IP information from one group of servers # without having to talk to them in the same playbook run to get their # current IP information. fact_caching = memory
# retry files #retry_files_enabled = False #retry_files_save_path = ~/.ansible-retry
[privilege_escalation] #become=True #become_method=sudo #become_user=root #become_ask_pass=False
[paramiko_connection]
# uncomment this line to cause the paramiko connection plugin to not record new host # keys encountered. Increases performance on new host additions. Setting works independently of the # host key checking setting above. #record_host_keys=False
# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this # line to disable this behaviour. #pty=False
[ssh_connection]
# ssh arguments to use # Leaving off ControlPersist will result in poor performance, so use # paramiko on older platforms rather than removing it #ssh_args = -o ControlMaster=auto -o ControlPersist=60s
# The path to use for the ControlPath sockets. This defaults to # "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with # very long hostnames or very long path names (caused by long user names or # deeply nested home directories) this can exceed the character limit on # file socket names (108 characters for most platforms). In that case, you # may wish to shorten the string below. # # Example: # control_path = %(directory)s/%%h-%%r #control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
# Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant # performance improvement when enabled, however when using "sudo:" you must # first disable 'requiretty' in /etc/sudoers # # By default, this option is disabled to preserve compatibility with # sudoers configurations that have requiretty (the default on many distros). # #pipelining = False
# if True, make ansible use scp if the connection type is ssh # (default is sftp) #scp_if_ssh = True
[accelerate] accelerate_port = 5099 accelerate_timeout = 30 accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured # from the last activity to the accelerate daemon. accelerate_daemon_timeout = 30
# If set to yes, accelerate_multi_key will allow multiple # private keys to be uploaded to it, though each user must # have access to the system via SSH to add a new key. The default # is "no". #accelerate_multi_key = yes
[selinux] # file systems that require special treatment when dealing with security context # the default behaviour that copies the existing context or uses the user default # needs to be changed to use the file system dependant context. #special_context_filesystems=nfs,vboxsf,fuse
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: mandag, 5. december 2016 14:53:46 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 11:47 AM, Martin Juhl < mj@casalogic.dk > wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][ event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
BQ_BEGIN
Any ideas????
BQ_END
I saw this error ('Inappropriate ioctl for device') when ansible2 default config was used by ansible1.9 being installed after ansible2. Can you show us your /etc/ansible/ansible.cfg? Is it default conf for ansible1.9 package? I assume that ssh mockbuilder@localhost otherwise works ok in your setup.
BQ_BEGIN
Fra: "mj" < mj@casalogic.dk > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 10:53:35 Emne: python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_ password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.al l()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Hi
Yes, copr-be is running as copr:
root@copr02 playbooks]# ps uax |grep copr copr 10065 0.0 1.2 240084 23144 ? Ss 10:57 0:03 RedisLogHandler copr 21706 0.0 1.8 306404 34176 ? Ss 13:17 0:00 Copr VMM base process copr 21707 0.0 2.3 351736 43416 ? Ss 13:17 0:00 /usr/bin/python /usr/bin/copr_be.py copr 21716 0.0 1.6 453868 30804 ? Sl 13:17 0:01 Event Handler copr 21717 0.2 1.9 883352 37496 ? S 13:17 0:11 VM master
And I have just testet ssh from the Copr user.. it works...
Where should the mockbuilder user be created?? I have created the user myself, but am I missing a package???
/Martin
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: mandag, 5. december 2016 15:12:47 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 2:58 PM, Martin Juhl < mj@casalogic.dk > wrote:
Hi
I haven't done anything to the ansible.cfg file... should I replace it with the one from the copr-backend package???
You can try that (move backend/conf/playbooks/ansible.cfg into /etc/ansible) but on my machine I successfully use default ansible1.9 config and health checker works with that. Just to make sure...can you ssh mockbuilder@localhost as `copr` user (I assume your backend.service is running as `copr` user)?
BQ_BEGIN
# config file for ansible -- http://ansible.com/ # ==============================================
# nearly all parameters can be overridden in ansible-playbook # or with command line flags. ansible will read ANSIBLE_CONFIG, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it # finds first
[defaults]
# some basic default values...
inventory = /etc/ansible/hosts #library = /usr/share/my_modules/ remote_tmp = $HOME/.ansible/tmp pattern = * forks = 5 poll_interval = 15 sudo_user = root #ask_sudo_pass = True #ask_pass = True transport = smart #remote_port = 22 module_lang = C
# plays will gather facts by default, which contain information about # the remote system. # # smart - gather by default, but don't regather if already gathered # implicit - gather by default, turn off with gather_facts: False # explicit - do not gather by default, must say gather_facts: True gathering = implicit
# additional paths to search for roles in, colon separated #roles_path = /etc/ansible/roles
# uncomment this to disable SSH key host checking #host_key_checking = False
# change this for alternative sudo implementations sudo_exe = sudo
# what flags to pass to sudo #sudo_flags = -H
# SSH timeout timeout = 10
# default user to use for playbooks if user is not specified # (/usr/bin/ansible will use current user as default) #remote_user = root
# logging is off by default unless this path is defined # if so defined, consider logrotate #log_path = /var/log/ansible.log
# default module name for /usr/bin/ansible #module_name = command
# use this shell for commands executed under sudo # you may need to change this to bin/bash in rare instances # if sudo is constrained #executable = /bin/sh
# if inventory variables overlap, does the higher precedence one win # or are hash values merged together? The default is 'replace' but # this can also be set to 'merge'. #hash_behaviour = replace
# list any Jinja2 extensions to enable here: #jinja2_extensions = jinja2.ext.do ,jinja2.ext.i18n
# if set, always use this private key file for authentication, same as # if passing --private-key to ansible or ansible-playbook #private_key_file = /path/to/file
# format of string {{ ansible_managed }} available within Jinja2 # templates indicates to users editing templates files will be replaced. # replacing {file}, {host} and {uid} and strftime codes with proper values. ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# by default, ansible-playbook will display "Skipping [host]" if it determines a task # should not be run on a host. Set this to "False" if you don't want to see these "Skipping" # messages. NOTE: the task header will still be shown regardless of whether or not the # task is skipped. #display_skipped_hosts = True
# by default (as of 1.3), Ansible will raise errors when attempting to dereference # Jinja2 variables that are not set in templates or action lines. Uncomment this line # to revert the behavior to pre-1.3. #error_on_undefined_vars = False
# by default (as of 1.6), Ansible may display warnings based on the configuration of the # system running ansible itself. This may include warnings about 3rd party packages or # other conditions that should be resolved if possible. # to disable these warnings, set the following value to False: #system_warnings = True
# by default (as of 1.4), Ansible may display deprecation warnings for language # features that should no longer be used and will be removed in future versions. # to disable these warnings, set the following value to False: #deprecation_warnings = True
# (as of 1.8), Ansible can optionally warn when usage of the shell and # command module appear to be simplified by using a default Ansible module # instead. These warnings can be silenced by adjusting the following # setting or adding warn=yes or warn=no to the end of the command line # parameter string. This will for example suggest using the git module # instead of shelling out to the git command. # command_warnings = False
# set plugin path directories here, separate with colons action_plugins = /usr/share/ansible_plugins/action_plugins callback_plugins = /usr/share/ansible_plugins/callback_plugins connection_plugins = /usr/share/ansible_plugins/connection_plugins lookup_plugins = /usr/share/ansible_plugins/lookup_plugins vars_plugins = /usr/share/ansible_plugins/vars_plugins filter_plugins = /usr/share/ansible_plugins/filter_plugins
# by default callbacks are not loaded for /bin/ansible, enable this if you # want, for example, a notification or logging callback to also apply to # /bin/ansible runs #bin_ansible_callbacks = False
# don't like cows? that's unfortunate. # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 #nocows = 1
# don't like colors either? # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1 #nocolor = 1
# the CA certificate path used for validating SSL certs. This path # should exist on the controlling node, not the target nodes # common locations: # RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt # Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # Ubuntu : /usr/share/ca-certificates/ cacert.org/cacert.org.crt #ca_file_path =
# the http user-agent string to use when fetching urls. Some web server # operators block the default urllib user agent as it is frequently used # by malicious attacks/scripts, so we set it to something unique to # avoid issues. #http_user_agent = ansible-agent
# if set to a persistent type (not 'memory', for example 'redis') fact values # from previous runs in Ansible will be stored. This may be useful when # wanting to use, for example, IP information from one group of servers # without having to talk to them in the same playbook run to get their # current IP information. fact_caching = memory
# retry files #retry_files_enabled = False #retry_files_save_path = ~/.ansible-retry
[privilege_escalation] #become=True #become_method=sudo #become_user=root #become_ask_pass=False
[paramiko_connection]
# uncomment this line to cause the paramiko connection plugin to not record new host # keys encountered. Increases performance on new host additions. Setting works independently of the # host key checking setting above. #record_host_keys=False
# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this # line to disable this behaviour. #pty=False
[ssh_connection]
# ssh arguments to use # Leaving off ControlPersist will result in poor performance, so use # paramiko on older platforms rather than removing it #ssh_args = -o ControlMaster=auto -o ControlPersist=60s
# The path to use for the ControlPath sockets. This defaults to # "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with # very long hostnames or very long path names (caused by long user names or # deeply nested home directories) this can exceed the character limit on # file socket names (108 characters for most platforms). In that case, you # may wish to shorten the string below. # # Example: # control_path = %(directory)s/%%h-%%r #control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
# Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant # performance improvement when enabled, however when using "sudo:" you must # first disable 'requiretty' in /etc/sudoers # # By default, this option is disabled to preserve compatibility with # sudoers configurations that have requiretty (the default on many distros). # #pipelining = False
# if True, make ansible use scp if the connection type is ssh # (default is sftp) #scp_if_ssh = True
[accelerate] accelerate_port = 5099 accelerate_timeout = 30 accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured # from the last activity to the accelerate daemon. accelerate_daemon_timeout = 30
# If set to yes, accelerate_multi_key will allow multiple # private keys to be uploaded to it, though each user must # have access to the system via SSH to add a new key. The default # is "no". #accelerate_multi_key = yes
[selinux] # file systems that require special treatment when dealing with security context # the default behaviour that copies the existing context or uses the user default # needs to be changed to use the file system dependant context. #special_context_filesystems=nfs,vboxsf,fuse
----- Original meddelelse ----- Fra: "Michal Novotny" < clime@redhat.com > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 14:53:46 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 11:47 AM, Martin Juhl < mj@casalogic.dk > wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event_handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manager.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
BQ_BEGIN
Any ideas????
BQ_END
I saw this error ('Inappropriate ioctl for device') when ansible2 default config was used by ansible1.9 being installed after ansible2. Can you show us your /etc/ansible/ansible.cfg? Is it default conf for ansible1.9 package? I assume that ssh mockbuilder@localhost otherwise works ok in your setup.
BQ_BEGIN
Fra: "mj" < mj@casalogic.dk > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 10:53:35 Emne: python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_password) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.al l()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Mon, Dec 5, 2016 at 4:18 PM, Martin Juhl mj@casalogic.dk wrote:
Hi
Yes, copr-be is running as copr:
root@copr02 playbooks]# ps uax |grep copr copr 10065 0.0 1.2 240084 23144 ? Ss 10:57 0:03 RedisLogHandler copr 21706 0.0 1.8 306404 34176 ? Ss 13:17 0:00 Copr VMM base process copr 21707 0.0 2.3 351736 43416 ? Ss 13:17 0:00 /usr/bin/python /usr/bin/copr_be.py copr 21716 0.0 1.6 453868 30804 ? Sl 13:17 0:01 Event Handler copr 21717 0.2 1.9 883352 37496 ? S 13:17 0:11 VM master
And I have just testet ssh from the Copr user.. it works...
Where should the mockbuilder user be created?? I have created the user myself, but am I missing a package???
mockbuilder is a custom user afaik. I also met this error when I ran backend inside a docker container but you are not doing that right? As a debugging method, you can extract code from check_health in backend/backend/vm_manage/check.py into a self-contained script to run that separately from the rest of copr-backend. You can also strace the script if that shows anything. 'Inappropriate IOCTL on device' might mean that you try to read/write on tty you do not have access to but not sure if this information will help you in any way.
/Martin
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: mandag, 5. december 2016 15:12:47 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 2:58 PM, Martin Juhl < mj@casalogic.dk > wrote:
Hi
I haven't done anything to the ansible.cfg file... should I replace it with the one from the copr-backend package???
You can try that (move backend/conf/playbooks/ansible.cfg into /etc/ansible) but on my machine I successfully use default ansible1.9 config and health checker works with that. Just to make sure...can you ssh mockbuilder@localhost as `copr` user (I assume your backend.service is running as `copr` user)?
BQ_BEGIN
# config file for ansible -- http://ansible.com/ # ==============================================
# nearly all parameters can be overridden in ansible-playbook # or with command line flags. ansible will read ANSIBLE_CONFIG, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it # finds first
[defaults]
# some basic default values...
inventory = /etc/ansible/hosts #library = /usr/share/my_modules/ remote_tmp = $HOME/.ansible/tmp pattern = * forks = 5 poll_interval = 15 sudo_user = root #ask_sudo_pass = True #ask_pass = True transport = smart #remote_port = 22 module_lang = C
# plays will gather facts by default, which contain information about # the remote system. # # smart - gather by default, but don't regather if already gathered # implicit - gather by default, turn off with gather_facts: False # explicit - do not gather by default, must say gather_facts: True gathering = implicit
# additional paths to search for roles in, colon separated #roles_path = /etc/ansible/roles
# uncomment this to disable SSH key host checking #host_key_checking = False
# change this for alternative sudo implementations sudo_exe = sudo
# what flags to pass to sudo #sudo_flags = -H
# SSH timeout timeout = 10
# default user to use for playbooks if user is not specified # (/usr/bin/ansible will use current user as default) #remote_user = root
# logging is off by default unless this path is defined # if so defined, consider logrotate #log_path = /var/log/ansible.log
# default module name for /usr/bin/ansible #module_name = command
# use this shell for commands executed under sudo # you may need to change this to bin/bash in rare instances # if sudo is constrained #executable = /bin/sh
# if inventory variables overlap, does the higher precedence one win # or are hash values merged together? The default is 'replace' but # this can also be set to 'merge'. #hash_behaviour = replace
# list any Jinja2 extensions to enable here: #jinja2_extensions = jinja2.ext.do ,jinja2.ext.i18n
# if set, always use this private key file for authentication, same as # if passing --private-key to ansible or ansible-playbook #private_key_file = /path/to/file
# format of string {{ ansible_managed }} available within Jinja2 # templates indicates to users editing templates files will be replaced. # replacing {file}, {host} and {uid} and strftime codes with proper values. ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# by default, ansible-playbook will display "Skipping [host]" if it determines a task # should not be run on a host. Set this to "False" if you don't want to see these "Skipping" # messages. NOTE: the task header will still be shown regardless of whether or not the # task is skipped. #display_skipped_hosts = True
# by default (as of 1.3), Ansible will raise errors when attempting to dereference # Jinja2 variables that are not set in templates or action lines. Uncomment this line # to revert the behavior to pre-1.3. #error_on_undefined_vars = False
# by default (as of 1.6), Ansible may display warnings based on the configuration of the # system running ansible itself. This may include warnings about 3rd party packages or # other conditions that should be resolved if possible. # to disable these warnings, set the following value to False: #system_warnings = True
# by default (as of 1.4), Ansible may display deprecation warnings for language # features that should no longer be used and will be removed in future versions. # to disable these warnings, set the following value to False: #deprecation_warnings = True
# (as of 1.8), Ansible can optionally warn when usage of the shell and # command module appear to be simplified by using a default Ansible module # instead. These warnings can be silenced by adjusting the following # setting or adding warn=yes or warn=no to the end of the command line # parameter string. This will for example suggest using the git module # instead of shelling out to the git command. # command_warnings = False
# set plugin path directories here, separate with colons action_plugins = /usr/share/ansible_plugins/action_plugins callback_plugins = /usr/share/ansible_plugins/callback_plugins connection_plugins = /usr/share/ansible_plugins/connection_plugins lookup_plugins = /usr/share/ansible_plugins/lookup_plugins vars_plugins = /usr/share/ansible_plugins/vars_plugins filter_plugins = /usr/share/ansible_plugins/filter_plugins
# by default callbacks are not loaded for /bin/ansible, enable this if you # want, for example, a notification or logging callback to also apply to # /bin/ansible runs #bin_ansible_callbacks = False
# don't like cows? that's unfortunate. # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 #nocows = 1
# don't like colors either? # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1 #nocolor = 1
# the CA certificate path used for validating SSL certs. This path # should exist on the controlling node, not the target nodes # common locations: # RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt # Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # Ubuntu : /usr/share/ca-certificates/ cacert.org/cacert.org.crt #ca_file_path =
# the http user-agent string to use when fetching urls. Some web server # operators block the default urllib user agent as it is frequently used # by malicious attacks/scripts, so we set it to something unique to # avoid issues. #http_user_agent = ansible-agent
# if set to a persistent type (not 'memory', for example 'redis') fact values # from previous runs in Ansible will be stored. This may be useful when # wanting to use, for example, IP information from one group of servers # without having to talk to them in the same playbook run to get their # current IP information. fact_caching = memory
# retry files #retry_files_enabled = False #retry_files_save_path = ~/.ansible-retry
[privilege_escalation] #become=True #become_method=sudo #become_user=root #become_ask_pass=False
[paramiko_connection]
# uncomment this line to cause the paramiko connection plugin to not record new host # keys encountered. Increases performance on new host additions. Setting works independently of the # host key checking setting above. #record_host_keys=False
# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this # line to disable this behaviour. #pty=False
[ssh_connection]
# ssh arguments to use # Leaving off ControlPersist will result in poor performance, so use # paramiko on older platforms rather than removing it #ssh_args = -o ControlMaster=auto -o ControlPersist=60s
# The path to use for the ControlPath sockets. This defaults to # "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with # very long hostnames or very long path names (caused by long user names or # deeply nested home directories) this can exceed the character limit on # file socket names (108 characters for most platforms). In that case, you # may wish to shorten the string below. # # Example: # control_path = %(directory)s/%%h-%%r #control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
# Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant # performance improvement when enabled, however when using "sudo:" you must # first disable 'requiretty' in /etc/sudoers # # By default, this option is disabled to preserve compatibility with # sudoers configurations that have requiretty (the default on many distros). # #pipelining = False
# if True, make ansible use scp if the connection type is ssh # (default is sftp) #scp_if_ssh = True
[accelerate] accelerate_port = 5099 accelerate_timeout = 30 accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured # from the last activity to the accelerate daemon. accelerate_daemon_timeout = 30
# If set to yes, accelerate_multi_key will allow multiple # private keys to be uploaded to it, though each user must # have access to the system via SSH to add a new key. The default # is "no". #accelerate_multi_key = yes
[selinux] # file systems that require special treatment when dealing with security context # the default behaviour that copies the existing context or uses the user default # needs to be changed to use the file system dependant context. #special_context_filesystems=nfs,vboxsf,fuse
----- Original meddelelse ----- Fra: "Michal Novotny" < clime@redhat.com > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 14:53:46 Emne: Re: python-novaclient package??
On Mon, Dec 5, 2016 at 11:47 AM, Martin Juhl < mj@casalogic.dk > wrote:
Ok... Might have fixed that myself...
Using the /centos/7.2.1511/cloud/x86_64/openstack-kilo/ it seems to work...
Now i'm getting:
==> /var/log/copr-backend/vmm.log <== [2016-12-05 11:15:37,384][ INFO][vmm.event_handler][manager.py:add_vm_to_pool:175] registered new VM: Copr builder 94671718 127.0.0.1 [2016-12-05 11:18:37,256][ INFO][vmm.event_handler][event _handle.py:on_health_check_result:112] check fail threshold reached: 2, terminating: {u'vm_ip': u'127.0.0.1', u'vm_name': u'Copr builder 760126240', u'topic': u'health_check', u'result': u'failed', u'msg': u'VM is not responding to the testing playbook.Runner options: {'remote_user': 'mockbuilder', 'timeout': 5, 'pattern': '127.0.0.1', 'forks': 1, 'host_list': '127.0.0.1,', 'transport': u'paramiko'}Ansible raw response:\n{'dark': {'127.0.0.1': {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}}, 'contacted': {}}'} [2016-12-05 11:18:37,257][ INFO][vmm.event_handler][manag er.py:start_vm_termination:283] VM Copr builder 760126240 queued for termination
BQ_BEGIN
Any ideas????
BQ_END
I saw this error ('Inappropriate ioctl for device') when ansible2 default config was used by ansible1.9 being installed after ansible2. Can you show us your /etc/ansible/ansible.cfg? Is it default conf for ansible1.9 package? I assume that ssh mockbuilder@localhost otherwise works ok in your setup.
BQ_BEGIN
Fra: "mj" < mj@casalogic.dk > Til: "copr-devel" < copr-devel@lists.fedorahosted.org > Sendt: mandag, 5. december 2016 10:53:35 Emne: python-novaclient package??
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
[root@copr02 playbooks]# ansible-playbook -i inventory -c ssh /usr/share/doc/copr-backend-1.94/playbooks/spawn_local.yml Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 264, in main pb.run() File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run play = Play(self, play_ds, play_basedir, vault_password=self.vault_pass word) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 194, in __init__ self._tasks = self._load_tasks(self._ds.get('tasks', []), load_vars) File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 682, in _load_tasks role_name=role_name File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 255, in __init__ self.async_seconds = template.template_from_string(play.basedir, self.async_seconds, all_vars) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string environment.filters.update(_get_filters()) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters plugins = [ x for x in utils.plugins.filter_loader.al l()] File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path) File "/usr/share/doc/copr-backend-1.94/playbooks/filter_plugins/os_nova.py", line 1, in <module> from novaclient.v1_1.client import Client ImportError: No module named v1_1.client
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
Which version do you use on Fedora???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Monday, December 5, 2016 10:53:35 AM CET Martin Juhl wrote:
Hi guys
Still playing around with getting COPR to work on RHEL/CentOS..
I'm very close.. Only think I have one issue left.. When ansible is spawning a new build instance it fails...
we talked about this with Mirek and Valentin some time ago, and it is not a priority to support CentOS/RHEL in Copr upstream (while I would 100% prefer running on RHEL). This led me to the decision to move the instance to Fedora, too, because otherwise there would be too much compromises and/or maintenance. As I understanded it _that time_, only builders really needed to be run on Fedora, because of lack of weak dependencies ...
So good luck! I'm glad it is possible to (somehow) drive copr on RHEL/CentOS!
I have installed the python-novaclient module from "centos/7.2.1511/cloud/x86_64/openstack-mitaka/" but it seems to be too new, as v1_1.client seems to be deprecated??
That's ansible bug (Fedora is also afected): https://bugzilla.redhat.com/show_bug.cgi?id=1400522
Pavel
copr-devel@lists.fedorahosted.org