Bug 1240923 - engine-backup does not fail cleanly when parsing arguments
Summary: engine-backup does not fail cleanly when parsing arguments
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-3.6.2
: 3.6.2
Assignee: Yedidyah Bar David
QA Contact: Gonza
URL:
Whiteboard:
: 1255418 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 07:13 UTC by Yedidyah Bar David
Modified: 2016-02-18 11:16 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:16:16 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 48590 0 master MERGED packaging: engine-backup: Do not log cmdline parsing errors Never
oVirt gerrit 48591 0 master MERGED packaging: engine-backup: Fix failure notifications Never
oVirt gerrit 49364 0 ovirt-engine-3.6 MERGED packaging: engine-backup: Do not log cmdline parsing errors Never
oVirt gerrit 49365 0 ovirt-engine-3.6 MERGED packaging: engine-backup: Fix failure notifications Never

Description Yedidyah Bar David 2015-07-08 07:13:42 UTC
Description of problem:

When running:

engine-backup --file=f1 --mode=backup

it should fail, saying:
--log is missing

When running:

engine-backup --file=f1 --mode=backup --log=l1 --db-user=u1

it should fail, saying:
Please use --change-db-credentials to change engine db credentials

In both of them it enters instead an endless loop (while trying to notify the engine).

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

Current master

How reproducible:

Always

Steps to Reproduce:
1. See above
2.
3.

Actual results:

Endless loop

Expected results:

output message and exit

Additional info:

Comment 1 Yedidyah Bar David 2015-07-08 07:15:20 UTC
Reported by Roman Mohr, who also suggested to change USAGE to something like:
    /usr/bin/engine-backup --mode=restore [--scope=SCOPE]
    /usr/bin/engine-backup --mode=backup [--scope=SCOPE] --file=FILE --log=FILE

Comment 2 Sandro Bonazzola 2015-10-01 07:19:50 UTC
Since there's a command line change involved, moved to 4.0

Comment 3 Roman Mohr 2015-10-01 08:06:37 UTC
(In reply to Sandro Bonazzola from comment #2)
> Since there's a command line change involved, moved to 4.0

Is there really a command line change? When I ran into these problems my impression was that only the check for the required arguments failed. They are required anyway.

Comment 4 Yedidyah Bar David 2015-10-06 09:01:06 UTC
(In reply to Roman Mohr from comment #3)
> (In reply to Sandro Bonazzola from comment #2)
> > Since there's a command line change involved, moved to 4.0

Roman suggested a change in the usage text, not to the parsing. Not really related to this bug.

> 
> Is there really a command line change? When I ran into these problems my
> impression was that only the check for the required arguments failed. They
> are required anyway.

Indeed. The bug is caused by the work to notify the engine about backup failure/success, but 1188143.

Not sure about the best fix, but it does not involve iiuc any change in ui etc.
I'd suggest to move to 3.6.1.

Comment 5 Gonza 2015-10-07 12:30:10 UTC
I get the same endless loop when setting [1] before running the engine-backup.

[1]
export PGPASSWORD=wrongpass
export BACKUP_ENV_CLEAN=1

Comment 6 Red Hat Bugzilla Rules Engine 2015-10-19 10:59:00 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Yedidyah Bar David 2015-11-16 06:41:53 UTC
*** Bug 1255418 has been marked as a duplicate of this bug. ***

Comment 8 Gonza 2015-11-25 17:39:35 UTC
Still failing with endless loop.

Verified with:
ovirt-engine-3.6.2-0.0.master.20151124181807.git6d4897e.fc22.noarch

# engine-backup --file=f1 --mode=backup 
FATAL: --log is missing
readlink: missing operand
Try 'readlink --help' for more information.
/usr/bin/engine-backup: line 1405: : No such file or directory
Notifying engine
/usr/bin/engine-backup: line 1472: : No such file or directory
/usr/bin/engine-backup: line 1405: : No such file or directory
readlink: missing operand
Try 'readlink --help' for more information.
/usr/bin/engine-backup: line 1405: : No such file or directory
Notifying engine
/usr/bin/engine-backup: line 1472: : No such file or directory
/usr/bin/engine-backup: line 1405: : No such file or directory
readlink: missing operand
...
...

Comment 9 Red Hat Bugzilla Rules Engine 2015-11-27 05:10:38 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 10 Yedidyah Bar David 2015-11-29 12:47:19 UTC
Sorry, some patches were not backported to 3.6.

Comment 11 Sandro Bonazzola 2015-12-23 13:42:32 UTC
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA

Comment 12 Gonza 2016-01-07 11:35:52 UTC
Verified with:
ovirt-engine-3.6.3-0.0.master.20160105173810.git7421257.el6.noarch

# engine-backup --file=f1 --mode=backup
FATAL: --log is missing
readlink: missing operand
Try `readlink --help' for more information.
/usr/bin/engine-backup: line 1405: : No such file or directory
Notifying engine
/usr/bin/engine-backup: line 1472: : No such file or directory
/usr/bin/engine-backup: line 1405: : No such file or directory
FATAL: Failed notifying engine

No more endless loop.


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