Bug 1035157 - Do app and domain related operation will fail with traceback info when git is not installed
Summary: Do app and domain related operation will fail with traceback info when git is...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 07:56 UTC by weiwei jiang
Modified: 2015-05-15 02:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:51:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description weiwei jiang 2013-11-27 07:56:15 UTC
Description of problem:
when git is not installed, do app and domain related operation will fail with traceback info

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/git_helpers.rb:50:in ``': No such file or directory - git config --get rhc.app-id (Errno::ENOENT)
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/git_helpers.rb:50:in `git_config_get'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/context_helper.rb:104:in `from_local_git'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:301:in `block in fill_arguments'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:292:in `each'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:292:in `fill_arguments'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:272:in `block (3 levels) in to_commander'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/runner.rb:400:in `run_active_command'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/command_runner.rb:73:in `run!'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/cli.rb:37:in `start'
        from /usr/bin/rhc:20:in `<main>'

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

How reproducible:
always

Steps to Reproduce:
1.make sure system not install git 
2.run following commands:
rhc app stop|start|restart|show
rhc cartridge add|stop|start|restart|reload|show|status|remove
rhc domain show|delete|configure
3.

Actual results:
Failed with traceback info

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/git_helpers.rb:50:in ``': No such file or directory - git config --get rhc.app-id (Errno::ENOENT)
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/git_helpers.rb:50:in `git_config_get'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/context_helper.rb:104:in `from_local_git'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:301:in `block in fill_arguments'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:292:in `each'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:292:in `fill_arguments'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/commands.rb:272:in `block (3 levels) in to_commander'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/runner.rb:400:in `run_active_command'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/command_runner.rb:73:in `run!'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
        from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rhc-1.18.0/lib/rhc/cli.rb:37:in `start'
        from /usr/bin/rhc:20:in `<main>'

Expected results:
It should run successfully without error messages.

Additional info:

Comment 1 Jordan Liggitt 2013-11-27 17:41:24 UTC
Will merge in https://github.com/openshift/rhc/pull/516

Comment 2 Wei Sun 2013-11-28 05:56:00 UTC
Will verify this bug after the pull request is merged.

Comment 3 openshift-github-bot 2013-12-02 15:53:25 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/585d2abfbfbe70d35ea1edcbb481214eddc0fb25
Fix bug 1035157: Test for git

Skip clone during create if unavailable

Check for git before cloning

Comment 4 weiwei jiang 2013-12-03 11:06:58 UTC
Tried on devenv_4087 with rhc build from it, and can not reproduce this bug, so verify this issue.


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