Katello upgrade 2.4.4 -> 3.0, foreman-rake db:migrate returned 1 instead of [0]

Hi all,

I have received the following during the upgrade from katello 2.4 to
katello 3.0

Installing — /etc/httpd/conf.d/25-puppet.confatell2015-12-08
14 [99%]
[…
/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]
Installing Done
[100%]
[…]
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/foreman-installer/katello.log

Inspecting /var/log/foreman-installer/katello.log I see two things:
First this error at the migrate_foreman step:

[ INFO 2016-07-01 16:05:43 main] Upgrade Step: fix_katello_settings_file…
[ INFO 2016-07-01 16:05:43 main] Upgrade Step: migrate_foreman…
[DEBUG 2016-07-01 16:06:05 main] true

[ERROR 2016-07-01 16:07:41 main] rake aborted!
StandardError: An error has occurred, this and all later migrations
canceled:

undefined method update_attribute' for nil:NilClass/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.1/db/migrate/20160222143432_move_system_description_to_host.rb:14:inblock in up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:in
block (2 levels) in find_each' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:ineach'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:52:in
block in find_each' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:125:infind_in_batches'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/batches.rb:51:in
find_each' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/querying.rb:9:infind_each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.1/db/migrate/20160222143432_move_system_description_to_host.rb:13:in
up' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:598:inexec_migration'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in
block (2 levels) in migrate' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:inblock in migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in
with_connection' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:inmigrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in
migrate' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:inblock in execute_migration_in_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in
block in ddl_transaction' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:inblock in transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in
`within_new_transaction'

··· --

Then the foreman-rake db:migrate error further down

[ WARN 2016-07-01 16:11:32 main]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
Tasks: TOP => db:migrate
[ WARN 2016-07-01 16:11:32 main]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
(See full trace by running task with --trace)
[ WARN 2016-07-01 16:11:32 main]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
== 20160222143432 MoveSystemDescriptionToHost: migrating

[ WARN 2016-07-01 16:11:32 main]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
– add_column(:hosts, :description, :text)
[ WARN 2016-07-01 16:11:32 main]
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
-> 0.0019s
[ERROR 2016-07-01 16:11:32 main]
/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]
[ERROR 2016-07-01 16:11:32 main]
/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]
[ INFO 2016-07-01 16:11:32 main]
/usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in fail' [ INFO 2016-07-01 16:11:32 main] /usr/share/ruby/vendor_ruby/puppet/type/exec.rb:160:insync’
[ INFO 2016-07-01 16:11:32 main]
/usr/share/ruby/vendor_ruby/puppet/type/exec.rb:583:in `refresh’

The installer is progressing (currently at import_subscriptions) but not
sure what I should do about the above?

Thanks :slight_smile:
Dylan

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can be
removed manually with #rm -rf /var/lib/elasticsearch. Some packages are no
longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a while)

Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs for
more information.
[root@wellkatello ~]#

I've created a ticket for it…
http://projects.theforeman.org/issues/15558

Dylan,

You've hit an error that I spent the past two days debugging for another
user but have not been able to replicate locally. Couple of questions for
you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your database
    with me from 2.4? If you are unable to share it out, would you be willing
    to help by doing some live debugging on IRC or some other means?
··· On Jul 1, 2016 1:15 AM, "Dylan Baars" wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can be
removed manually with #rm -rf /var/lib/elasticsearch. Some packages are no
longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs for
more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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.

Happy to do either! I guess a DB backup is easier for you to work with, let
me know how to get that to you (you're after the Postgres db I take it?)

Dylan

··· On Friday, 1 July 2016, Eric D Helms wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for another
user but have not been able to replicate locally. Couple of questions for
you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your database
    with me from 2.4? If you are unable to share it out, would you be willing
    to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” <baarsd@gmail.com > <javascript:_e(%7B%7D,‘cvml’,‘baarsd@gmail.com’);>> wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can be
removed manually with #rm -rf /var/lib/elasticsearch. Some packages are no
longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs
for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘foreman-users%2Bunsubscribe@googlegroups.com’);>
.
To post to this group, send email to foreman-users@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘foreman-users%2Bunsubscribe@googlegroups.com’);>
.
To post to this group, send email to foreman-users@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘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.

