UPG 2.4.4 to 3.4.4: Upgrade step migrate_foreman failed

Dear all,

can someone help me to upgrade my Katello from 2.4.4 to 3.4.4, I´m getting
now the following:

[ERROR 2017-08-23 22:20:58 main] foreman-rake – config -k use_pulp_oauth
-v true >/dev/null failed! Check the output for error!
[DEBUG 2017-08-23 22:21:12 main] API controllers newer than Apipie cache!
Run apipie:cache rake task to regenerate cache.
[DEBUG 2017-08-23 22:21:44 main] rake aborted!
[DEBUG 2017-08-23 22:21:44 main] StandardError: An error has occurred, this
and all later migrations canceled:
[DEBUG 2017-08-23 22:21:44 main]
[DEBUG 2017-08-23 22:21:44 main] The single-table inheritance mechanism
failed to locate the subclass: 'Katello::System'. This error is raised
because the column 'type' is reserved for storing the class in case of
inheritance. Please rename this column if you didn't intend it to be used
for storing the inheritance class or overwrite
HostCollectionToHosts::System.inheritance_column to use another column for
that
information./opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/inheritance.rb:186:in
`rescue in find_sti_class'
[DEBUG 2017-08-23 22:21:44 main] ActiveRecord::SubclassNotFound: The
single-table inheritance mechanism failed to locate the subclass:
'Katello::System'. This error is raised because the column 'type' is
reserved for storing the class in case of inheritance. Please rename this
column if you didn't intend it to be used for storing the inheritance class
or overwrite HostCollectionToHosts::System.inheritance_column to use
another column for that information.
[DEBUG 2017-08-23 22:21:44 main] NameError: uninitialized constant
Katello::System
[ERROR 2017-08-23 22:21:44 main] foreman-rake db:migrate failed! Check the
output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v false >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] Upgrade step migrate_foreman failed. Check
logs for more information.
[DEBUG 2017-08-23 22:22:02 main] Exit with status code: 1 (signal was 1)
[ERROR 2017-08-23 22:22:02 main] Errors encountered during run:
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v true >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake db:migrate failed! Check the
output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v false >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] Upgrade step migrate_foreman failed. Check
logs for more information.

Thanks,
Christian

Thats a tough spot, as you are upgrading through a lot of versions. I would
recommend trying to upgrade sequentially to at least 3.2 before jumping up
to 3.4. We only test upgrading as far back as N-2.

Eric

··· On Thu, Aug 24, 2017 at 3:58 AM, wrote:

Dear all,

can someone help me to upgrade my Katello from 2.4.4 to 3.4.4, I´m getting
now the following:

[ERROR 2017-08-23 22:20:58 main] foreman-rake – config -k use_pulp_oauth
-v true >/dev/null failed! Check the output for error!
[DEBUG 2017-08-23 22:21:12 main] API controllers newer than Apipie cache!
Run apipie:cache rake task to regenerate cache.
[DEBUG 2017-08-23 22:21:44 main] rake aborted!
[DEBUG 2017-08-23 22:21:44 main] StandardError: An error has occurred,
this and all later migrations canceled:
[DEBUG 2017-08-23 22:21:44 main]
[DEBUG 2017-08-23 22:21:44 main] The single-table inheritance mechanism
failed to locate the subclass: ‘Katello::System’. This error is raised
because the column ‘type’ is reserved for storing the class in case of
inheritance. Please rename this column if you didn’t intend it to be used
for storing the inheritance class or overwrite
HostCollectionToHosts::System.inheritance_column to use another column
for that information./opt/rh/sclo-ror42/root/usr/share/gems/
gems/activerecord-4.2.5.1/lib/active_record/inheritance.rb:186:in `rescue
in find_sti_class’
[DEBUG 2017-08-23 22:21:44 main] ActiveRecord::SubclassNotFound: The
single-table inheritance mechanism failed to locate the subclass:
‘Katello::System’. This error is raised because the column ‘type’ is
reserved for storing the class in case of inheritance. Please rename this
column if you didn’t intend it to be used for storing the inheritance class
or overwrite HostCollectionToHosts::System.inheritance_column to use
another column for that information.
[DEBUG 2017-08-23 22:21:44 main] NameError: uninitialized constant
Katello::System
[ERROR 2017-08-23 22:21:44 main] foreman-rake db:migrate failed! Check the
output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v false >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] Upgrade step migrate_foreman failed.
Check logs for more information.
[DEBUG 2017-08-23 22:22:02 main] Exit with status code: 1 (signal was 1)
[ERROR 2017-08-23 22:22:02 main] Errors encountered during run:
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v true >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake db:migrate failed! Check the
output for error!
[ERROR 2017-08-23 22:22:02 main] foreman-rake – config -k use_pulp_oauth
-v false >/dev/null failed! Check the output for error!
[ERROR 2017-08-23 22:22:02 main] Upgrade step migrate_foreman failed.
Check logs for more information.

