Bug 1130445 - [TEXT] - if engine-setup asks for updates and choice is no, suggest '--offline' on re-run.
Summary: [TEXT] - if engine-setup asks for updates and choice is no, suggest '--offlin...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Yedidyah Bar David
QA Contact: David Necpal
URL:
Whiteboard:
: 1131364 (view as bug list)
Depends On:
Blocks: 1131364
TreeView+ depends on / blocked
 
Reported: 2014-08-15 09:03 UTC by Gianluca Cecchi
Modified: 2019-04-28 14:18 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1131364 (view as bug list)
Environment:
Last Closed: 2017-12-20 11:15:19 UTC
oVirt Team: Integration
ylavi: ovirt-4.2+


Attachments (Terms of Use)
engine-setup log when choosing No for updates apply (225.80 KB, text/plain)
2014-08-15 09:05 UTC, Gianluca Cecchi
no flags Details
engine-setup log when choosing Yes for updates apply and update for engine exists (230.35 KB, text/plain)
2014-08-15 09:06 UTC, Gianluca Cecchi
no flags Details
engine-setup log when choosing No for updates apply and updates not availeble for engine-setup itself but for other packages (219.29 KB, text/plain)
2014-08-15 09:07 UTC, Gianluca Cecchi
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 79883 master MERGED packaging: setup: Nicer texts about updating packages 2017-08-09 07:44:55 UTC

Description Gianluca Cecchi 2014-08-15 09:03:15 UTC
Description of problem:
engine-setup checks for updates and asks if one wants to apply them is found.
But if one chooses not to apply it gives an error.

Version-Release number of selected component (if applicable):
ovirt-engine-setup-base-3.6.0-0.0.master.20140811142054.gite3c9ec4.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. run engine-setup when some updates are available
2. installer gives output:
[ INFO  ] Checking for product updates...
          Setup has found updates for some packages, do you wish to update them now? (Yes, No) [Yes]: 

3. Answer No
installer aborts
[ ERROR ] Failed to execute stage 'Environment customization': Aborted, packages must be updated
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140815104326-tsbpe6.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140815104359-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed


Actual results:
setup aborts

Expected results:
setup able to continue after choosing "No"

Additional info:
If we require as mandatory to apply updates, the prompt shoulb be different form the current one.

Something like

[ INFO  ] Checking for product updates...
          Setup has found updates for some packages and requires to apply them before proceeding, do you wish to update them now and go ahead? (Yes, No) [Yes]: No
[ INFO  ] Stage: User aborted
...
[ INFO  ] Stage: Clean up

This seems to happen both if engine-setup itself needs update or some other packages only.

In case of updates for engine-setup and answer is "Yes" you get:
[ INFO  ] Checking for product updates...
          Setup has found updates for some packages, do you wish to update them now? (Yes, No) [Yes]: 
[ INFO  ] Checking for an update for Setup...
          An update for the Setup packages ovirt-engine-setup was found. Please update that package by running:
          "yum update ovirt-engine-setup"
          and then execute Setup again.
[ ERROR ] Failed to execute stage 'Environment customization': Please update the Setup packages
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140815105538-7zsbx8.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140815105756-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

I think this is suboptimal too...

A better workflow would be in my opinion:
1a) check if updates for engine-setup exists and in case directly aborts because he/she needs to update it before 
(if this is the desired behaviour as it seems to me from the current workflow; not sure if it is correct... one could desire to rerun engine-setup again without any update at all...)

1b) if no update is available for engine-setup itself, check if there are any updates for other engine related packages and in case ask the user if he/she wants to update them before proceeding and in case of negative answer, go ahead without giving any error

Comment 1 Gianluca Cecchi 2014-08-15 09:04:12 UTC
This was don on CentOS 6.5 system.
I'm going to attach engine-setup logs

Comment 2 Gianluca Cecchi 2014-08-15 09:05:24 UTC
Created attachment 927036 [details]
engine-setup log when choosing No for updates apply

Comment 3 Gianluca Cecchi 2014-08-15 09:06:10 UTC
Created attachment 927038 [details]
engine-setup log when choosing Yes for updates apply and update for engine exists

Comment 4 Gianluca Cecchi 2014-08-15 09:07:49 UTC
Created attachment 927039 [details]
engine-setup log when choosing No for updates apply and updates not availeble for engine-setup itself but for other packages

