Red Hat Bugzilla – 1510665 – ERROR: insert or update on table "katello_subscription_facet_pools" violates foreign key constraint "katello_sub_facet_pools_sf_id_fk"
Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Noticed following error when registering or deleting 100 containers (acting as normal systems) concurrently. All registrations seems to be OK, I have not found any failed task.
Version-Release number of selected component (if applicable):
satellite-6.3.0-21.0.beta.el7sat.noarch (snap 24.0)
How reproducible:
Seen two of these messages twice in 3 attempts to register/delete 100 hosts concurrently
Steps to Reproduce:
1. Attempt to register 100 containers (acting as hosts) concurrently
2. Attempt to delete all these 100 profiles in one shot (content hosts -> select all -> remove hosts)
Actual results:
2017-11-07 17:55:06 EST ERROR: insert or update on table "katello_subscription_facet_pools" violates foreign key constraint "katello_sub_facet_pools_sf_id_fk"
2017-11-07 17:55:06 EST DETAIL: Key (subscription_facet_id)=(98) is not present in table "katello_subscription_facets".
2017-11-07 17:55:06 EST STATEMENT: INSERT INTO "katello_subscription_facet_pools" ("pool_id", "subscription_facet_id") VALUES ($1, $2) RETURNING "id"
2017-11-07 17:55:29 EST ERROR: insert or update on table "katello_subscription_facet_pools" violates foreign key constraint "katello_sub_facet_pools_sf_id_fk"
2017-11-07 17:55:29 EST DETAIL: Key (subscription_facet_id)=(99) is not present in table "katello_subscription_facets".
2017-11-07 17:55:29 EST STATEMENT: INSERT INTO "katello_subscription_facet_pools" ("pool_id", "subscription_facet_id") VALUES ($1, $2) RETURNING "id"
Expected results:
There should be no error in the PostgreSQL log
Additional info:
Satellite was VM with 8GB RAM, 4 CPUs. Containers used were running on same host as the guest. Host had 32GB RAM.
Did the registration with this ansible playbook:
- hosts: all
remote_user: root
gather_facts: no
serial: 20
tasks:
- name: "Make sure /etc/hosts is OK"
shell: |
grep sat630.example.com /etc/hosts || echo "192.168.122.88 sat630.example.com" >> /etc/hosts
- name: "Rename /etc/rhsm-host and /etc/pki/entitlement-host"
shell: |
if [ -d /etc/rhsm-host ]; then mv /etc/rhsm-host{,.ORIG}; else true; fi
if [ -d /etc/pki/entitlement-host ]; then mv /etc/pki/entitlement-host{,.ORIG}; else true; fi
- name: "Cleanup"
shell: |
subscription-manager unregister
subscription-manager clean
yum --disablerepo='*' -y remove 'katello-ca-consumer-*'
###ignore_error: true
- name: Increase the RHSM timeout
lineinfile:
dest: /usr/lib64/python2.7/site-packages/rhsm/config.py
regexp: "^DEFAULT_SERVER_TIMEOUT"
line: 'DEFAULT_SERVER_TIMEOUT = "380"'
state: present
- name: "Install certs"
command: "rpm -ivh http://sat630.example.com/pub/katello-ca-consumer-latest.noarch.rpm"
- hosts: all
remote_user: root
gather_facts: no
tasks:
- name: "Register"
command: "subscription-manager register --org='Default_Organization' --activationkey 'ActivationKey'"
(In reply to jcallaha from comment #4)
> Jan, Is this something new to 6.3 or can you also reproduce it in 6.2?
Hello. Sorry, I do not have similar 6.2 setup and I do not plan to create one, so I can not answer this :-/
This does appear to be a duplicate of bug 1563002; therefore, closing. If there is any concern, please feel free to re-open. Thanks!
*** This bug has been marked as a duplicate of bug 1563002 ***
Description of problem: Noticed following error when registering or deleting 100 containers (acting as normal systems) concurrently. All registrations seems to be OK, I have not found any failed task. Version-Release number of selected component (if applicable): satellite-6.3.0-21.0.beta.el7sat.noarch (snap 24.0) How reproducible: Seen two of these messages twice in 3 attempts to register/delete 100 hosts concurrently Steps to Reproduce: 1. Attempt to register 100 containers (acting as hosts) concurrently 2. Attempt to delete all these 100 profiles in one shot (content hosts -> select all -> remove hosts) Actual results: 2017-11-07 17:55:06 EST ERROR: insert or update on table "katello_subscription_facet_pools" violates foreign key constraint "katello_sub_facet_pools_sf_id_fk" 2017-11-07 17:55:06 EST DETAIL: Key (subscription_facet_id)=(98) is not present in table "katello_subscription_facets". 2017-11-07 17:55:06 EST STATEMENT: INSERT INTO "katello_subscription_facet_pools" ("pool_id", "subscription_facet_id") VALUES ($1, $2) RETURNING "id" 2017-11-07 17:55:29 EST ERROR: insert or update on table "katello_subscription_facet_pools" violates foreign key constraint "katello_sub_facet_pools_sf_id_fk" 2017-11-07 17:55:29 EST DETAIL: Key (subscription_facet_id)=(99) is not present in table "katello_subscription_facets". 2017-11-07 17:55:29 EST STATEMENT: INSERT INTO "katello_subscription_facet_pools" ("pool_id", "subscription_facet_id") VALUES ($1, $2) RETURNING "id" Expected results: There should be no error in the PostgreSQL log Additional info: Satellite was VM with 8GB RAM, 4 CPUs. Containers used were running on same host as the guest. Host had 32GB RAM. Did the registration with this ansible playbook: - hosts: all remote_user: root gather_facts: no serial: 20 tasks: - name: "Make sure /etc/hosts is OK" shell: | grep sat630.example.com /etc/hosts || echo "192.168.122.88 sat630.example.com" >> /etc/hosts - name: "Rename /etc/rhsm-host and /etc/pki/entitlement-host" shell: | if [ -d /etc/rhsm-host ]; then mv /etc/rhsm-host{,.ORIG}; else true; fi if [ -d /etc/pki/entitlement-host ]; then mv /etc/pki/entitlement-host{,.ORIG}; else true; fi - name: "Cleanup" shell: | subscription-manager unregister subscription-manager clean yum --disablerepo='*' -y remove 'katello-ca-consumer-*' ###ignore_error: true - name: Increase the RHSM timeout lineinfile: dest: /usr/lib64/python2.7/site-packages/rhsm/config.py regexp: "^DEFAULT_SERVER_TIMEOUT" line: 'DEFAULT_SERVER_TIMEOUT = "380"' state: present - name: "Install certs" command: "rpm -ivh http://sat630.example.com/pub/katello-ca-consumer-latest.noarch.rpm" - hosts: all remote_user: root gather_facts: no tasks: - name: "Register" command: "subscription-manager register --org='Default_Organization' --activationkey 'ActivationKey'"