Yea, a dump of the 'foreman' and 'candlepin' database as l will need both
from the 2.4 box preupgrade. The easiest option is to use [1] and email me (
ehelms@redhat.com) the file names that you upload. If you'd prefer a
different method please let me know and we'll figure something out.

[1] https://access.redhat.com/solutions/2112

··· On Jul 1, 2016 6:37 AM, "Dylan Baars" wrote:

Happy to do either! I guess a DB backup is easier for you to work with,
let me know how to get that to you (you’re after the Postgres db I take
it?)

Dylan

On Friday, 1 July 2016, Eric D Helms eric.d.helms@gmail.com wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for another
user but have not been able to replicate locally. Couple of questions for
you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your database
    with me from 2.4? If you are unable to share it out, would you be willing
    to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” baarsd@gmail.com wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can
be removed manually with #rm -rf /var/lib/elasticsearch. Some packages are
no longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs
for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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.

Hey Eric,

I just sent a Google Drive share to you at your redhat address, if you
didn't get it you should be able to pick up the files from

https://drive.google.com/folderview?id=0BzOJej1vQpyfZnBKcndzY0RBaGs&usp=sharing

Enjoy :wink:
Dylan

··· On Fri, Jul 1, 2016 at 10:58 PM, Eric D Helms wrote:

Yea, a dump of the ‘foreman’ and ‘candlepin’ database as l will need both
from the 2.4 box preupgrade. The easiest option is to use [1] and email me (
ehelms@redhat.com) the file names that you upload. If you’d prefer a
different method please let me know and we’ll figure something out.

[1] https://access.redhat.com/solutions/2112
On Jul 1, 2016 6:37 AM, “Dylan Baars” baarsd@gmail.com wrote:

Happy to do either! I guess a DB backup is easier for you to work with,
let me know how to get that to you (you’re after the Postgres db I take
it?)

Dylan

On Friday, 1 July 2016, Eric D Helms eric.d.helms@gmail.com wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for another
user but have not been able to replicate locally. Couple of questions for
you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your database
    with me from 2.4? If you are unable to share it out, would you be willing
    to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” baarsd@gmail.com wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can
be removed manually with #rm -rf /var/lib/elasticsearch. Some packages are
no longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs
for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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.

Thanks a ton Dylan! In the end the fix was a simple one [1] but had large
ramifications that I could not have solved without your database!

If you'd like to patch your 3.0.1 with the change and do your upgrade, feel
free. I tested it on your data set with success. I will be working to push
out a 3.0.2 that includes the fix officially as soon as it is merged if
you'd rather wait for an official release of it.

Again, thanks a ton for sharing your data to help resolve this for everyone,
Eric

[1] https://github.com/Katello/katello/pull/6162

··· On Fri, Jul 1, 2016 at 7:16 AM, Dylan Baars wrote:

Hey Eric,

I just sent a Google Drive share to you at your redhat address, if you
didn’t get it you should be able to pick up the files from

https://drive.google.com/folderview?id=0BzOJej1vQpyfZnBKcndzY0RBaGs&usp=sharing

Enjoy :wink:
Dylan

On Fri, Jul 1, 2016 at 10:58 PM, Eric D Helms eric.d.helms@gmail.com > wrote:

Yea, a dump of the ‘foreman’ and ‘candlepin’ database as l will need both
from the 2.4 box preupgrade. The easiest option is to use [1] and email me (
ehelms@redhat.com) the file names that you upload. If you’d prefer a
different method please let me know and we’ll figure something out.

[1] https://access.redhat.com/solutions/2112
On Jul 1, 2016 6:37 AM, “Dylan Baars” baarsd@gmail.com wrote:

