Created attachment 1331003 [details] log in foreman-maintain.log file Description of problem: We were trying to run upgrade with --assumeyes option.But still while performing yum update it will ask for answer. Version-Release number of selected component (if applicable):Foreman-maintain snap 2.0 How reproducible:always Steps to Reproduce: 1.# foreman-maintain upgrade run -h Usage: foreman-maintain upgrade run [OPTIONS] Options: --target-version TARGET_VERSION Target version of the upgrade -y, --assumeyes Automatically answer yes for all questions -w, --whitelist whitelist Comma-separated list of labels of steps to be ignored -f, --force Force steps that would be skipped as they were already run --phase phase run only a specific phase -h, --help print help 2.# foreman-maintain upgrade run --target-version 6.3 -w "repositories-setup" -y Actual results: Ask for answer while yum update Transaction Summary ========================================================================================================================================= Install 7 Packages (+85 Dependent packages) Upgrade 172 Packages Total download size: 105 M Is this ok [y/d/N]: Expected results: It should not ask for yes if -y /--assumeyes option is passed. Additional info:
This has been intentionally done to let the satellite user/admin decide whether to proceed with package update or not. I think it should be OK to prompt [y/d/N] for this particular case.
If the user chosen `-y` in the foreman-maintain, it's expected he knows what he's doing and we should not ask again. I believe the chance the user would ever chose no is very low. +1 for not asking
Created redmine issue http://projects.theforeman.org/issues/21208 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21208 has been resolved.
Version Tested: # rpm -q rubygem-foreman_maintain rubygem-foreman_maintain-0.1.1-1.el7sat.noarch Found yum update command always run with -y option independent of passing Option -y, --assumeyes in foreman-maintain upgrade run. D, [2017-12-18 09:02:09-0500 #9172] DEBUG -- : Running command yum -y update with stdin nil D, [2017-12-18 09:02:38-0500 #9172] DEBUG -- : output of the command: Script started on Mon 18 Dec 2017 09:02:09 AM EST If the user did not chose `-y` in the foreman-maintain, it will not ask satellite user whether to proceed with package update or not like before. I know this will not cause any problem as we were confirming that from user in prompt Confirm to continue with the the modification part of the upgrade, [y(yes), n(no), q(quit)] but still to confirm is this expected change?
@nikhil, Yes you thought it correct, this is a deliberate change that was done. Since we are already confirming whether to continue with the upgrade or not, it doesn't make sense to again ask for user confirmation before running `yum update`.
Thanks. Moving this to VERIFIED.
As per comment 7, rubygem-foreman_maintain-0.1.1-1.el7sat.noarch is the version in production now. Closing this bug as fixed in Current release.