Description of problem: Server returning err500 - "Can't modify frozen hash" every time user deletes a capsule using cli or api. The capsule seems to be removed anyway. This is a regression in 6.3 Version-Release number of selected component (if applicable): satellite-6.3.0-6.1.beta.el7sat.noarch How reproducible: always Steps to Reproduce: 1. add a capsule (you can forward port 9090 of the stallite to some other port to simulate a different capsule): ncat -kl -p 11018 -c "ncat sat63.com 9090 &" (you might need to set a proper selinux context for the ports or simply disable it) hammer proxy create --name foo --url="https://sat63.com:11018" 2. use CLI or API to delete it: # hammer -u admin -p changeme proxy delete --id 11 Could not delete the proxy: Can't modify frozen hash or $ curl -ku admin:changeme -X DELETE "https://sat63.com/api/v2/smart_proxies/11" { "error": {"message":"Can't modify frozen hash"} } Actual results: error returned:"Can't modify frozen hash" but proxy removed Expected results: no errors Additional info:
can you please attach logs?
*** Bug 1395110 has been marked as a duplicate of this bug. ***
Created redmine issue http://projects.theforeman.org/issues/17784 from this bug
This occurs because we try to update the puppet_path attribute of a SmartProxy every time we read it, and upon deletion, the API responds with the object which has been deleted, thus calling puppet_path on the SmartProxy; however, Rails freezes the attribute hash of an object once it has been deleted, so we cannot modify this attribute.
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17784 has been resolved.
VERIFIED on sat6.3.0-17 API: Making HTTP DELETE request to https://qe-sat63-rhel7..com/api/v2/smart_proxies/3 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and no data. 2017-09-26 06:44:07 - nailgun.client - DEBUG - Received HTTP 200 response: {"id":3,"name":"XoSTYkMwM","url":"https://qe-sat63-rhel7..com:14767","created_at":"2017-09-26T10:44:07.324Z","updated_at":"2017-09-26T10:44:07.324Z","pubkey":null,"expired_logs":"0","puppet_path":null,"download_policy":"on_demand"} 2017-09-26 06:44:07 - robottelo.ssh - DEBUG - Destroyed Paramiko client 0x7f7cb0889910 2017-09-26 06:44:07 - nailgun.client - DEBUG - Making HTTP GET request to https://qe-sat63-rhel7..com/api/v2/smart_proxies/3 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and no data. 2017-09-26 06:44:07 - nailgun.client - WARNING - Received HTTP 404 response: { "error": {"message":"Resource smart_proxy not found by id '3'"} } CLI: 2017-09-26 06:49:13 - robottelo.ssh - INFO - >>> LANG=en_US.UTF-8 hammer -v -u admin -p changeme proxy delete --id="10" 2017-09-26 06:49:15 - robottelo.ssh - INFO - <<< stdout Smart proxy deleted
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > For information on the advisory, and where to find the updated files, follow the link below. > > If the solution does not work for you, open a new bug report. > > https://access.redhat.com/errata/RHSA-2018:0336