Thanks,
Christian


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

>
> Hi Eric,
>

UPG from 2.4.4 to 3.0.x is also failing, any ideas what could be the root
cause?

[ERROR 2017-08-29 21:12:06 main] Execution of '/bin/yum -d 0 -e 0 -y
install katello-client-bootstrap' returned 1: Traceback (most recent call
last):
[ERROR 2017-08-29 21:12:06 main]
/Stage[main]/Capsule/Package[katello-client-bootstrap]/ensure: change from
absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install
katello-client-bootstrap' returned 1: Traceback (most recent call last):
[ERROR 2017-08-29 21:19:37 main] Proxy itsatltkatello.hostname.domain
cannot be registered (422 Unprocessable Entity): N/A
[ERROR 2017-08-29 21:19:37 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]/url:
change from https://itsatltkatello.hostname.domain:9000 to
https://itsatltkatello.hostname.domain:9090 failed: Proxy
itsatltkatello.hostname.domain cannot be registered (422 Unprocessable
Entity): N/A
[ERROR 2017-08-29 21:19:37 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]:
Failed to call refresh: Proxy itsatltkatello.hostname.domain cannot be
registered (500 Internal Server Error): N/A
[ERROR 2017-08-29 21:19:37 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]:
Proxy itsatltkatello.hostname.domain cannot be registered (500 Internal
Server Error): N/A
[ERROR 2017-08-29 22:27:06 main]
/opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:923: warning: exception
in verify_callback is ignored
[ERROR 2017-08-29 22:27:06 main] Upgrade step
update_subscription_facet_backend_data failed. Check logs for more
information.
[ERROR 2017-08-29 22:27:06 main] Errors encountered during run:
[ERROR 2017-08-29 22:27:06 main] Execution of '/bin/yum -d 0 -e 0 -y
install katello-client-bootstrap' returned 1: Traceback (most recent call
last):
[ERROR 2017-08-29 22:27:06 main]
/Stage[main]/Capsule/Package[katello-client-bootstrap]/ensure: change from
absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y install
katello-client-bootstrap' returned 1: Traceback (most recent call last):
[ERROR 2017-08-29 22:27:06 main] Proxy itsatltkatello.hostname.domain
cannot be registered (422 Unprocessable Entity): N/A
[ERROR 2017-08-29 22:27:06 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]/url:
change from https://itsatltkatello.hostname.domain:9000 to
https://itsatltkatello.hostname.domain:9090 failed: Proxy
itsatltkatello.hostname.domain cannot be registered (422 Unprocessable
Entity): N/A
[ERROR 2017-08-29 22:27:06 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]:
Failed to call refresh: Proxy itsatltkatello.hostname.domain cannot be
registered (500 Internal Server Error): N/A
[ERROR 2017-08-29 22:27:06 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[itsatltkatello.hostname.domain]:
Proxy itsatltkatello.hostname.domain cannot be registered (500 Internal
Server Error): N/A
[ERROR 2017-08-29 22:27:06 main]
/opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:923: warning: exception
in verify_callback is ignored
[ERROR 2017-08-29 22:27:06 main] Upgrade step
update_subscription_facet_backend_data failed. Check logs for more
information.

Hi Eric,

I found the Root Cause, in my case "cockpit" was running on 9090 and
Foreman on 9000, this caused the issue to fail the UPG.
I disabled cockpit and configured Foreman to listen on 9090, afterwards UPG
to 3.0.x suceeeded, will now continue step by step to 3.4.x

Sorry & Thanks,
Christian