{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/385","labels_url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/385/comments","events_url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/385/events","html_url":"https://github.com/theforeman/puppet-foreman/issues/385","id":124173182,"number":385,"title":"Foreman::Rake[db:migrate] fails when using puppet 4","user":{"login":"madAndroid","id":1321437,"avatar_url":"https://avatars.githubusercontent.com/u/1321437?v=3","gravatar_id":"","url":"https://api.github.com/users/madAndroid","html_url":"https://github.com/madAndroid","followers_url":"https://api.github.com/users/madAndroid/followers","following_url":"https://api.github.com/users/madAndroid/following{/other_user}","gists_url":"https://api.github.com/users/madAndroid/gists{/gist_id}","starred_url":"https://api.github.com/users/madAndroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madAndroid/subscriptions","organizations_url":"https://api.github.com/users/madAndroid/orgs","repos_url":"https://api.github.com/users/madAndroid/repos","events_url":"https://api.github.com/users/madAndroid/events{/privacy}","received_events_url":"https://api.github.com/users/madAndroid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-29T07:00:12Z","updated_at":"2015-12-30T13:42:42Z","closed_at":"2015-12-29T21:22:18Z","body":"Hi,\r\n\r\nI'm seeing the `Foreman::Rake` execs failing when using the puppetlabs AIO packages:\r\n```\r\n==> core: Info: Foreman::Rake[db:migrate]: Scheduling refresh of Exec[foreman-rake-db:migrate]\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: rake aborted!\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: LoadError: cannot load such file -- facter\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/lib/tasks/reset_permissions.rake:1:in `<top (required)>'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `block in load'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/engine.rb:425:in `block in load_tasks'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/engine.rb:425:in `each'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/engine.rb:425:in `load_tasks'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/application.rb:145:in `load_tasks'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/foreman/Rakefile:7:in `<top (required)>'\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: (See full trace by running task with --trace)\r\n==> core: Error: /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]\r\n==> core: Error: /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]\r\n==> core: Notice: /Stage[main]/Foreman::Database/Foreman_config_entry[db_pending_seed]/value: value changed '' to 'false'\r\n```\r\n\r\nThis is on ubuntu 14.04, puppet version:\r\n```\r\nvagrant@core:~$ /opt/puppetlabs/bin/puppet --version\r\n4.3.1\r\n```\r\n\r\nMy profile module contains:\r\n\r\n```puppet\r\nclass { '::puppet':\r\n    server                  => true,\r\n    server_implementation   => 'puppetserver',\r\n    server_foreman          => false,\r\n    server_git_repo         => true,\r\n    client_package          => 'puppet-agent',\r\n    logdir                  => '/var/log/puppetlabs/puppet',\r\n    rundir                  => '/var/run/puppetlabs',\r\n    ssldir                  => '/etc/puppetlabs/puppet/ssl',\r\n    server_ssl_dir          => '/etc/puppetlabs/puppet/ssl',\r\n    vardir                  => '/opt/puppetlabs/puppet/cache',\r\n}\r\n\r\nclass { '::foreman':\r\n    admin_password          => 'testpass'\r\n}\r\nclass { '::foreman_proxy': }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/comments/168000876","html_url":"https://github.com/theforeman/puppet-foreman/issues/385#issuecomment-168000876","issue_url":"https://api.github.com/repos/theforeman/puppet-foreman/issues/385","id":168000876,"user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T13:42:42Z","updated_at":"2015-12-30T13:42:42Z","body":"While I entirely agree that there are loads of systems that aren't compatible, the issue here looks like one we could address in the Debian packaging by switching to a vendored version of Facter.\r\n\r\nThe 'foreman' package has a dep on the 'facter' package and expects to load it from the regular shared Ruby paths under /usr etc.  We could include bundler.d/facter.rb in the core package build so it's cached as a gem using Bundler instead of using the system package.\r\n\r\n(Facter's only used as a dep in Foreman core for FQDN resolution etc.)"}}