Bug #9635
closed[ubuntu 14.04][foreman-installer] installed from apt-get packages, installer crashes due to ruby and postgresql install.
Description
After a clean install of ubnntu 14.04 on a vmhost. I discovered a
16 sudo add-apt-repository ppa:saiarcot895/myppa 17 sudo apt-get update 18 sudo apt-get -y install apt-fast .. 21 touch foreman-setup.sh 22 touch foreman-notes.txt 23 sudo apt-fast install vim 24 vim foreman-notes.txt 25 sudo apt-cache foreman 26 sudo apt-cache search foreman 27 sudo apt-cache search theforeman 28 cat foreman-notes.txt 29 sudo apt-cache search foreman 30 ls -l /etc/apt/sources.list.d/saiarcot895-myppa-trusty.list 31 ls -l /etc/apt/sources.list.d/ 32 sudo touch /etc/apt/sources.list.d/foreman.list 33 sudo vim /etc/apt/sources.list.d/foreman.list 34 wget -q http://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add 35 sudo apt-fast update 36 ifconfig 37 ifconfig -a 38 vim foreman-notes.txt 39 vim foreman-setup.sh 40 cat foreman-notes.txt 41 shutdown -h now 42 sudo shutdown -h now 43 ps -a 44 history 45 ls 46 cat foreman-notes.txt 48 sudo apt-fast install foreman foreman-mysql2 foreman-libvirt foreman-cli foreman-proxy foreman-compute ruby-hammer-cli ruby-hammer-cli-foreman 49 sudo apt-fast install foreman foreman-mysql2 foreman-libvirt foreman-proxy foreman-compute 50 sudo apt-fast install ruby-rkerberos 51 apt-mark showhold 52 sudo apt-mark showhold 53 sudo apt-get update 54 sudo apt-fast update 55 sudo apt-fast install foreman foreman-mysql2 foreman-libvirt foreman-proxy foreman-compute 56 sudo apt-get install foreman foreman-mysql2 foreman-libvirt foreman-proxy foreman-compute
after running installing and foreman installer
Setting up ruby-rgen (0.6.6-1) ... Setting up ruby-yajl (1.2.0-1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up ruby-kafo-parsers (0.0.3-1) ... Setting up ruby-kafo (0.6.5-1) ... Setting up foreman-installer (1.7.2-1) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ... darragh@prov-srv1:~$ sudo foreman-installer *Cannot create /var/lib/postgresql/9.3/main; parent directory /var/lib/postgresql/9.3 does not exist /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/postgresql/9.3/main]/ensure: change from absent to directory failed: Cannot create /var/lib/postgresql/9.3/main; parent directory /var/lib/postgresql/9.3 does not exist* Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-proxy' returned 100: Reading package lists... /Stage[main]/Foreman_proxy::Install/Package[foreman-proxy]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-proxy' returned 100: Reading package lists... Installing -otice: /# The following directive disables redirects on [26%] [.................................. Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-cli' returned 100: Reading package lists... /Stage[main]/Foreman::Cli/Package[foreman-cli]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-cli' returned 100: Reading package lists... /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Failed to call refresh: Could not find init script or upstart conf file for 'foreman-proxy' /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Could not find init script or upstart conf file for 'foreman-proxy' /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] /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] /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache]/Exec[foreman-rake-apipie:cache]: Failed to call refresh: /usr/sbin/foreman-rake apipie:cache returned 1 instead of one of [0] /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache]/Exec[foreman-rake-apipie:cache]: /usr/sbin/foreman-rake apipie:cache returned 1 instead of one of [0] Installing Done [100%] [...............................................................................................................................] Something went wrong! Check the log for ERROR-level output * Foreman is running at https://prov-srv1.monetas.lan Initial credentials are admin / WooRhmhymaK7nmUu * Foreman Proxy is running at https://prov-srv1.monetas.lan:8443 * Puppetmaster is running at port 8140 The full log is at /var/log/foreman-installer/foreman-installer.log
It looks like a problem with both postgresql and ruby, as I intended to setup foreman iwth postgresql.
Full install log attached
Thanks
Darragh
Files
Updated by Anonymous almost 10 years ago
After some pondering I'm unable to reproduce but found some references on the web and also recall conversations on IRC about that. IIRC there was never a clear answer, what's failing, but it seems to me like "something" in puppetlabs-postgresql, which is probably fixed in newer versions. Do you have the VM where this happened still available?
Updated by Dominic Cleal almost 10 years ago
1.7.2 shipped the latest released version of pl-postgresql (4.1.0), so I don't know if there's anything we can do there, unless perhaps there's a fix in master (a brief look at initdb.pp seems identical to the release).
Can you provide the contents of /etc/apt/sources.list.d/foreman.list please?
Updated by Darragh Grealish almost 10 years ago
Dominic Cleal wrote:
1.7.2 shipped the latest released version of pl-postgresql (4.1.0), so I don't know if there's anything we can do there, unless perhaps there's a fix in master (a brief look at initdb.pp seems identical to the release).
Can you provide the contents of /etc/apt/sources.list.d/foreman.list please?
Sure!
darragh@prov-srv1:~$ cat /etc/apt/sources.list.d/foreman.list # Stable packages # Debian Wheezy deb http://deb.theforeman.org/ wheezy 1.7 # Plugins compatible with Stable deb http://deb.theforeman.org/ plugins 1.7
so bingo! it's the wrong package release for trusty
darragh@prov-srv1:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
i will change the foreman.list now to the correct package and re-run the foreman-installer
Updated by Anonymous over 9 years ago
- Status changed from New to Closed
No response received, closing.
Updated by Frank Wall over 9 years ago
Darragh Grealish wrote:
After a clean install of ubnntu 14.04 on a vmhost.
darragh@prov-srv1:~$ sudo foreman-installer *Cannot create /var/lib/postgresql/9.3/main; parent directory /var/lib/postgresql/9.3 does not exist /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/postgresql/9.3/main]/ensure: change from absent to directory failed: Cannot create /var/lib/postgresql/9.3/main; parent directory /var/lib/postgresql/9.3 does not exist*
FWIW, I've just hit the same bug. As discussed with mmoll, I've manually installed puppet-postgresql 4.4.2 under /usr/share/foreman-installer/modules, but this didn't fix it for me.
Manually running `pg_createcluster 9.3 main` solved this issue for me.