Bug #18625
closedforeman-rake-db:migrate error
Description
[root@ki /]# foreman-installer
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
[omitted]
/usr/bin/puppet:8:in `<main>'
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
/usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
..omitted..
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ki.lo]: Could not evaluate: Proxy ki.lo cannot be retrieved: unknown error (response 500)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
This is the error I'm facing
puppet version : 3.8.7 , Centos 7,
i tried tracing of db:rake
[root@ki /]# /usr/sbin/foreman-rake db:migrate --trace --verbose
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /opt/rh/sclo-ror42/root/usr/share/gems/gems/mail-2.6.1/lib/mail/../../VERSION
& i checked for VERSION file which was not there..
[root@ki mail-2.6.1]# pwd
/opt/rh/sclo-ror42/root/usr/share/gems/gems/mail-2.6.1
[root@ki mail-2.6.1]# find . -name "VERSION"
[root@ki mail-2.6.1]#
I think this is because of VERSION file missing, in mail gem?
I tried restarting postgres service, fqdn is good
host version is centos 7
I'm following installation guide .
Full log here : http://pastebin.com/7XHNm6U8
[root@ki mail-2.6.1]# foreman-debug
Processing... (takes a while)
HOSTNAME: ki.lo
OS: redhat
RELEASE: CentOS Linux release 7.3.1611 (Core)
FOREMAN: 1.14.1
RUBY: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
PUPPET: 3.8.7
Updated by Dominic Cleal about 7 years ago
- Status changed from New to Feedback
The original RPM from the CentOS project does contain the VERSION file:
$ rpm -qpl https://buildlogs.centos.org/centos/7/sclo/x86_64/sclo/sclo-ror42/sclo-ror42-rubygem-mail-2.6.1-1.el7.noarch.rpm | grep VERSION
/opt/rh/sclo-ror42/root/usr/share/gems/gems/mail-2.6.1/VERSION
(assuming this is the version you have installed.)
Please check its integrity with rpm -V sclo-ror42-rubygem-mail
which will show any missing files.
You can reinstall the package with yum reinstall
. Consider checking that the server has sufficient disk space, else it may have been some kind of interruption during the initial installation. (You may want to verify all other sclo-*, rh-* and tfm-* RPMs or reinstall the server.)
Updated by Eric Helms about 7 years ago
This is related to how yum can be configured. I experienced this myself and found that in /etc/yum.conf the following had been set:
tsflags=nodocs
This flag prevents anything marked as %doc from being installed which can be used to reduce installation size (e.g. this is used and found in most CentOS containers to reduce size).
I think this bug can be closed against Foreman, however, given that the runtime code of the sclo-ror42-rubygem-mail requires the VERSION file this should be a bug marked against that package since VERSION shouldn't be marked as %doc.