Happy to do either! I guess a DB backup is easier for you to work with,
let me know how to get that to you (you’re after the Postgres db I take
it?)

Dylan

On Friday, 1 July 2016, Eric D Helms eric.d.helms@gmail.com wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for
another user but have not been able to replicate locally. Couple of
questions for you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your
    database with me from 2.4? If you are unable to share it out, would you be
    willing to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” baarsd@gmail.com wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files can
be removed manually with #rm -rf /var/lib/elasticsearch. Some packages are
no longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check logs
for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University

Morning Eric,

no worries! Glad I could help (and of course thanks for helping me!). If I
apply the change to my existing 3.0.1 install which failed, do I just run
the upgrade command again? Or should I revert my VM to 2.4 and do the
upgrade again?

Dylan

··· On Sat, Jul 2, 2016 at 4:22 AM, Eric D Helms wrote:

Thanks a ton Dylan! In the end the fix was a simple one [1] but had large
ramifications that I could not have solved without your database!

If you’d like to patch your 3.0.1 with the change and do your upgrade,
feel free. I tested it on your data set with success. I will be working to
push out a 3.0.2 that includes the fix officially as soon as it is merged
if you’d rather wait for an official release of it.

Again, thanks a ton for sharing your data to help resolve this for
everyone,
Eric

[1] https://github.com/Katello/katello/pull/6162

On Fri, Jul 1, 2016 at 7:16 AM, Dylan Baars baarsd@gmail.com wrote:

Hey Eric,

I just sent a Google Drive share to you at your redhat address, if you
didn’t get it you should be able to pick up the files from

https://drive.google.com/folderview?id=0BzOJej1vQpyfZnBKcndzY0RBaGs&usp=sharing

Enjoy :wink:
Dylan

On Fri, Jul 1, 2016 at 10:58 PM, Eric D Helms eric.d.helms@gmail.com >> wrote:

Yea, a dump of the ‘foreman’ and ‘candlepin’ database as l will need
both from the 2.4 box preupgrade. The easiest option is to use [1] and
email me (ehelms@redhat.com) the file names that you upload. If you’d
prefer a different method please let me know and we’ll figure something out.

[1] https://access.redhat.com/solutions/2112
On Jul 1, 2016 6:37 AM, “Dylan Baars” baarsd@gmail.com wrote:

Happy to do either! I guess a DB backup is easier for you to work with,
let me know how to get that to you (you’re after the Postgres db I
take it?)

Dylan

On Friday, 1 July 2016, Eric D Helms eric.d.helms@gmail.com wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for
another user but have not been able to replicate locally. Couple of
questions for you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your
    database with me from 2.4? If you are unable to share it out, would you be
    willing to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” baarsd@gmail.com wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files
can be removed manually with #rm -rf /var/lib/elasticsearch. Some packages
are no longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take a
while) …
Upgrade step update_subscription_facet_backend_data failed. Check
logs for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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.

> Morning Eric,
>
> no worries! Glad I could help (and of course thanks for helping me!). If I
> apply the change to my existing 3.0.1 install which failed, do I just run
> the upgrade command again? Or should I revert my VM to 2.4 and do the
> upgrade again?
>

To keep going with your current 3.0 will require some migration reverting
and while it's do-able, if you can rollback to your 2.4 and go fresh I'd
recommend that.

Eric

··· On Fri, Jul 1, 2016 at 3:24 PM, Dylan Baars wrote:

Dylan

On Sat, Jul 2, 2016 at 4:22 AM, Eric D Helms ericdhelms@gmail.com wrote:

Thanks a ton Dylan! In the end the fix was a simple one [1] but had large
ramifications that I could not have solved without your database!

If you’d like to patch your 3.0.1 with the change and do your upgrade,
feel free. I tested it on your data set with success. I will be working to
push out a 3.0.2 that includes the fix officially as soon as it is merged
if you’d rather wait for an official release of it.

Again, thanks a ton for sharing your data to help resolve this for
everyone,
Eric

