Bug 1076564 - [Text] print the wrong inputs enclosed by single quotes
Summary: [Text] print the wrong inputs enclosed by single quotes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-hosted-engine-setup
Version: 3.4
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.5.0
Assignee: Simone Tiraboschi
QA Contact: meital avital
URL:
Whiteboard: integration
Depends On:
Blocks: 1123213
TreeView+ depends on / blocked
 
Reported: 2014-03-14 14:39 UTC by Jiri Moskovcak
Modified: 2015-02-01 22:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-13 07:19:08 UTC
oVirt Team: ---


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 27402 master MERGED Trimming white spaces and adding single quotes Never

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


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