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: Capsule
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
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:


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.