Bug 1076564

Summary: [Text] print the wrong inputs enclosed by single quotes
Product: [Retired] oVirt Reporter: Jiri Moskovcak <jmoskovc>
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: low Docs Contact:
Priority: medium    
Version: 3.4CC: acathrow, dfediuck, gklein, iheim, sbonazzo, yeylon
Target Milestone: ---Keywords: EasyFix
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-13 07:19:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1123213    

Description Jiri Moskovcak 2014-03-14 14:39:28 UTC
Description of problem:
When I was setting up the hosted engine I made a cut'n'paste error while copying the VM's MAC address - I added a space to it. The script printed out a warning:

Invalid mac address specified:  00:16:3e:72:20:7f

but it wasn't obvious what's wrong, if it was surrounded by single quotes it would be visible on first sight.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.1.1-1.fc19.noarch

How reproducible:
100%

Steps to Reproduce:
1. input a mac address with trailing or starting space
2.
3.

Actual results:
Invalid mac address specified:  00:16:3e:72:20:7f

Expected results:
Invalid mac address specified: ' 00:16:3e:72:20:7f'

Comment 1 Simone Tiraboschi 2014-05-06 09:16:14 UTC
Cannot we also simply trim that input just to avoid it?

Comment 2 Sandro Bonazzola 2014-05-06 10:03:22 UTC
(In reply to Simone Tiraboschi from comment #1)
> Cannot we also simply trim that input just to avoid it?

Yes, I think so.

Comment 3 Jiri Moskovcak 2014-05-06 11:11:53 UTC
(In reply to Sandro Bonazzola from comment #2)
> (In reply to Simone Tiraboschi from comment #1)
> > Cannot we also simply trim that input just to avoid it?
> 
> Yes, I think so.

It's a good practice to enclose the variable value when printing it. Even though trimming would solve this specific issue enclosing the value in quotes might still be helpful.

Comment 4 Gil Klein 2014-08-13 07:19:08 UTC
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA