Getting this error 'clean up your database' after upgrade to foreman 2.5/katello 4.1

It ran to completion, this is the output…

[root@puppet virtualbox]# foreman-rake katello:correct_repositories --trace
`/usr/share/foreman` is not writable.
Bundler will use `/tmp/bundler20210615-58459-9ugv9c58459' as your home directory temporarily.
** Invoke katello:correct_repositories (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke katello:check_ping (first_time)
** Invoke environment
** Invoke dynflow:client (first_time)
** Invoke environment
** Execute dynflow:client
** Execute katello:check_ping
** Execute katello:correct_repositories
All operations will be skipped.  Re-run with COMMIT=true to perform corrections.
Processing Repository 1/172: centos6-os-i386 (16)
Processing Repository 2/172: duo_el6_i386 (17)
Processing Repository 3/172: puppet6-el6-i386 (18)
Processing Repository 4/172: centos6-updates-i386 (19)
Processing Repository 5/172: centos7-sclo-rh (21)
Processing Repository 6/172: centos7-sclo (23)
Processing Repository 7/172: centos7-cr (25)
Processing Repository 8/172: duo_el7 (26)
Processing Repository 9/172: centos7-extras (28)
Processing Repository 10/172: katello-el7 (29)
Processing Repository 11/172: centos7-os (30)
Processing Repository 12/172: pulp-el7 (31)
Processing Repository 13/172: puppet-el7 (32)
Processing Repository 14/172: centos7-updates (33)
Processing Repository 15/172: forensics-el7 (34)
Processing Repository 16/172: ntop-el7 (35)
Processing Repository 17/172: xymon-el7 (46)
Processing Repository 18/172: epel-el7 (49)
Processing Repository 19/172: epel-el6 (50)
Processing Repository 20/172: duo-el6-centos6 (51)
Processing Repository 21/172: puppet6-el6 (52)
Processing Repository 22/172: centos6-updates (53)
Processing Repository 23/172: centos6-os (54)
Processing Repository 24/172: subscription-manager-el6 (55)
Processing Repository 25/172: subscription-manager-el6-i386 (56)
Processing Repository 26/172: rhel7-sat-maintenance (72)
Processing Repository 27/172: rhel7-sat-tools-6_8 (74)
Processing Repository 28/172: epel-el6-i386 (88)
Processing Repository 29/172: centos6-os-i386 (101)
Processing Repository 30/172: centos6-updates-i386 (102)
Processing Repository 31/172: duo_el6_i386 (103)
Processing Repository 32/172: puppet6-el6-i386 (104)
Processing Repository 33/172: subscription-manager-el6-i386 (105)
Processing Repository 34/172: epel-el6-i386 (106)
Processing Repository 35/172: centos6-os-i386 (107)
Processing Repository 36/172: centos6-updates-i386 (108)
Processing Repository 37/172: duo_el6_i386 (109)
Processing Repository 38/172: puppet6-el6-i386 (110)
Processing Repository 39/172: subscription-manager-el6-i386 (111)
Processing Repository 40/172: epel-el6-i386 (112)
Processing Repository 41/172: duo_el7 (113)
Processing Repository 42/172: centos7-cr (114)
Processing Repository 43/172: centos7-extras (115)
Processing Repository 44/172: centos7-os (116)
Processing Repository 45/172: katello-el7 (117)
Processing Repository 46/172: puppet-el7 (118)
Processing Repository 47/172: centos7-updates (119)
Processing Repository 48/172: forensics-el7 (120)
Processing Repository 49/172: epel-el7 (121)
Processing Repository 50/172: pulp-el7 (122)
Processing Repository 51/172: duo_el7 (123)
Processing Repository 52/172: centos7-cr (124)
Processing Repository 53/172: centos7-extras (125)
Processing Repository 54/172: centos7-os (126)
Processing Repository 55/172: katello-el7 (127)
Processing Repository 56/172: puppet-el7 (128)
Processing Repository 57/172: centos7-updates (129)
Processing Repository 58/172: forensics-el7 (130)
Processing Repository 59/172: epel-el7 (131)
Processing Repository 60/172: pulp-el7 (132)
Processing Repository 61/172: splunkforwarder-8_1_1 (133)
Processing Repository 62/172: splunkforwarder-8_1_2 (134)
Processing Repository 63/172: splunkforwarder-8_1_3 (135)
Processing Repository 64/172: centos7-sclo (180)
Processing Repository 65/172: centos7-extras (182)
Processing Repository 66/172: centos7-os (183)
Processing Repository 67/172: splunkforwarder-8_1_3 (190)
Processing Repository 68/172: splunkforwarder-8_1_2 (191)
Processing Repository 69/172: subscription-manager-el6 (192)
Processing Repository 70/172: puppet6-el6 (193)
Processing Repository 71/172: epel-el6 (194)
Processing Repository 72/172: duo-el6-centos6 (195)
Processing Repository 73/172: splunkforwarder-8_1_3 (196)
Processing Repository 74/172: splunkforwarder-8_1_1 (197)
Processing Repository 75/172: splunkforwarder-8_1_2 (198)
Processing Repository 76/172: subscription-manager-el6 (199)
Processing Repository 77/172: puppet6-el6 (200)
Processing Repository 78/172: epel-el6 (201)
Processing Repository 79/172: duo-el6-centos6 (202)
Processing Repository 80/172: splunkforwarder-8_1_3 (203)
Processing Repository 81/172: splunkforwarder-8_1_1 (204)
Processing Repository 82/172: splunkforwarder-8_1_2 (205)
Processing Repository 83/172: duo_el6_i386 (206)
Processing Repository 84/172: puppet6-el6-i386 (207)
Processing Repository 85/172: subscription-manager-el6-i386 (208)
Processing Repository 86/172: splunkforwarder-8_1_3 (209)
Processing Repository 87/172: splunkforwarder-8_1_1 (210)
Processing Repository 88/172: epel-el6-i386 (211)
Processing Repository 89/172: splunkforwarder-8_1_2 (212)
Processing Repository 90/172: duo_el6_i386 (213)
Processing Repository 91/172: puppet6-el6-i386 (214)
Processing Repository 92/172: subscription-manager-el6-i386 (215)
Processing Repository 93/172: splunkforwarder-8_1_3 (216)
Processing Repository 94/172: splunkforwarder-8_1_1 (217)
Processing Repository 95/172: epel-el6-i386 (218)
Processing Repository 96/172: splunkforwarder-8_1_2 (219)
Processing Repository 97/172: centos7-sclo (269)
Processing Repository 98/172: centos7-extras (271)
Processing Repository 99/172: centos7-os (272)
Processing Repository 100/172: splunkforwarder-8_1_3 (278)
Processing Repository 101/172: splunkforwarder-8_1_2 (279)
Processing Repository 102/172: subscription-manager-el6 (294)
Processing Repository 103/172: puppet6-el6 (295)
Processing Repository 104/172: epel-el6 (296)
Processing Repository 105/172: duo-el6-centos6 (297)
Processing Repository 106/172: splunkforwarder-8_1_3 (298)
Processing Repository 107/172: splunkforwarder-8_1_1 (299)
Processing Repository 108/172: splunkforwarder-8_1_2 (300)
Processing Repository 109/172: duo_el7 (321)
Processing Repository 110/172: centos7-cr (322)
Processing Repository 111/172: centos7-extras (323)
Processing Repository 112/172: centos7-os (324)
Processing Repository 113/172: katello-el7 (325)
Processing Repository 114/172: puppet-el7 (326)
Processing Repository 115/172: centos7-updates (327)
Processing Repository 116/172: forensics-el7 (328)
Processing Repository 117/172: epel-el7 (329)
Processing Repository 118/172: pulp-el7 (330)
Processing Repository 119/172: postgresql-el7-server (331)
Processing Repository 120/172: centos7-sclo (353)
Processing Repository 121/172: centos7-extras (354)
Processing Repository 122/172: centos7-os (355)
Processing Repository 123/172: splunkforwarder-8_1_2 (356)
Processing Repository 124/172: splunkforwarder-8_1_3 (357)
Processing Repository 125/172: centos7-sclo (358)
Processing Repository 126/172: centos7-os (359)
Processing Repository 127/172: centos7-extras (360)
Processing Repository 128/172: splunkforwarder-8_1_2 (361)
Processing Repository 129/172: splunkforwarder-8_1_3 (362)
Processing Repository 130/172: mysql-57-el7 (365)
Processing Repository 131/172: Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server (366)
Processing Repository 132/172: Red Hat Enterprise Linux 6 Server RPMs i386 6Server (367)
Processing Repository 133/172: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 (368)
Processing Repository 134/172: Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7Server (369)
Processing Repository 135/172: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server (370)
Processing Repository 136/172: Red Hat Satellite Tools 6.9 for RHEL 7 Server RPMs x86_64 (372)
Processing Repository 137/172: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (373)
Processing Repository 138/172: Red Hat Ansible Engine 2.9 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (374)
Processing Repository 139/172: dotNET on RHEL RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server (375)
Processing Repository 140/172: Red Hat Ansible Engine 2.8 RPMs for Red Hat Enterprise Linux 7 Server x86_64 (376)
Processing Repository 141/172: Red Hat Enterprise Linux 7 Server - Optional Fastrack RPMs x86_64 (377)
Processing Repository 142/172: Red Hat Enterprise Linux 7 Server - Fastrack RPMs x86_64 (378)
Processing Repository 143/172: Red Hat Enterprise Linux 7 Server - Oracle Java RPMs x86_64 7Server (379)
Processing Repository 144/172: Red Hat Enterprise Linux 7 Server - Oracle Java RPMs x86_64 7.7 (381)
Processing Repository 145/172: Red Hat Satellite Maintenance 6 for RHEL 7 Server RPMs x86_64 (382)
Processing Repository 146/172: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7.7 (383)
Processing Repository 147/172: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7.9 (384)
Processing Repository 148/172: Red Hat Insights 3 for RHEL 7 Server RPMs x86_64 (385)
Processing Repository 149/172: Red Hat Enterprise Linux 6 Server RPMs x86_64 6.10 (386)
Processing Repository 150/172: Red Hat Enterprise Linux 6 Server - Supplementary RPMs x86_64 6Server (387)
Processing Repository 151/172: duo-rhel7-server (392)
Processing Repository 152/172: duo-el7-server (393)
Processing Repository 153/172: duo-el6-i386 (395)
Processing Repository 154/172: duo-rhel6 (396)
Processing Repository 155/172: duo-rhel6-i386 (397)
Processing Repository 156/172: puppet6-el7 (404)
Processing Repository 157/172: puppet6-el6 (405)
Processing Repository 158/172: puppet6-el6-i386 (406)
Processing Repository 159/172: duo-el6-server (415)
Processing Repository 160/172: centos6-os (416)
Processing Repository 161/172: centos6-updates (417)
Processing Repository 162/172: epel-el6 (418)
Processing Repository 163/172: puppet6-el6 (419)
Processing Repository 164/172: subscription-manager-el6 (420)
Processing Repository 165/172: duo-el6-server (421)
Processing Repository 166/172: centos6-os (422)
Processing Repository 167/172: centos6-updates (423)
Processing Repository 168/172: epel-el6 (424)
Processing Repository 169/172: puppet6-el6 (425)
Processing Repository 170/172: subscription-manager-el6 (426)
Processing Repository 171/172: duo-el6-server (427)
Processing Repository 172/172: virtualbox-el7 (483)

If you create a new repo without adding anything to it, add that to a new CV, does that publish ok or still fail with the same error?

I cannot create a new repo - I get this error when I click Save…

NoMethodError: undefined method `id' for nil:NilClass