Comment 5 Gianluca Cecchi 2014-08-15 09:11:41 UTC
Please note that in case there are updates available but not fr engine-setup itself and one chooses to apply them, the setup phase completes ok.
So this bug entry is related to workflow when one doesn't wants to apply updates but wnats to run engine-setup with the currently installed environment.
The problem exists both if it is the first time and when the engine as already installed before.

Comment 6 Yedidyah Bar David 2014-11-19 13:37:55 UTC
Hi,

Actually the current flow is by design.

Perhaps all you wanted is the '--offline' option?

Comment 7 Sandro Bonazzola 2015-05-08 15:20:57 UTC
Closing with insufficient data, please reopen if requested info can be provided.

Comment 8 Gianluca Cecchi 2015-05-08 16:10:28 UTC
Sorry, I missed the bugzilla's update as it came about 3 months after opening...

My point was that if one wants to run engine-setup again his/her already running environment and if in the mean time some updates have come, he/she is unable to process engine-setup without applying the updates. And this is not desirable or at least it should not be mandatory in my opinion.
So yes, what suggested as "--offline" option could solve what I'm pointing out

Comment 9 Sandro Bonazzola 2015-10-01 08:22:46 UTC
*** Bug 1131364 has been marked as a duplicate of this bug. ***

Comment 10 Red Hat Bugzilla Rules Engine 2015-10-19 10:58:57 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 11 Yedidyah Bar David 2017-07-27 12:22:51 UTC
Decided to fix this because I now stumbled (again) on it by accepting the default "Yes" for "Install ovirt-provider-ovn?". This adds openvswitch to the list of packages to install, so the existing text is confusing. Changed it to "install or update". Not sure we should default to "Yes" on ovn, and if we do, perhaps Require: it by the engine. But changing the text is also helpful imo.

Comment 12 David Necpal 2017-09-05 05:26:52 UTC
Bug/problem isn't solved.

Tested on version:
ovirt-engine-4.2.0-0.0.master.20170903205106.gitb17261a.el7.centos.noarch

# engine-setup 
    .
    .
    .
    .
    .
    . 
[ INFO  ] Checking for product updates...
          Setup needs to install or update the following packages:
              .
              .
              .
              .
          Replying "No" will abort Setup. You can pass the option "--offline" to prevent installing or updating packages.
          Do you wish to update them now? (Yes, No) [Yes]: No
[ ERROR ] Failed to execute stage 'Environment customization': Aborted, packages must be updated. You can pass "--offline" to prevent checking for updates.
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20170905070757-xufoxw.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170905072044-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

Comment 13 Red Hat Bugzilla Rules Engine 2017-09-05 05:26:59 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 14 Yedidyah Bar David 2017-09-05 06:58:12 UTC
(In reply to David Necpal from comment #12)
> Bug/problem isn't solved.

You might have a point if you consider the entire discussion above, but we decided to only make a text change, thus current Summary line.

> 
> Tested on version:
> ovirt-engine-4.2.0-0.0.master.20170903205106.gitb17261a.el7.centos.noarch
> 
> # engine-setup 
>     .
>     .
>     .
>     .
>     .
>     . 
> [ INFO  ] Checking for product updates...
>           Setup needs to install or update the following packages:
>               .
>               .
>               .
>               .
>           Replying "No" will abort Setup. You can pass the option
> "--offline" to prevent installing or updating packages.

Here ^^^ ,

>           Do you wish to update them now? (Yes, No) [Yes]: No
> [ ERROR ] Failed to execute stage 'Environment customization': Aborted,
> packages must be updated. You can pass "--offline" to prevent checking for
> updates.

and here ^^^, are the text changes.

The alternative was to either allow switching to offline mode in the middle, or restarting setup for the user with --offline, and we decided that both of these will be quite complicated. Feel free to open another bug if you think this is important, current bug is text-only.

Moving back to QE.

> [ INFO  ] Stage: Clean up
>           Log file is located at
> /var/log/ovirt-engine/setup/ovirt-engine-setup-20170905070757-xufoxw.log
> [ INFO  ] Generating answer file
> '/var/lib/ovirt-engine/setup/answers/20170905072044-setup.conf'
> [ INFO  ] Stage: Pre-termination
> [ INFO  ] Stage: Termination
> [ ERROR ] Execution of setup failed

Comment 15 David Necpal 2017-09-06 10:14:01 UTC
Sorry, I understood the bug incorrectly

Verified on version: 
ovirt-engine-4.2.0-0.0.master.20170903205106.gitb17261a.el7.centos.noarch

Comment 16 Sandro Bonazzola 2017-12-20 11:15:19 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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