Bug 1028518

Summary: oo-admin-upgrade output should include prior upgrade attempt results
Product: OpenShift Online Reporter: Paul Morie <pmorie>
Component: ImageAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, dmcphers
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 00:50:00 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:

Description Paul Morie 2013-11-08 16:09:58 UTC
The oo-admin-upgrade tool makes 2 tries to upgrade a gear by default, but the output is only given for the second upgrade attempt, which makes debugging difficult.  Expected behavior is:

1. No output should be lost.  Prior attempts should be part of the response.
2. You should be able to configure the number of tries

Comment 1 Dan McPherson 2013-11-09 00:53:32 UTC
https://github.com/openshift/origin-server/pull/4141

added --num_tries

and the initial failures are added to the log file.

Comment 2 openshift-github-bot 2013-11-09 03:18:47 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/8c58849946b9f10a98f81755f2d1dedd5a753e29
Fix bug 1028518: include prior upgrade attempts in oo-admin-upgrade output

Comment 4 Meng Bo 2013-11-11 06:42:27 UTC
Checked on devenv_4016, whatever I set the num-tries, it will report failed after 2 tries. I have tried num-tries=1 and num-tries=5

# oo-admin-upgrade upgrade-node --version 2.0.36 --ignore-cartridge-version --num-tries=1
Upgrader started with options: {:version=>"2.0.36", :ignore_cartridge_version=>true, :target_server_identity=>nil, :upgrade_position=>1, :num_upgraders=>1, :max_threads=>12, :gear_whitelist=>[], :num_tries=>1}

    "errors": [
        "Gear upgrade result is marked incomplete", 
        "Failed upgrade after 2 tries"


And for the 2 tries by default, still cannot find the logs for each try.

Comment 5 Dan McPherson 2013-11-11 15:26:47 UTC
https://github.com/openshift/origin-server/pull/4151

Comment 7 Meng Bo 2013-11-12 10:25:16 UTC
The option works well on devenv_4022, the result show the correct number of tries, and error log for each time can be found in the log.

    "errors": [
        "Gear upgrade result is marked incomplete", 
        "Failed upgrade after 3 tries"



Move bug to verified.