Bug 893934
| Summary: | Openstack Installer: packstack should verify it is running on RHEL 6.4 and above | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Nir Magnezi <nmagnezi> | ||||||
| Component: | openstack-packstack | Assignee: | Flavio Percoco <fpercoco> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Nir Magnezi <nmagnezi> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 2.0 (Folsom) | CC: | aortega, derekh, fpercoco, jhenner, mmagr, ykaul | ||||||
| Target Milestone: | snapshot2 | Keywords: | Triaged | ||||||
| Target Release: | 2.1 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | openstack-packstack-2012.2.2-0.8.dev346.el6ost | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-02-14 18:24:49 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: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Nir Magnezi
2013-01-10 10:09:32 UTC
Created attachment 686938 [details]
checks it is running on RHEL64
Comment on attachment 686938 [details]
checks it is running on RHEL64
Please modify to work on rhel >= 6.4
Created attachment 689744 [details]
checks it is running on RHEL6.[4-9]
Verified: openstack-packstack-2012.2.2-0.8.dev346.el6ost.noarch
packstack fail to run on RHEL 6.3 (as expectd).
Host 10.20.30.40: RHEL version not supported. RHEL >6.4 required
DEBUG:root:Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 60, in run
function()
File "/usr/lib/python2.6/site-packages/packstack/plugins/prescript_000.py", line 131, in check_rhel
sys.exit(1)
SystemExit: 1
[ ERROR ]
DEBUG:root:*** The following params were used as user input:
(In reply to comment #6) > Verified: openstack-packstack-2012.2.2-0.8.dev346.el6ost.noarch > > packstack fail to run on RHEL 6.3 (as expectd). > > > > Host 10.20.30.40: RHEL version not supported. RHEL >6.4 required > DEBUG:root:Traceback (most recent call last): > File > "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", > line 60, in run > function() > File > "/usr/lib/python2.6/site-packages/packstack/plugins/prescript_000.py", line > 131, in check_rhel > sys.exit(1) > SystemExit: 1 > > [ ERROR ] > DEBUG:root:*** The following params were used as user input: But why with a traceback? There's a patch upstream that takes care of the tracebacks and prints just messages (traceback is logged in the log file). The patch hasn't been merged yet but once it gets in this patch can also be updated to use InstallError. Patch: https://review.openstack.org/#/c/20816/ Putting back to assigned, because there are problems with this check. out: Welcome to Installer setup utility out: Installing: out: Clean Up... [ DONE ] out: OS support check... Host 10.x.y.z:: RHEL version not supported. RHEL >6.4 required out: [ ERROR ] 1) The server is RHEL 6.4. The message is misleading because there was some other problem. The bare except in [1] is no good. 2) The message is also misleading because it needs RHEL >= 6.4, not REHL > 6.4 BTW: I recommend you to use Paramiko for remote connections. It is much more flexible. [1] https://bugzilla.redhat.com/attachment.cgi?id=689744&action=diff I was investigating why this error happens. I found that it was trying to execute these commands: ['ssh', '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'root.33.1', 'bash -x'] ['ssh', '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'root.33.2', 'bash -x'] ['ssh', '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'root.33.2:', 'bash -x'] "11.22.33.2:" Is not valid IP address, so that's why it raised the ScriptRuntimeError. So catching with any of * bare except * except Exception * except SciptRuntimeError wouldn't help. I think the code should rise some SSHConnectionError in case of connection error. In case of non-zero command result, it should rise ScriptRuntimeError or something like that. But this is AFAIK not possible when using OpenSSH. Workaround would be to just `cat` the redhat-release file and match it with regexp on the local side using Python. BTW, the colon character is there because of my buggy answ file: CONFIG_SWIFT_STORAGE_HOSTS=11.22.33.2:/dev/sda2, 11.22.33.3:/dev/sda2 1. Well packstack tries to ssh only to hosts you have in answer file. So you should give valid IP addresses to packstack :). 2. The version check is performed on all host where OS components are going to be installed, so packtack have to connect to them first. 3. I agree about raising different exception in case of connection error. But this is different issue, so please create another bug for this. I'll set this bug back to verified, so we won't block snapshot2. Btw thanks for pointing us to paramiko. I didn't know about this package and it looks great from my quick check. Will keep that in mind during refactoring in future. (In reply to comment #10) > ['ssh', '-o', 'StrictHostKeyChecking=no', '-o', > 'UserKnownHostsFile=/dev/null', 'root.33.1', 'bash -x'] BTW, while at it, this does not use key specified by CONFIG_SSH_KEY unless your specified key happens to be default ~/.ssh/id_rsa Granted, CONFIG_SSH_KEY is documented as "Path to a Public key" so it won't be usable for ssh -i but packstack cloud at least try to locate corresponding identity file by stripping .pub and use it in ScriptRunner ? Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0260.html |