Re: COPR shows "failed", but in fact build succeeded

2016-12-05 Thread Michal Novotny
There was Gateway Timeout on copr-keygen. The machine was  likely
overloaded at that time.

On Mon, Dec 5, 2016 at 10:58 PM, Igor Gnatenko  wrote:

> https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/rpm-
> gitoverlay-1480969917.509235/build/485123/
> --
> -Igor Gnatenko
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


COPR shows "failed", but in fact build succeeded

2016-12-05 Thread Igor Gnatenko
https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/rpm-gitoverlay-1480969917.509235/build/485123/
--
-Igor Gnatenko
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Michal Novotny
On Mon, Dec 5, 2016 at 4:18 PM, Martin Juhl  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 ?S13: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" 
> Til: "copr-devel" 
> Sendt: mandag, 5. december 2016 15:12:47
> Emne: Re: python-novaclient package??
>
> On Mon, Dec 5, 2016 at 2:58 PM, Martin Juhl < m...@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 

Re: dist-git is failing to import

2016-12-05 Thread Michal Novotny
On Mon, Dec 5, 2016 at 4:46 PM, Martin Juhl  wrote:

> When trying to import, dist-git is failing:
>
> [15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:392] 1.
> Try to get task data
> [15:12:20][INFO][dist_git.dist_git_importer][dist_git_importer:484] 2.
> Task: 9-epel7, importing the package: http://copr02.casalogic.lan/
> tmp/tmpuxT8L3/copr-mocks-1.5-1.el7.src.rpm
> [15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:361]
> downloading package http://copr02.casalogic.lan/
> tmp/tmpuxT8L3/copr-mocks-1.5-1.el7.src.rpm
> [15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:428]
> Verifying packagage, getting  name and version.
> [15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:457] make
> sure repos exist: mrmeee/Fisk/copr-mocks
> [15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:415]
> importing srpm into the dist-git
> [15:12:20][DEBUG][dist_git.srpm_import][srpm_import:57] repo_dir:
> /tmp/tmpFpUmZy/copr-mocks
> [15:12:20][DEBUG][dist_git.srpm_import][srpm_import:77] clone the pkg
> repository into tmp directory
> [15:12:20][DEBUG][pyrpkg][__init__:1279] Checking out a specific branch
> ssh://copr-dist-git@localhost/mrmeee/Fisk/copr-mocks
> [15:12:20][DEBUG][pyrpkg][__init__:952] Running git clone -b epel7
> ssh://copr-dist-git@localhost/mrmeee/Fisk/copr-mocks --origin origin and
> logging output
> [15:12:20][INFO][pyrpkg][__init__:973] Cloning into 'copr-mocks'...
>
> [15:12:20][DEBUG][dist_git.srpm_import][srpm_import:79] import the source
> rpm into git and save filenames of sources
> [15:12:20][DEBUG][pyrpkg][__init__:680] Creating repo object from
> /tmp/tmpFpUmZy/copr-mocks
> [15:12:21][DEBUG][pyrpkg][__init__:1105] Running: rpm -qp --nosignature
> --qf %{NAME} /tmp/tmphDba9m/package.src.rpm
> [15:12:21][DEBUG][pyrpkg][__init__:1120] Running: rpm -qpl
> /tmp/tmphDba9m/package.src.rpm
> [15:12:21][INFO][dist_git.srpm_import][srpm_import:86] save the source
> files into lookaside cache
> [15:12:21][ERROR][dist_git.dist_git_importer][dist_git_importer:500]
> Exception raised during srpm import:
> Traceback (most recent call last):
>   File "/usr/share/copr/dist_git/dist_git_importer.py", line 493, in
> do_import
> task.git_hash = self.git_import_srpm(task, fetched_srpm_path)
>   File "/usr/share/copr/dist_git/dist_git_importer.py", line 419, in
> git_import_srpm
> return do_git_srpm_import(self.opts, filepath, task, tmp)
>   File "/usr/share/copr/dist_git/srpm_import.py", line 112, in
> do_git_srpm_import
> raise PackageImportException("Failed to import the source rpm:
> {}".format(src_filepath))
> PackageImportException: Failed to import the source rpm:
> /tmp/tmphDba9m/package.src.rpm
> [15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:465]
> Sending back:
> {"task_id": "9-epel7", "error": "srpm_import_failed"}
> [15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:392] 1.
> Try to get task data
> [15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:399] No
> new tasks to process
>
> Any way to get the importer to throw some more info
>
> Or anyone who recognize this error...
>

What is the version of pyrpkg package on your machine? This is also one of
the trickier errors. To debug that, you need to look into
actual_do_git_srpm_import in dist-git/srpm_import.py.


>
> When running the script defined in the installation (
> https://pagure.io/fork/mrmeee/copr/copr/blob/master/f/dist-git)... I get:
>
> [root@copr02 new]# /usr/share/copr/dist_git/dist_git_importer.py
> Traceback (most recent call last):
>   File "/usr/share/copr/dist_git/dist_git_importer.py", line 13, in
> 
> from .exceptions import CoprDistGitException, PackageImportException,
> PackageDownloadException, SrpmBuilderException, \
> ValueError: Attempted relative import in non-package
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


dist-git is failing to import

2016-12-05 Thread Martin Juhl
When trying to import, dist-git is failing:

[15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:392] 1. Try to 
get task data
[15:12:20][INFO][dist_git.dist_git_importer][dist_git_importer:484] 2. Task: 
9-epel7, importing the package: 
http://copr02.casalogic.lan/tmp/tmpuxT8L3/copr-mocks-1.5-1.el7.src.rpm
[15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:361] 
downloading package 
http://copr02.casalogic.lan/tmp/tmpuxT8L3/copr-mocks-1.5-1.el7.src.rpm
[15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:428] Verifying 
packagage, getting  name and version.
[15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:457] make sure 
repos exist: mrmeee/Fisk/copr-mocks
[15:12:20][DEBUG][dist_git.dist_git_importer][dist_git_importer:415] importing 
srpm into the dist-git
[15:12:20][DEBUG][dist_git.srpm_import][srpm_import:57] repo_dir: 
/tmp/tmpFpUmZy/copr-mocks
[15:12:20][DEBUG][dist_git.srpm_import][srpm_import:77] clone the pkg 
repository into tmp directory
[15:12:20][DEBUG][pyrpkg][__init__:1279] Checking out a specific branch 
ssh://copr-dist-git@localhost/mrmeee/Fisk/copr-mocks
[15:12:20][DEBUG][pyrpkg][__init__:952] Running git clone -b epel7 
ssh://copr-dist-git@localhost/mrmeee/Fisk/copr-mocks --origin origin and 
logging output
[15:12:20][INFO][pyrpkg][__init__:973] Cloning into 'copr-mocks'...

[15:12:20][DEBUG][dist_git.srpm_import][srpm_import:79] import the source rpm 
into git and save filenames of sources
[15:12:20][DEBUG][pyrpkg][__init__:680] Creating repo object from 
/tmp/tmpFpUmZy/copr-mocks
[15:12:21][DEBUG][pyrpkg][__init__:1105] Running: rpm -qp --nosignature --qf 
%{NAME} /tmp/tmphDba9m/package.src.rpm
[15:12:21][DEBUG][pyrpkg][__init__:1120] Running: rpm -qpl 
/tmp/tmphDba9m/package.src.rpm
[15:12:21][INFO][dist_git.srpm_import][srpm_import:86] save the source files 
into lookaside cache
[15:12:21][ERROR][dist_git.dist_git_importer][dist_git_importer:500] Exception 
raised during srpm import:
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 493, in do_import
task.git_hash = self.git_import_srpm(task, fetched_srpm_path)
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 419, in 
git_import_srpm
return do_git_srpm_import(self.opts, filepath, task, tmp)
  File "/usr/share/copr/dist_git/srpm_import.py", line 112, in 
do_git_srpm_import
raise PackageImportException("Failed to import the source rpm: 
{}".format(src_filepath))
PackageImportException: Failed to import the source rpm: 
/tmp/tmphDba9m/package.src.rpm
[15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:465] Sending 
back: 
{"task_id": "9-epel7", "error": "srpm_import_failed"}
[15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:392] 1. Try to 
get task data
[15:12:21][DEBUG][dist_git.dist_git_importer][dist_git_importer:399] No new 
tasks to process

Any way to get the importer to throw some more info

Or anyone who recognize this error...

When running the script defined in the installation 
(https://pagure.io/fork/mrmeee/copr/copr/blob/master/f/dist-git)... I get:

[root@copr02 new]# /usr/share/copr/dist_git/dist_git_importer.py
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 13, in 
from .exceptions import CoprDistGitException, PackageImportException, 
PackageDownloadException, SrpmBuilderException, \
ValueError: Attempted relative import in non-package
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Martin Juhl
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" 
Til: "copr-devel" 
Cc: "mj" 
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/backend/files/provision/builderpb.yml
 

Pavel 
___ 
copr-devel mailing list -- copr-devel@lists.fedorahosted.org 
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Martin Juhl
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 ?S13: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" 
Til: "copr-devel" 
Sendt: mandag, 5. december 2016 15:12:47
Emne: Re: python-novaclient package??

On Mon, Dec 5, 2016 at 2:58 PM, Martin Juhl < m...@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 

Re: python-novaclient package??

2016-12-05 Thread Pavel Raiskup
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=3changed=1unreachable=0failed=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/backend/files/provision/builderpb.yml

Pavel
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: failed to post data to frontend

2016-12-05 Thread Michal Novotny
On Mon, Dec 5, 2016 at 1:47 PM, Martin Juhl  wrote:

> Hi
>
> I'm getting these errors/warnings:
>
> ==> /var/log/copr-backend/backend.log <==
> [2016-12-05 11:57:15,358][WARNING][backend.main][frontend.py:_
> post_to_frontend_repeatedly:48] failed to post data to frontend, repeat
> #20
> [2016-12-05 11:57:20,452][WARNING][backend.main][frontend.py:_
> post_to_frontend_repeatedly:48] failed to post data to frontend, repeat
> #21
>
>
> /etc/copr/copr-be.conf:
>
> [backend]
>
> # URL where are results visible
> # default is http://copr
> results_baseurl=https://copr02.casalogic.lan
>
> # default is http://coprs/rest/api
> frontend_base_url=http://copr02.casalogic.lan/api
>
> # must have same value as BACKEND_PASSWORD from have frontend in
> /etc/copr/copr.conf
> # default is PASSWORDHERE but you really should change it. really.
> frontend_auth=mjp123
>
> dist_git_url=copr02.casalogic.lan
>
>
>
>
> /etc/copr/copr.conf:
>
> # Directory and files where is stored Copr database files
> DATA_DIR = '/var/lib/copr/data'
> DATABASE = '/var/lib/copr/data/copr.db'
> OPENID_STORE = '/var/lib/copr/data/openid_store'
> WHOOSHEE_DIR = '/var/lib/copr/data/whooshee'
>
> # salt for CSRF codes
> SECRET_KEY = 'mjp123'
>
> BACKEND_PASSWORD = 'mjp123'
>
> #CSRF_ENABLED = True
> # as of Flask-WTF 0.9+
> WTF_CSRF_ENABLED = True
>
>
>
> Well, is your
>
> Anything else I need to check??? Or any URLs that are wrong..??
>


frontend_base_url should be set to http://copr02.casalogic.lan/


if that is were your frontend instance can be found.

Also note that your results_baseurl is probably not correct as it should be
url of your backend machine with /results (in default setup) at the end.


> Regards
>
> Martin
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Martin Juhl
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 

Re: python-novaclient package??

2016-12-05 Thread Michal Novotny
On Mon, Dec 5, 2016 at 11:47 AM, 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][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" 
> *Til: *"copr-devel" 
> *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 
> 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 
> 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-le...@lists.fedorahosted.org
>
>
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
>
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Martin Juhl
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=3changed=1unreachable=0failed=0 


Are there other playbooks I need to test???

/Martin

- Original meddelelse -
Fra: "praiskup" 
Til: "copr-devel" 
Cc: "mj" 
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-le...@lists.fedorahosted.org
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org


Re: python-novaclient package??

2016-12-05 Thread Pavel Raiskup
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-le...@lists.fedorahosted.org