Problem with Products when not Default Organisation is Activated

Problem:
Problem with Products when not Default Organisation is Activated
Expected outcome:
In my Organisation:
undefined method id' for nil:NilClassundefined method id’ for nil:NilClassundefined method id' for nil:NilClassundefined method id’ for nil:NilClass

4: Actions::Pulp3::Repository::RefreshRemote (pending)
6: Actions::Pulp3::Repository::Sync (pending)
9: Actions::Pulp3::Repository::SaveVersion (pending)
12: Actions::Pulp3::Repository::CreatePublication (pending)
14: Actions::Pulp3::Repository::SavePublication (pending)
Foreman and Proxy versions:

in the Default Organisation no problems
candlepin-4.1.5-1.el8.noarch
candlepin-selinux-4.1.5-1.el8.noarch
foreman-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-cli-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-debug-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-dynflow-sidekiq-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-installer-3.1.0-0.1.develop.20210817031202gitdcd015c.el8.noarch
foreman-installer-katello-3.1.0-0.1.develop.20210817031202gitdcd015c.el8.noarch
foreman-libvirt-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-postgresql-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
foreman-proxy-3.1.0-0.1.develop.20210810121744gitd9b0502.el8.noarch
foreman-release-3.1.0-0.1.develop.el8.noarch
foreman-service-3.1.0-0.1.develop.20210817200201gitc7535e4.el8.noarch
katello-4.3.0-0.1.master.el8.noarch
katello-certs-tools-2.8.0-1.el8.noarch
katello-client-bootstrap-1.7.6-1.el8.noarch
katello-common-4.3.0-0.1.master.el8.noarch
katello-debug-4.3.0-0.1.master.el8.noarch
katello-default-ca-1.0-1.noarch
katello-repos-4.3-0.1.nightly.el8.noarch
katello-server-ca-1.0-1.noarch
lxforeman01.itas.srv-apache-1.0-1.noarch
lxforeman01.itas.srv-foreman-client-1.0-1.noarch
lxforeman01.itas.srv-foreman-proxy-1.0-1.noarch
lxforeman01.itas.srv-foreman-proxy-client-1.0-1.noarch
lxforeman01.itas.srv-puppet-client-1.0-1.noarch
pulp-client-1.0-1.noarch
python3-pulp-ansible-0.7.3-1.el8.noarch
python3-pulp-certguard-1.2.0-1.el8.noarch
python3-pulp-container-2.5.3-1.el8.noarch
python3-pulp-deb-2.11.2-1.el8.noarch
python3-pulp-file-1.6.0-1.el8.noarch
python3-pulp-rpm-3.11.0-1.el8.noarch
python3-pulpcore-3.11.2-1.el8.noarch
python3-qpid-proton-0.35.0-1.el8.x86_64
qpid-dispatch-router-1.16.1-1.el8.x86_64
qpid-proton-c-0.35.0-1.el8.x86_64
rubygem-foreman-tasks-5.0.0-1.fm2_6.el8.noarch
rubygem-foreman-tasks-core-0.3.5-1.fm2_5.el8.noarch
rubygem-foreman_fog_proxmox-0.14.0-1.fm3_0.el8.noarch
rubygem-foreman_maintain-0.8.10-1.el8.noarch
rubygem-foreman_remote_execution-4.7.0-1.fm3_0.el8.noarch
rubygem-foreman_remote_execution_core-1.5.0-1.el8.noarch
rubygem-foreman_salt-13.2.4-2.fm2_5.el8.noarch
rubygem-hammer_cli-3.1.0-0.1.pre.develop.20210817083812git2085565.el8.noarch
rubygem-hammer_cli_foreman-3.1.0-0.1.pre.develop.20210811133156gitca273c9.el8.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el8.noarch
rubygem-hammer_cli_katello-1.1.1-0.1.pre.master.20210804141838gitece0b63.el8.noarch
rubygem-katello-4.3.0-0.1.pre.master.20210811211734gitbb6a842.el8.noarch
rubygem-pulp_ansible_client-0.8.0-1.el8.noarch
rubygem-pulp_certguard_client-1.4.0-1.el8.noarch
rubygem-pulp_container_client-2.7.0-1.el8.noarch
rubygem-pulp_deb_client-2.13.0-1.el8.noarch
rubygem-pulp_file_client-1.8.1-1.el8.noarch
rubygem-pulp_python_client-3.4.0-1.el8.noarch
rubygem-pulp_rpm_client-3.13.3-1.el8.noarch
rubygem-pulpcore_client-3.14.1-1.el8.noarch
rubygem-qpid_proton-0.32.0-3.el8.x86_64
rubygem-smart_proxy_pulp-3.1.0-1.fm2_6.el8.noarch

