Bug 823845
Summary: | Will return success message when check the non-exist cartridge's status. | ||
---|---|---|---|
Product: | OKD | Reporter: | yquan <yquan> |
Component: | oc | Assignee: | Clayton Coleman <ccoleman> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 2.x | CC: | jinzhang, mmasters, rmillner, xtian |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-09-17 21:29:16 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: |
Description
yquan
2012-05-22 10:05:23 UTC
This bug appears to have been fixed. Can you verify? Using rhc 0.93.18, I see a non-zero exit code and an error message from the broker indicating that the cartridge is invalid: $ rhc app create -t diy-0.1 -a testapp Password: ******** Creating application: testapp in miciah Now your new domain name is being propagated worldwide (this might take a minute)... Warning: Permanently added the RSA host key for IP address '174.129.171.3' to the list of known hosts. Confirming application 'testapp' is available: Success! testapp published: http://testapp-miciah.rhcloud.com/ git url: ssh://f568da6854074ff0989117b2deb59701.com/~/git/testapp.git/ Disclaimer: This is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on Openshift. $ rhc app cartridge status -a testapp -c foo Password: ******** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: Invalid type (-c|--cartridge) specified: 'foo'. Valid cartridge types are (mongodb-2.0, cron-1.4, mysql-5.1, postgresql-8.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.4, metrics-0.1, rockmongo-1.1, jenkins-client-1.4). $ rhc app cartridge status -a testapp -c cron-1.4 Password: ******** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: The application testapp is not configured with the embedded cartridge cron-1.4. $ rhc app cartridge add -a testapp -c cron-1.4 Password: ******** RESULT: cron-1.4 added to application testapp To schedule your scripts to run on a periodic basis, add the scripts to your application's .openshift/cron/{minutely,hourly,daily,weekly,monthly}/ directories (and commit and redeploy your application). Example: A script .openshift/cron/hourly/crony added to your application will be executed once every hour. Similarly, a script .openshift/cron/weekly/chronograph added to your application will be executed once every week. $ rhc app cartridge status -a testapp -c cron-1.4 Password: ******** RESULT: cron scheduling service is enabled $ rhc app cartridge add -a testapp -c foo Password: ******** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: Invalid type (-c|--cartridge) specified: 'foo'. Valid cartridge types are (mongodb-2.0, cron-1.4, mysql-5.1, postgresql-8.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.4, metrics-0.1, rockmongo-1.1, jenkins-client-1.4). $ rhc app cartridge status -a testapp -c foo Password: ******** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: Invalid type (-c|--cartridge) specified: 'foo'. Valid cartridge types are (mongodb-2.0, cron-1.4, mysql-5.1, postgresql-8.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.4, metrics-0.1, rockmongo-1.1, jenkins-client-1.4). $ echo $? 154 $ The foregoing was using hosted, and I get essentially the same output when I test using the devenv_1951 ami. There is a commit that looks like it may have fixed this bug, but it actually predates this report: https://github.com/openshift/li/commit/8d4ed250c57a05729c0216bf94f809d79f71c64c Move it to ON_QA to verify. This bug has been verified and fixed, please refer to details as below: Verified builds: rhc-0.97.3 devenv_1955 Steps to verify: 1.Create an app without any cartridge embeded. 2.Check non-existed cartridge status of this app: #rhc app cartridge status -a appname -c $[non-existed cartridge]. Verified results: 1. If using an invalid cartridge type, following error message is shown instead of the success message: # rhc app cartridge status -a app1 -c test Password: ****** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: Invalid type (-c|--cartridge) specified: 'test'. Valid cartridge types are (mongodb-2.0, cron-1.4, mysql-5.1, postgresql-8.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.4, metrics-0.1, phpmoadmin-1.0, rockmongo-1.1, jenkins-client-1.4). 2. If using an valid cartridge type which is not embeded, a reasonalble message is displayed as below: # rhc app cartridge status -a app1 -c mysql-5.1 Password: ****** Problem reported from server. Response code was 400. Re-run with -d for more information. RESULT: The application app1 is not configured with the embedded cartridge mysql-5.1. So this bug is fixed. Thanks. |