This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 823851 - rhc-chk and "rhc domain status"will return failure message even if all the files are matched in win7
rhc-chk and "rhc domain status"will return failure message even if all the fi...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 06:10 EDT by yquan
Modified: 2015-05-14 21:54 EDT (History)
6 users (show)

See Also:
Fixed In Version: rhc-0.96.5-1+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-07 16:42:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The massage of rhc-chk (4.18 KB, text/plain)
2012-05-22 06:10 EDT, yquan
no flags Details

  None (edit)
Description yquan 2012-05-22 06:10:41 EDT
Created attachment 585986 [details]
The massage of rhc-chk

Description of problem:
The rhc-chk will return failure message even if all the files are matched.
And I uploaded the output of rhc-chk to the attachment.

Version-Release number of selected component (if applicable):
devenv_1785
rhc-0.93.3
ruby-1.9.3

How reproducible:
always

Steps to Reproduce:
1.Create an domain in win7
2.rhc-chk
3.
  
Actual results:
Will return the message like the attachment.

Expected results:
The result of rhc-chk should 100% passed.

Additional info:
Comment 1 yquan 2012-05-23 05:32:58 EDT
I run the rhc-chk on mac os, the output is like below.

Analyzing system
..EF.Could not open a connection to your authentication agent.
F.
=================================================
||  Your system did not pass all of the tests  ||
=================================================
1) Local /var/root/.ssh/id_rsa does not match remote pub key, SSH auth will not work
	Perhaps you should regenerate your public key, or run 'rhc sshkey add' to add your new key.
2) Either ssh-agent is not running or you do not have any keys loaded.

=========================================================
||  Something went wrong, and not all tests completed  ||
=========================================================
1) test_01_ssh_private_key(Test3_SSH):
	NoMethodError: undefined method `load_data_public_key' for Net::SSH::KeyFactory:Class
	    /Library/Ruby/Gems/1.8/gems/rhc-0.93.6/lib/rhc-common.rb:309:in `get_ssh_keys'
	    /Library/Ruby/Gems/1.8/gems/rhc-0.93.6/bin/rhc-chk:290:in `test_01_ssh_private_key'
Comment 2 Fabiano Franz 2012-05-30 15:42:39 EDT
Right now failing only on Mac, lowering severity so this doesn't block the build and because we now have rhc setup to configure what's missing.
Comment 3 Xiaoli Tian 2012-06-13 05:56:58 EDT
Tested on Mac again with rhc-0.93.19, it works

dhcp-8-149:test root# rhc domain status -p 1
Loaded suite /usr/bin/rhc-chk
Started
......

Finished in 4.716513 seconds.

6 tests, 18 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

1.27 tests/s, 3.82 assertions/s
Comment 4 Meng Bo 2012-06-13 06:09:52 EDT
still cannot pass the rhc-chk on Windows paltform by the following failures for rhc-0.93.19.


Loaded suite C:/Ruby193/bin/rhc-chk
Started
..F
===============================================================================
Failure:
test_01_ssh_private_key(Test3_SSH)
C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.19/bin/rhc-chk:349:in `check_permis
sions'
     346:
     347:     perms = sprintf('%o',File.stat(file).mode)[-3..-1]
     348:
  => 349:     assert_match permission, perms, error_for(:bad_permissions,file,pe
rms,permission.source)
     350:   end
     351: end
     352:
C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.19/bin/rhc-chk:282:in `test_01_ssh_
private_key'
<> expected but was
<>

diff:
  nil
===============================================================================
F
===============================================================================
Failure:
test_02_ssh_public_key(Test3_SSH)
C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.19/bin/rhc-chk:312:in `test_02_ssh_
public_key'
     309:
     310:     # Test public key and remote key
     311:     assert_not_nil $user_info, error_for(:no_account)
  => 312:     assert $remote_ssh_pubkeys.include?(@@local_ssh_pubkey), error_for
(:no_match_pub, @libra_kfile)
     313:   ensure
     314:     fp.close if fp
     315:   end
<> expected but was
<>

diff:
  nil
===============================================================================

Private key id_rsa has wrong permission on Windows (-rw-r--r--), and cannot change it by chmod.

BTW, rhc-chk will always check the ssh-agent even if user dose not start it. And only start it and load the key to it can pass the check point.
Comment 5 Nam Duong 2012-07-18 23:47:56 EDT
Increasing severity on this bug since we're so dependent upon this status check to work in order to have a healthy rhc environment and overall user experience.  Hoping to increase severity/priority of  https://bugzilla.redhat.com/show_bug.cgi?id=836483 in the process.  


I ran into this today while trying to debug a user's environment (Win) as well as my own (Mac OSX-Lion).  Both were on version 0.95.13 based on yesterday's upgrade.  Even after running rhc setup, things weren't working and we were dependent upon this status check to detect actual problems rather than throwing errors of it's own.

Some things to catch:  When GIT_SSH env variable is set, ssh may work, but git clone won't work.  

Hope that helps;
~Nam
Comment 6 Xiaoli Tian 2012-07-19 00:08:34 EDT
Most part about domain status failure have been fixed in this bug :https://bugzilla.redhat.com/show_bug.cgi?id=836483 on rhc-0.95.14

We should release rhc-0.95.14 in this sprint but not rhc-0.95.13.
Comment 7 John Poelstra 2012-07-31 13:21:34 EDT
Related to fix for 841170 and working on today.
Comment 8 Fabiano Franz 2012-08-01 11:31:31 EDT
I think I got all issues related to rhc-chk in the Windows platform.
When there is no pageant running users can still see a failure in rhc domain status, but it's not blocker (user will have to input the key password, the test failure message is explanatory).
Comment 9 Rony Gong 2012-08-03 06:21:20 EDT
verified on rhc-0.96.8, and the unfixed issue will tracked by 841170

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