Bug 758712 - Installer (db:seed) sometimes fail with no log output
Summary: Installer (db:seed) sometimes fail with no log output
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Katello
Classification: Retired
Component: Packaging
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-30 15:07 UTC by Lukas Zapletal
Modified: 2012-01-20 16:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-20 16:01:27 UTC


Attachments (Terms of Use)

Description Lukas Zapletal 2011-11-30 15:07:11 UTC
Description of problem:

[1;35merr: /Stage[main]/Katello::Config/Exec[katello_seed_db]/returns: change from notrun to 0 failed: /bin/env >> /var/log/katello/katello-configure/db_seed.log 2>&1 && /bin/echo " Starting Migrate " >> /var/log/katello/katello-configure/db_seed.log 2>&1 && /usr/bin/env rake db:migrate --trace --verbose >> /var/log/katello/katello-configure/db_seed.log 2>&1 && /bin/echo " Starting Seed " >> /var/log/katello/katello-configure/db_seed.log 2>&1 && /usr/bin/env rake db:seed --trace --verbose >> /var/log/katello/katello-configure/db_seed.log 2>&1 && touch /var/lib/katello/initdb_done returned 1 instead of one of [0] at /usr/share/katello/install/puppet/modules/katello/manifests/config.pp:116[0m
'9181011b-cd98-4ba1-8963-a97837fb5306'

Comment 1 Lukas Zapletal 2011-11-30 15:07:27 UTC
Let's see...

Comment 5 Lukas Zapletal 2011-12-02 17:04:13 UTC
Ok so the problem is FQDN have not been set properly on the box:

/etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

As we set localhost for candlepin, but FQDN for pulp in the /etc/katello/katello.yml, it will fail in the later stage.

The workaround is to check your hostname (must be FQDN), and then /etc/hosts.

I will be implementing checker in our configure script that stop execution if this is not set properly.

Comment 6 Lukas Zapletal 2011-12-05 09:38:22 UTC
d03ffb7 configure - adding hostname checks
24b8628 configure - adding exit codes table

Comment 7 Lukas Zapletal 2011-12-07 16:29:48 UTC
Hostname stuff did not change this, reopening, will split it up into several more commands tomorrow.

Comment 8 Lukas Zapletal 2011-12-08 16:02:59 UTC
Output has been split out into three puppet actions:

I was able to reproduce it once, the very first step (dump env variables to a file) returned 1.

err: /Stage[main]/Katello::Config/Exec[katello_db_printenv]/returns: change from notrun to 0 failed: /usr/bin/env > /var/log/katello/katello-configure/db_env.log returned 1 instead of one of [0] at /usr/share/katello/install/puppet/modules/katello/manifests/config.pp:126

It worked out of Puppet. Will try to find more once I hit it again.

My wil guess is that /var/log/katello/katello-configure directory has wrong permissions that time, it gets corrected later on.

Comment 9 Lukas Zapletal 2011-12-09 14:11:35 UTC
44f5649 758712 - Installer (db:seed) sometimes fail [TEMP FIX]

Comment 10 Lukas Zapletal 2011-12-09 14:27:12 UTC
Don't know why, but chmod on symlink did not work in my case (although I believe changing mode on a symlink SHOULD change the target mode). This is better patch:

3fa42e7 758712 - Installer (db:seed) sometimes fail - better [TEMP FIX]

Comment 11 Lukas Zapletal 2011-12-12 12:15:20 UTC
Pushed proper fix - now it is fixed in puppet:

ed80ac9 758712 - execute classes with logs in correct order

I am leaving the original fix (chmod 777 /var/log/katello) there since the permissions are corrected once script finishes.

Comment 12 Kedar Bidarkar 2011-12-22 15:54:56 UTC
We still face this issue, 

[root@xxxx ~]# katello-configure 
Starting Katello configuration
The top-level log file is [/var/log/katello/katello-configure-20111222-213401/main.log]
err: /Stage[main]/Katello::Config/Exec[katello_seed_db]/returns: change from notrun to 0 failed: /usr/bin/env rake db:seed --trace --verbose > /var/log/katello/katello-configure/db_seed.log 2>&1 && touch /var/lib/katello/db_seed_done returned 1 instead of one of [0] at /usr/share/katello/install/puppet/modules/katello/manifests/config.pp:184

rpm -qav | grep -i katello 
katello-cli-common-0.1.30-1.el6.noarch
katello-glue-foreman-0.1.154-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch
katello-common-0.1.154-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-configure-0.1.46-1.el6.noarch
katello-0.1.154-1.el6.noarch
katello-all-0.1.154-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-0.1.30-1.el6.noarch
katello-glue-pulp-0.1.154-1.el6.noarch
katello-glue-candlepin-0.1.154-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch

Comment 13 Lukas Zapletal 2012-01-12 13:14:33 UTC
Can you please attach full puppet logs (/var/log/katello*) please?

Comment 15 Lukas Zapletal 2012-01-20 16:01:27 UTC
Closing since no logs are provided. We are really not able to track puppet race conditions without them. We need them all: /var/log/katello/* (recursive)


Note You need to log in before you can comment on or make changes to this bug.