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.
Bug 1395110 - Can't modify frozen hash error when trying to delete smart proxy via API/CLI
Summary: Can't modify frozen hash error when trying to delete smart proxy via API/CLI
Keywords:
Status: CLOSED DUPLICATE of bug 1398695
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 08:03 UTC by Stanislav Tkachenko
Modified: 2017-01-18 14:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-08 13:23:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stanislav Tkachenko 2016-11-15 08:03:57 UTC
Description of problem:
"Can't modify frozen hash" error is raised when trying to delete smart proxy via API or hammer, though proxy itself is deleted.
Works correctly via UI.

Example:
# Create using hammer
> # hammer -v -u admin -p changeme --output=csv proxy create --url="https://sat6.com:12370" --name="test"
> Message,Id,Name
> Smart proxy created,7,test

# Read info
> # hammer -v -u admin -p changeme proxy info --name="test"
> Id:            7
> Name:          test
> URL:           https://sat6.com:12370

# Try to delete via hammer
> # hammer -v -u admin -p changeme proxy delete --name="test"      
> [ERROR 2016-11-15 02:48:39 API] 500 Internal Server Error
> [ERROR 2016-11-15 02:48:39 Exception] Can't modify frozen hash
> Could not delete the proxy:
>  Can't modify frozen hash
> [ERROR 2016-11-15 02:48:39 Exception] 
> RestClient::InternalServerError (500 Internal Server Error):

# Read info one more time
> # hammer -v -u admin -p changeme proxy info --name="test"  
> [ERROR 2016-11-15 02:49:45 Exception] Error: smart_proxy not found
> Error: smart_proxy not found
> [ERROR 2016-11-15 02:49:45 Exception] 
> HammerCLIForeman::ResolverError (smart_proxy not found):

# Try to delete another proxy via API
> Making HTTP DELETE request to https://sat6.com/api/v2/smart_proxies/8 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and no data.
> Received HTTP 500 response: {
>  "error": {"message":"Can't modify frozen hash"}


Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 6.0, Foreman 1.13.1-1

How reproducible:
Always

Steps to Reproduce:
1. ncat -kl -p 12370 -c "ncat sat6.com 9090"
2. hammer -v -u admin -p changeme --output=csv proxy create --url="https://sat6.com:12370" --name="test"
3. hammer -v -u admin -p changeme proxy info --name="test"
4. hammer -v -u admin -p changeme proxy delete --name="test"
5. hammer -v -u admin -p changeme proxy info --name="test"

Actual results:
Error and stacktrace are displayed.

Expected results:
Proxy should be deleted without errors.

Additional info:

Comment 3 Roman Plevka 2016-12-08 13:23:22 UTC
Closing this in favor of https://bugzilla.redhat.com/show_bug.cgi?id=1398695 (despite the fact that this one is older, the newer one contains more info + has the correct flags set)

*** This bug has been marked as a duplicate of bug 1398695 ***


Note You need to log in before you can comment on or make changes to this bug.