[1] https://github.com/Katello/katello/pull/6162

On Fri, Jul 1, 2016 at 7:16 AM, Dylan Baars baarsd@gmail.com wrote:

Hey Eric,

I just sent a Google Drive share to you at your redhat address, if you
didn’t get it you should be able to pick up the files from

https://drive.google.com/folderview?id=0BzOJej1vQpyfZnBKcndzY0RBaGs&usp=sharing

Enjoy :wink:
Dylan

On Fri, Jul 1, 2016 at 10:58 PM, Eric D Helms eric.d.helms@gmail.com >>> wrote:

Yea, a dump of the ‘foreman’ and ‘candlepin’ database as l will need
both from the 2.4 box preupgrade. The easiest option is to use [1] and
email me (ehelms@redhat.com) the file names that you upload. If you’d
prefer a different method please let me know and we’ll figure something out.

[1] https://access.redhat.com/solutions/2112
On Jul 1, 2016 6:37 AM, “Dylan Baars” baarsd@gmail.com wrote:

Happy to do either! I guess a DB backup is easier for you to work
with, let me know how to get that to you (you’re after the Postgres
db I take it?)

Dylan

On Friday, 1 July 2016, Eric D Helms eric.d.helms@gmail.com wrote:

Dylan,

You’ve hit an error that I spent the past two days debugging for
another user but have not been able to replicate locally. Couple of
questions for you:

  1. do you have a backup of your 2.4 before upgrading?
  2. If yes, would you be able to privately share backups of your
    database with me from 2.4? If you are unable to share it out, would you be
    willing to help by doing some live debugging on IRC or some other means?
    On Jul 1, 2016 1:15 AM, “Dylan Baars” baarsd@gmail.com wrote:

I had a further error, final output below

Upgrade Step: restart_services…
Upgrade Step: db_seed…
Upgrade Step: import_package_groups (this may take a while) …
Upgrade Step: import_rpms (this may take a while) …
Upgrade Step: import_distributions (this may take a while) …
Upgrade Step: import_puppet_modules (this may take a while) …
Upgrade Step: import_subscriptions (this may take a while) …
Upgrade Step: elasticsearch_message…
Elasticsearch has been removed as a dependency. The database files
can be removed manually with #rm -rf /var/lib/elasticsearch. Some packages
are no longer needed and can be removed: #rpm -e ruby193-rubygem-tire
tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib
lucene4
Upgrade Step: add_export_distributor (this may take a while) …
Upgrade Step: remove_docker_v1_content (this may take a while) …
Upgrade Step: update_puppet_repository_distributors (this may take a
while) …
Upgrade Step: update_subscription_facet_backend_data (this may take
a while) …
Upgrade step update_subscription_facet_backend_data failed. Check
logs for more information.
[root@wellkatello ~]#

I’ve created a ticket for it…
Bug #15558: Katello 2.4 to 3.0 upgrade fails, db:migrate error and update_subscription_facet_backend_data failed - Katello - Foreman


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+unsubscribe@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 a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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 a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/86Pt-1v0L1s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@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+unsubscribe@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.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University

Morning,

reverted to snapshot (back to katello 2.4), applied the change as per
https://github.com/Katello/katello/pull/6162
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FKatello%2Fkatello%2Fpull%2F6162&sa=D&sntz=1&usg=AFQjCNHwBazLrGdQ5eWAH8BB6TittJoF8A> and
upgraded again - completed successfully! Thanks heaps Eric

FYI, my VMware hosts, which didn't appear under Hosts > All Hosts in 2.4,
now do (they appear in both "All Hosts" and "Content Hosts" pages now) but
they had their name reverted their UUID names so I had to manually rename
them again

>
>
>
To keep going with your current 3.0 will require some migration reverting

··· On Saturday, July 2, 2016 at 7:54:23 AM UTC+12, Eric Helms wrote: > and while it's do-able, if you can rollback to your 2.4 and go fresh I'd > recommend that. > > Eric >