@mrstrembly

Can you do this for me:

foreman-tail > debug

Then in the UI try to create a repo and then ctrl+c the terminal output and upload that here?

Also if you goto tasks, click on the failed repo create task, click dynflow console, find the task step that was red and click on that to expand it, if you can provide a screenshot of that output it would help.

Attached is the debug log you requested. Interestingly, my first attempt failed because I used the same repo name as my prior failed attempt (test-repo).

So…it give me an error that says 'NoMethodError: undefined method id' for nil:NilClass but it does create the repo.

I created a new repo named test-repo-2 for this debug log request.

debug-repocreate.log (394.1 KB)

To clarify my previous comment. Yesterday I tried to create an empty new repo named test-repo. I thought it completely failed because it gave me the nilNilClass message. Apparently it did not fail, it actually created the empty repo which I did not notice because I moved on to work something else unrelated.

So, it allowed me to create 2 new empty repos but both times I received this error message: 'NoMethodError: undefined method id'

With the empty repo from yesterday named test-repo Are you able to create a test content view adding the test-repo to it and try to publish and see if that works correctly?

  • Created new Content View named ‘Test Content View’ successfully.
  • Added empty yum repo and empty file repo to ‘Test Content View’ successfully.
  • When I do ‘Publish New Version > Save’ I get ‘undefined method `id’ for nil:NilClass’

I am attaching the output of ‘foreman-tail > debug-publishview.log’ captured while I clicked the save button for this test. I did not have any errors at any stage of the process until I clicked save.debug-publishview.log (553.1 KB)

Just to put closure on this topic…I gave up and rebuilt the foreman+katello server. I could not find a way to fix the corrupt entries.