Project

General

Profile

Bug #18186

`hammer capsule update` with invalid url shows improper error message

Added by John Mitsch over 2 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman Proxy Content
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1412807

Description of problem:
The error message shows the capsule could not be updated, but the capsule is actually updated. This happens when the proxy features are not available (i.e. https://proxy.example.com:8000/features).

Version-Release number of selected component (if applicable):
6.2

How reproducible:
Always

Steps to Reproduce:
1. `hammer capsule update --id 1 --new-name "centos7-devel.example.com" --url "http://centos7-devel.example.com:8001"` # setting to port 8001 instead of 8000 as an example of an invalid URL

Actual results:
Could not update the proxy

Expected results:
Updated with errors getting proxy features

Additional info:

History

#1 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) set to 114

#2 Updated by Evgeni Golov almost 2 years ago

I must admit I don't think this is a bug.

You are changing the URL of a proxy, and it tries to verify the connection to it. As you just set a "wrong" port (or hostname, in the rename case), it rightfully fails. Actually, it also should revert the change in that case.

I think what you'd need here is a --force or --no-verify switch, that instructs hammer not to try to talk to the new URI, and just assume the user knows what they are doing.

Also available in: Atom PDF