Re: Re: [foreman-users] foreman-ansible callback
I don't have file 05-katello-ssl.conf just following [root@myserver ~]# ls /etc/httpd/conf.d/ 03-crane.conf05-foreman-ssl.conf 25-puppet.conf pulp_content.conf pulp_rpm.conf 05-foreman.conf 05-foreman-ssl.d passenger.conf pulp_docker.conf pulp_streamer.conf 05-foreman.d 15-default.conf pulp.conf pulp_puppet.conf ssl.conf [root@myserver ~]# I tried to use keys and certs from this configs, but with the same result. Dne středa 19. července 2017 13:33:31 UTC+2 Daniel Lobato napsal(a): > > On 07/19, Dan Sk wrote: > > Hi Daniel Lobato, > > thanks for the replay. I use foreman with katello. So I > > used /etc/pki/katello/certs/katello-apache.crt > > and /etc/pki/katello/private/katello-apache.key as mentioned > > in /etc/httpd/conf.d/05-foreman-ssl.conf but still without success. > > Are you sure that's it? My Apache config file is 05-katello-ssl.conf, > and the cert/key are: > > > SSLCertificateFile "/etc/pki/katello/certs/katello-default-ca.crt" > SSLCertificateKeyFile "/etc/pki/katello/private/katello-default-ca.key" > > > > > > > > Here are current logs: > > ==> /var/log/foreman/production.log <== > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Started POST > "/api/v2/hosts/facts" > > for 172.27.9.166 at 2017-07-19 09:27:50 +0200 > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Processing by > > Api::V2::HostsController#facts as JSON > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Parameters: > > {"facts"=>"[FILTERED]", "name"=>"client.in.corp", "apiv"=>"v2", > > :host=>{"name"=>"client.in.corp"}} > > 2017-07-19 09:27:50 d0a8c61a [app] [W] No SSL cert with CN supplied - > > request from 172.27.9.166, > > 2017-07-19 09:27:50 d0a8c61a [app] [W] SSO failed > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Rendered > > api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout > > (1.0ms) > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Filter chain halted as > > > # > > > > rendered or redirected > > 2017-07-19 09:27:50 d0a8c61a [app] [I] Completed 403 Forbidden in 10ms > > (Views: 2.1ms | ActiveRecord: 0.5ms) > > 2017-07-19 09:27:50 5216bc1a [app] [I] Started POST > "/api/v2/hosts/facts" > > for IP_FOREMAN_URL at 2017-07-19 09:27:50 +0200 > > 2017-07-19 09:27:50 5216bc1a [app] [I] Processing by > > Api::V2::HostsController#facts as JSON > > 2017-07-19 09:27:50 5216bc1a [app] [I] Parameters: > > {"facts"=>"[FILTERED]", "name"=>"client.in.corp", "apiv"=>"v2", > > :host=>{"name"=>"client.in.corp"}} > > 2017-07-19 09:27:50 5216bc1a [app] [W] No SSL cert with CN supplied - > > request from IP_FOREMAN_URL, > > 2017-07-19 09:27:50 5216bc1a [app] [W] SSO failed > > 2017-07-19 09:27:50 5216bc1a [app] [I] Rendered > > api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout > > (0.5ms) > > 2017-07-19 09:27:50 5216bc1a [app] [I] Filter chain halted as > > > # > > > > rendered or redirected > > 2017-07-19 09:27:50 5216bc1a [app] [I] Completed 403 Forbidden in 5ms > > (Views: 1.4ms | ActiveRecord: 0.0ms) > > > > Is there any debug mode or curl command which could give me some hint? > > > > Thank you very moch. > > Daniel Slezak > > > > Dne úterý 18. července 2017 17:23:01 UTC+2 Daniel Lobato napsal(a): > > > > > > On 07/18, Dan Sk wrote: > > > > > > > > > > > > Hi, > > > > > > > > I am lost with setting of callback/foreman.py. > > > > > > > > We use Foreman 1.15.2, Katello 3.4.2, foreman_ansible 1.4.5 (with > > > updated callback/forman.py from github) and ansible 2.3.1 on CentOS 7. > > > > > > > > I think i know where Foreman runs. > > > > curl -k -H "Accept: application/json" https://fqdn.in.corp/status > > > > > {"result":"ok","status":"ok","version":"1.15.2","db_duration_ms":"3"} > > > > > > > > Checked certification as is on > > > > https://www.theforeman.org/plugins/foreman_ansible/1.x/index.html#2.1Ansiblecallback > > > > > Request check for certifications > > > > http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification > > > > > python > > > > > > > > import requests > > > > requests.get('https://fqdn.in.corp/', > > > cert=('/etc/foreman/client_cert.pem', '/etc/foreman/client_key.pem')) > > > > > > > > > > > > > > > > But when run ansible -m setup client.in.corp i see > > > > > > > > 2017-07-18 14:26:25 91503c77 [app] [I] Started POST > > > "/api/v2/hosts/facts" for IP_FOREMAN_URL at 2017-07-18 14:26:25 +0200 > > > > 2017-07-18 14:26:25 91503c77 [app] [I] Processing by > > > Api::V2::HostsController#facts as JSON > > > > 2017-07-18 14:26:25 91503c77 [app] [I] Parameters: > > > {"facts"=>"[FILTERED]", "name"=>"client.in.corp", "apiv"=>"v2", > > > :host=>{"name"=>"client.in.corp"}} > > > > 2017-07-18 14:26:25 91503c77 [app] [D] Importer > > > Katello::RhsmFactImporter does not implement > > > authorized_smart_proxy_features. > > > > 2017-07-18 14:26:25 91503c77 [app] [D] Importer > > > ForemanAnsible::StructuredFactImporter does not im
Re: [foreman-users] How to install puppet-agent in version 4
Hi, - Le 20 Juil 17, à 14:09, foreman-users a écrit : > In Katello, puppet.conf - Provisioning Template there is a variable > "enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4, but > where can i switch this variable to be true? > We are providing repos over Katello. You can set this variable to true at different level, in global variable if all your hosts have this variable set to true, or at Org/location hostgroup or directly in the host. If you provide the puppet 4 repo via katello, you have to use the 'enable-puppet4' variable instead of 'enable-puppetlabs-pc1-repo'. There is a little bug in the puppet.conf template because it set the good configuration path only if you enable 'enable-puppetlabs-pc1-repo' and not when you set ' enable-puppet4' (which only setup puppet4 and not the repos) The fix is simple: @@ -5,9 +5,9 @@ <% os_family = @host.operatingsystem.family os_name = @host.operatingsystem.name - if @host.param_true?('enable-puppetlabs-pc1-repo') && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES') + if (@host.param_true?('enable-puppetlabs-pc1-repo') || @host.param_true?('enable-puppet4')) && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES') var_dir = '/opt/puppetlabs/puppet/cache' log_dir = '/var/log/puppetlabs/puppet' run_dir = '/var/run/puppetlabs' ssl_dir = '/etc/puppetlabs/puppet/ssl' I will provide the fix on the comunity_template repo for this. Have a nice day. Cheers. > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email > to foreman-users+unsubscr...@googlegroups.com . > To post to this group, send email to foreman-users@googlegroups.com . > Visit this group at https://groups.google.com/group/foreman-users . > For more options, visit https://groups.google.com/d/optout . -- Baptiste AGASSE Lyra Network France, Senior GNU/Linux engineer 109 Rue de l'innovation, 31670 Labège - France Phone: (+33)5.67.22.31.87 Fax: (+33)5.67.22.31.61 Website: http://www.lyra-network.com -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
Re: [foreman-users] Re: "There are migrations pending in the system" error when foreman-rake migrate:status reports ok
Thanks! Not sure if I restarted them before or not to be honest, but it's finally working :) El jueves, 20 de julio de 2017, 13:54:32 (UTC+2), ohad escribió: > > any chance you simply didnt restart your foreman services after the > db:migrate? > > On Thu, Jul 20, 2017 at 2:09 PM, María Sierra > wrote: > >> Attaching foreman-rake migrate:status output >> >> >> El jueves, 20 de julio de 2017, 13:06:54 (UTC+2), María Sierra escribió: >>> >>> Hello, >>> >>> Our foreman GUI is currently reporting >>> >>> ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending >>> in the system. >>> >>> And the same does hammer. foreman-rake migrate:status output seems to be >>> ok also (attached) >>> >>> This is a little context on how we reached the current status: >>> >>> After a problem with postgresql we had to recover foreman and candlepin >>> DBs from dump files. >>> >>> Our instance is Foreman 1.15 - Katello 3.4. Unfortunately, we didn't >>> know about katello-backup and katello-restore being introduced in version >>> 3.1, so we backed up the DBs like we used to in our old katello 2: >>> >>> pg_dump -Fc foreman > $BDIR/foreman.dump pg_dump -Fc candlepin > >>> $BDIR/candlepin.dump >>> >>> And we recovered them like this: >>> >>> dropdb foreman dropdb candlepin >>> pg_restore -C -d postgres $BDIR/foreman.dump pg_restore -C -d postgres >>> $BDIR/candlepin.dump >>> >>> >>> Now, Postgresql is up, the databases are there: >>> >>> List of databases >>>Name| Owner | Encoding | Collate |Ctype| Access >>> privileges >>> >>> ---+--+--+-+-+ >>> candlepin | postgres | UTF8 | en_US.utf8 | en_US.utf8 | >>> =Tc/postgres + >>>| | | | | >>> postgres=CTc/postgres + >>>| | | | | >>> candlepin=CTc/postgres >>> foreman | foreman | UTF8 | en_US.utf8 | en_US.utf8 | >>> =Tc/foreman + >>>| | | | | >>> foreman=CTc/foreman + >>>| | | | | >>> postgres=CTc/foreman >>> postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >>> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >>> =c/postgres + >>>| | | | | >>> postgres=CTc/postgres >>> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >>> =c/postgres + >>>| | | | | >>> postgres=CTc/postgres >>> (5 rows) >>> >>> Foreman and candlepin users have access privileges, I've seen our data >>> is in the tables and there are even connections going on. All components >>> have started up successfully but we still can't access the GUI or execute >>> hammer commands. >>> >>> Could anybody please shed some light on this issue? Is there any >>> post-recover step that we may have missed? >>> >>> Thanks! >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
[foreman-users] AWS EC2 Foreman SSH Key Deletion/Recreation
Hi All, I have come across the following issue(s) which the EC2 compute resource. Initial creation of an EC2 resource works fine. 1: An attempt to recreate the SSH key pair by clicking the "recreate" option in the SSH Tab on the Foreman UI results in the following error: *Oops, we're sorry but something went wrong *Validation failed: Compute resource has already been taken 2: If the ssh key is deleted from within the Network & Security -> Key Pairs section of the AWS Web Console the key disappears from the list, however the user is not subsequently requested to create a new key pair. The SSH tab on the Foreman UI displays the correct list of SSH keys present in the Key Pairs list on AWS 3: An attempt to resolve the above issue with the forman console (foreman-rake console) results in the following: irb(main):006:0> ComputeResource.find_by(:name => 'AWS').send(:recreate) ActiveRecord::RecordInvalid: Validation failed: Compute resource has already been taken The issue can be worked around by running the following: irb(main):001:0> ComputeResource.find_by(:name => 'AWS').send(:destroy_key_pair) => true irb(main):002:0> ComputeResource.find_by(:name => 'AWS').send(:create_key_pair) => # And then going back to the compute resource from the main compute resource menu ( Infrastructure -> Computer resource) on the Foreman UI I don't believe the above is intended behaviour. >From a user perspective the recreate button should work, however there should also be an option to create a new pair where one doesn't exist, or arbitrarily. Callum -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
[foreman-users] How to install puppet-agent in version 4
In Katello, puppet.conf - Provisioning Template there is a variable "enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4, but where can i switch this variable to be true? We are providing repos over Katello. -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
Re: [foreman-users] Help with plugin - Gem loading error: cannot load such file
No, here's a more complete trace: Gem loading error: cannot load such file -- foreman_azure_rm (RuntimeError) /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/output.rb:13:in `strict_err' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:46:in `rescue in block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:39:in `block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require' /usr/share/foreman/config/application.rb:16:in `' /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' /usr/share/foreman/config/environment.rb:2:in `' /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require' config.ru:3:in `block in ' /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/builder.rb:55:in `instance_eval' /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/builder.rb:55:in `initialize' config.ru:1:in `new' config.ru:1:in `' /usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `eval' /usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `preload_app' /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `' /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `' /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `' On Thursday, July 20, 2017 at 7:37:03 AM UTC-4, Eric Helms wrote: > > Hey Josh, > > Is that error line the only stack trace there is? > > On Jul 19, 2017 2:29 PM, "jpavel" > > wrote: > > What's really strange is that I have thus plugin working on a test > installation, but I can't get it to work on production. > > *NOT MY CODE* > https://github.com/0110001001100101011001010111/foreman_azure_rm - > this is something I'm really, really interested in getting working. > > The gem builds fine (gem build foreman_azure_rm.gemspec) - and I can > install the same exact gem on my test server. > > I install it via: scl enable tfm "gem install > /root/foreman_azure_rm/foreman_azure_rm-1.3.0.gem" > > I can see the gem in > /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/foreman_azure_rm-1.3.0 > > I create /usr/share/foreman/bundler.d/Gemfile.local.rb, with a single > line: gem 'foreman_azure_rm' > > I restart httpd, and I get: *Gem loading error: cannot load such file -- > foreman_azure_rm (RuntimeError)* > > If I run: scl enable tfm "gem list", I see the gem listed. And when I > list: scl enable tfm "gem contents foreman_azure_rm", everything is listed > in the /opt/rh/rh-ruby22/root/usr/local/share/gems/gems path. > > Any help on how I can troubleshoot this? Have I done something wrong? > > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-user...@googlegroups.com . > To post to this group, send email to forema...@googlegroups.com > . > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
Re: [foreman-users] Re: "There are migrations pending in the system" error when foreman-rake migrate:status reports ok
any chance you simply didnt restart your foreman services after the db:migrate? On Thu, Jul 20, 2017 at 2:09 PM, María Sierra wrote: > Attaching foreman-rake migrate:status output > > > El jueves, 20 de julio de 2017, 13:06:54 (UTC+2), María Sierra escribió: >> >> Hello, >> >> Our foreman GUI is currently reporting >> >> ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending >> in the system. >> >> And the same does hammer. foreman-rake migrate:status output seems to be >> ok also (attached) >> >> This is a little context on how we reached the current status: >> >> After a problem with postgresql we had to recover foreman and candlepin >> DBs from dump files. >> >> Our instance is Foreman 1.15 - Katello 3.4. Unfortunately, we didn't know >> about katello-backup and katello-restore being introduced in version 3.1, >> so we backed up the DBs like we used to in our old katello 2: >> >> pg_dump -Fc foreman > $BDIR/foreman.dump pg_dump -Fc candlepin > >> $BDIR/candlepin.dump >> >> And we recovered them like this: >> >> dropdb foreman dropdb candlepin >> pg_restore -C -d postgres $BDIR/foreman.dump pg_restore -C -d postgres >> $BDIR/candlepin.dump >> >> >> Now, Postgresql is up, the databases are there: >> >> List of databases >>Name| Owner | Encoding | Collate |Ctype| Access >> privileges >> ---+--+--+-+ >> -+ >> candlepin | postgres | UTF8 | en_US.utf8 | en_US.utf8 | >> =Tc/postgres + >>| | | | | >> postgres=CTc/postgres + >>| | | | | >> candlepin=CTc/postgres >> foreman | foreman | UTF8 | en_US.utf8 | en_US.utf8 | >> =Tc/foreman + >>| | | | | >> foreman=CTc/foreman + >>| | | | | >> postgres=CTc/foreman >> postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >> =c/postgres + >>| | | | | >> postgres=CTc/postgres >> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | >> =c/postgres + >>| | | | | >> postgres=CTc/postgres >> (5 rows) >> >> Foreman and candlepin users have access privileges, I've seen our data is >> in the tables and there are even connections going on. All components have >> started up successfully but we still can't access the GUI or execute hammer >> commands. >> >> Could anybody please shed some light on this issue? Is there any >> post-recover step that we may have missed? >> >> Thanks! >> >> > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscr...@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
Re: [foreman-users] Help with plugin - Gem loading error: cannot load such file
Hey Josh, Is that error line the only stack trace there is? On Jul 19, 2017 2:29 PM, "jpavel" wrote: What's really strange is that I have thus plugin working on a test installation, but I can't get it to work on production. *NOT MY CODE* https://github.com/011000100110010101100101011100 00/foreman_azure_rm - this is something I'm really, really interested in getting working. The gem builds fine (gem build foreman_azure_rm.gemspec) - and I can install the same exact gem on my test server. I install it via: scl enable tfm "gem install /root/foreman_azure_rm/ foreman_azure_rm-1.3.0.gem" I can see the gem in /opt/rh/rh-ruby22/root/usr/ local/share/gems/gems/foreman_azure_rm-1.3.0 I create /usr/share/foreman/bundler.d/Gemfile.local.rb, with a single line: gem 'foreman_azure_rm' I restart httpd, and I get: *Gem loading error: cannot load such file -- foreman_azure_rm (RuntimeError)* If I run: scl enable tfm "gem list", I see the gem listed. And when I list: scl enable tfm "gem contents foreman_azure_rm", everything is listed in the /opt/rh/rh-ruby22/root/usr/local/share/gems/gems path. Any help on how I can troubleshoot this? Have I done something wrong? -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
[foreman-users] Re: "There are migrations pending in the system" error when foreman-rake migrate:status reports ok
Attaching foreman-rake migrate:status output El jueves, 20 de julio de 2017, 13:06:54 (UTC+2), María Sierra escribió: > > Hello, > > Our foreman GUI is currently reporting > > ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending > in the system. > > And the same does hammer. foreman-rake migrate:status output seems to be > ok also (attached) > > This is a little context on how we reached the current status: > > After a problem with postgresql we had to recover foreman and candlepin > DBs from dump files. > > Our instance is Foreman 1.15 - Katello 3.4. Unfortunately, we didn't know > about katello-backup and katello-restore being introduced in version 3.1, > so we backed up the DBs like we used to in our old katello 2: > > pg_dump -Fc foreman > $BDIR/foreman.dump pg_dump -Fc candlepin > > $BDIR/candlepin.dump > > And we recovered them like this: > > dropdb foreman dropdb candlepin > pg_restore -C -d postgres $BDIR/foreman.dump pg_restore -C -d postgres > $BDIR/candlepin.dump > > > Now, Postgresql is up, the databases are there: > > List of databases >Name| Owner | Encoding | Collate |Ctype| Access > privileges > > ---+--+--+-+-+ > candlepin | postgres | UTF8 | en_US.utf8 | en_US.utf8 | > =Tc/postgres + >| | | | | > postgres=CTc/postgres + >| | | | | > candlepin=CTc/postgres > foreman | foreman | UTF8 | en_US.utf8 | en_US.utf8 | =Tc/foreman > + >| | | | | > foreman=CTc/foreman + >| | | | | > postgres=CTc/foreman > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | > template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres > + >| | | | | > postgres=CTc/postgres > template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres > + >| | | | | > postgres=CTc/postgres > (5 rows) > > Foreman and candlepin users have access privileges, I've seen our data is > in the tables and there are even connections going on. All components have > started up successfully but we still can't access the GUI or execute hammer > commands. > > Could anybody please shed some light on this issue? Is there any > post-recover step that we may have missed? > > Thanks! > > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout. [root@rbalvforeprd run]# foreman-rake db:migrate:status database: foreman Status Migration IDMigration Name -- up 20090714132448 Create hosts up 20090714132449 Add audits table up 20090715143858 Create architectures up 20090717025820 Create media up 20090718060746 Create domains up 20090718064254 Create subnets up 20090720134126 Create operatingsystems up 20090722140138 Create models up 20090722141107 Create environments up 20090729132209 Create reports up 20090730152224 Create ptables up 20090802062223 Create puppetclasses up 20090804130144 Create parameters up 20090820130541 Create auth sources up 20090905150131 Create hostgroups up 20090905155444 Add type to parameter up 20090907045751 Add domain to parameter up 20090915030726 Change report field type to text up 20090916053824 Change host build default to false up 20090920043521 Add index to host up 20090920064156 Add index to parameters up 20090920065522 Add index to reports up 20091012135004 Create users up 20091016031017 Create sessions up 20091022054108 Add status to report up 20091214045923 Calc existing reports up 20091219132338 Create lookup keys up 20091219132839 Create lookup values up 20100115021803 Change mysql reports column up 20100310080727 Add family to os up 20100325142616 Update fact names and values to bin up 20100414125652 Add releasename to os up 20100416124600 Create usergroups up 20100419151910 Add owner to hosts up 20100523114430 Add ubuntu custom lvm ptable up 20100523141204 Create media operatingsystems and migrate data up 20100524080302 Mi
[foreman-users] "There are migrations pending in the system" error when foreman-rake migrate:status reports ok
Hello, Our foreman GUI is currently reporting ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system. And the same does hammer. foreman-rake migrate:status output seems to be ok also (attached) This is a little context on how we reached the current status: After a problem with postgresql we had to recover foreman and candlepin DBs from dump files. Our instance is Foreman 1.15 - Katello 3.4. Unfortunately, we didn't know about katello-backup and katello-restore being introduced in version 3.1, so we backed up the DBs like we used to in our old katello 2: pg_dump -Fc foreman > $BDIR/foreman.dump pg_dump -Fc candlepin > $BDIR/candlepin.dump And we recovered them like this: dropdb foreman dropdb candlepin pg_restore -C -d postgres $BDIR/foreman.dump pg_restore -C -d postgres $BDIR/candlepin.dump Now, Postgresql is up, the databases are there: List of databases Name| Owner | Encoding | Collate |Ctype| Access privileges ---+--+--+-+-+ candlepin | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =Tc/postgres + | | | | | postgres=CTc/postgres + | | | | | candlepin=CTc/postgres foreman | foreman | UTF8 | en_US.utf8 | en_US.utf8 | =Tc/foreman + | | | | | foreman=CTc/foreman + | | | | | postgres=CTc/foreman postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (5 rows) Foreman and candlepin users have access privileges, I've seen our data is in the tables and there are even connections going on. All components have started up successfully but we still can't access the GUI or execute hammer commands. Could anybody please shed some light on this issue? Is there any post-recover step that we may have missed? Thanks! -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.