Distribution and version:
CentOS 8 Stream

1 Like

when i create a new deb repo i become the error

Task cad4f530-4ec1-412e-92ad-4c2f1afc6bb5: NoMethodError: undefined method `id’ for nil:NilClass

Are you sure you want to use the nightly version. That‘s a development version, not an official release.

I have a second systen with the last stable version with the same error

1 Like

Good point, thanks for sharing. I had the same even on Katello 3.18 and 4.2 today. Looks like a bug in the UI to me as creating it from the CLI using hammer worked like a charm.

Packages on the Katello 3.18 system:

# rpm -qa|egrep -i 'foreman|katello'
tfm-rubygem-foreman_snapshot_management-2.0.1-1.fm2_3.el7.noarch
foreman-installer-2.3.5-1.el7.noarch
ansiblerole-foreman_scap_client-0.1.0-1.el7.noarch
pulp-katello-1.0.3-1.el7.noarch
0-katello.dummy.de-apache-1.0-1.noarch
tfm-rubygem-foreman-tasks-3.0.6-1.fm2_3.el7.noarch
foreman-cli-2.3.5-1.el7.noarch
tfm-rubygem-foreman_ansible_core-4.0.0-1.fm2_3.el7.noarch
tfm-rubygem-katello-3.18.4-1.el7.noarch
katello-repos-3.18.4-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.7-1.el7.noarch
foreman-dynflow-sidekiq-2.3.5-1.el7.noarch
katello-server-ca-1.0-1.noarch
0-katello.dummy.de-qpid-router-server-1.0-1.noarch
foreman-debug-2.3.5-1.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.4-1.fm2_1.el7.noarch
tfm-rubygem-hammer_cli_foreman-2.3.2-1.el7.noarch
tfm-rubygem-hammer_cli_katello-0.24.4-1.el7.noarch
rubygem-foreman_maintain-0.7.10-1.el7.noarch
katello-certs-tools-2.7.3-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.12-1.fm2_3.el7.noarch
foreman-libvirt-2.3.5-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-doc-0.2.1-1.fm2_3.el7.noarch
katello-debug-3.18.4-1.el7.noarch
katello-client-bootstrap-1.7.5-1.el7.noarch
0-katello.dummy.de-qpid-client-cert-1.0-1.noarch
0-katello.dummy.de-qpid-router-client-1.0-1.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.15-1.fm2_2.el7.noarch
tfm-rubygem-foreman_remote_execution-4.2.2-1.fm2_3.el7.noarch
tfm-rubygem-foreman_openscap-4.1.3-1.fm2_3.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.1-1.fm2_3.el7.noarch
foreman-installer-katello-2.3.5-1.el7.noarch
foreman-vmware-2.3.5-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_ansible-doc-0.3.2-1.fm2_1.el7.noarch
katello-common-3.18.4-1.el7.noarch
foreman-selinux-2.3.5-1.el7.noarch
foreman-service-2.3.5-1.el7.noarch
0-katello.dummy.de-qpid-broker-1.0-1.noarch
0-katello.dummy.de-foreman-proxy-1.0-1.noarch
0-katello.dummy.de-puppet-client-1.0-1.noarch
foreman-postgresql-2.3.5-1.el7.noarch
katello-3.18.4-1.el7.noarch
katello-selinux-3.5.0.1-1.el7.noarch
foreman-release-2.3.5-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-1.el7.noarch
foreman-proxy-2.3.5-1.el7.noarch
katello-default-ca-1.0-1.noarch
0-katello.dummy.de-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-foreman_ansible-6.1.1-1.fm2_3.el7.noarch
tfm-rubygem-foreman_bootdisk-17.0.2-2.fm2_2.el7.noarch
tfm-rubygem-hammer_cli_foreman_ansible-0.3.2-1.fm2_1.el7.noarch
tfm-rubygem-hammer_cli_foreman_openscap-doc-0.1.12-1.fm2_3.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.4.0-1.el7.noarch
0-katello.dummy.de-foreman-client-1.0-1.noarch
foreman-2.3.5-1.el7.noarch

Packages on the Katello 4.2 system:

# rpm -qa|egrep -i 'foreman|katello'
3-katello.dummy.de-apache-1.0-1.noarch
foreman-service-3.0.0-0.1.rc2.el7.noarch
katello-client-bootstrap-1.7.6-1.el7.noarch
katello-server-ca-1.0-1.noarch
tfm-rubygem-foreman_puppet-1.0.0.rc.2-1.fm3_0.el7.noarch
foreman-debug-3.0.0-0.1.rc2.el7.noarch
foreman-installer-katello-3.0.0-0.1.rc2.el7.noarch
katello-selinux-4.0.2-1.el7.noarch
foreman-release-3.0.0-0.1.rc2.el7.noarch
katello-certs-tools-2.8.0-1.el7.noarch
foreman-selinux-3.0.0-0.1.rc2.el7.noarch
foreman-postgresql-3.0.0-0.1.rc2.el7.noarch
foreman-proxy-3.0.0-0.1.rc2.el7.noarch
3-katello.dummy.de-foreman-client-1.0-1.noarch
3-katello.dummy.de-foreman-proxy-1.0-1.noarch
tfm-rubygem-foreman-tasks-5.0.0-1.fm2_6.el7.noarch
tfm-rubygem-hammer_cli_katello-1.1.2-1.el7.noarch
katello-repos-4.2.0.rc1-1.el7.noarch
foreman-3.0.0-0.1.rc2.el7.noarch
3-katello.dummy.de-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-hammer_cli_foreman-3.0.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_puppet-0.0.3-1.fm3_0.el7.noarch
tfm-rubygem-katello-4.2.0.rc1-1.el7.noarch
rubygem-foreman_maintain-0.8.10-1.el7.noarch
foreman-dynflow-sidekiq-3.0.0-0.1.rc2.el7.noarch
katello-debug-4.2.0.rc1-1.el7.noarch
katello-default-ca-1.0-1.noarch
3-katello.dummy.de-puppet-client-1.0-1.noarch
foreman-cli-3.0.0-0.1.rc2.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el7.noarch
katello-4.2.0.rc1-1.el7.noarch
foreman-installer-3.0.0-0.1.rc2.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el7.noarch
tfm-rubygem-foreman_remote_execution-4.7.0-1.fm3_0.el7.noarch
katello-common-4.2.0.rc1-1.el7.noarch

Any ideas?

Thanks in advance!

Can you provide the error/stack trace from /var/log/foreman/production.log when you hit this error.

Were you trying to create a Product when you hit this error?

2 Likes

Hi @Partha_Aji,

thanks for the fast reply!

Yes I was trying to create a product when I hit this error - attached to this post you will find the production.log from both Katello 3.18 and 4.2 when doing this. Once organization and location have been change to the default ones, it works.

production_katello42.log (393.7 KB)production_katello318.log (356.8 KB)

Looks like we have an issue on this already Bug #33286: '"NoMethodError: undefined method `id\' for nil:NilClass" error while creating a repository.' - Katello - Foreman triaged to 4.3.

1 Like

Hi @Partha_Aji,

good to know - thanks a lot for sharing! :slight_smile:

Is there any chance that this will also fixed in Katello 3.8 or 4.2? IIRC there is no release date 4.3, yet - isn’t there?

Best wishes!

Actually it looks like its targeted for 4.2 right now (not 4.3 as I mentioned above.)

1 Like