Description of problem: Re bug 864921, if a broker doesn't have any nodes (or can't reach them) then it throws 500 errors when retrieving a cartridge list, which bubble up in awkward places like rhc setup and rhc domain create where you wouldn't expect to care. Steps to Reproduce: 1. Install a broker without any nodes (or service mcollective stop on any nodes) 2. Clear the broker cache if it's been populated 3. Do an rhc setup or rhc domain create Actual results: 500 error from OpenShift::NodeException when requesting domain or cartridges API. Expected results: Should work and just not have any cartridges available. Also, when a node comes online, the lack of cartridges shouldn't be cached, so the next time the broker requires a cartridge list, it should get one from the node(s).
I had a pull request: https://github.com/openshift/origin-server/pull/1084 However per Dan, the model refactor has changed out most of this code, so wait for that and re-test to see if this is still an issue.
https://github.com/openshift/li/pull/809
Verified on devenv_2737 1.After stop the mcollective service(not clean the broker cache), create application, fail [root@F17x64-openshift rhc]# rhc app create -a q2php -t php-5.3 Password: Application Options ------------------- Namespace: qgong5 Cartridges: php-5.3 Gear Size: default Scaling: no Creating application 'q2php' ... No nodes available. 2.Clean the borker cache: [root@F17x64-openshift rhc]# rhc cartridge list The server did not respond correctly. This may be an issue with the server configuration or with your connection to the server (such as a Web proxy or firewall).Please verify that you can access the OpenShift server https://ec2-204-236-200-211.compute-1.amazonaws.com/broker/rest/cartridges [root@F17x64-openshift rhc]# rhc setup OpenShift Client Tools (RHC) Setup Wizard This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed. Using qgong+1 to login to ec2-204-236-200-211.compute-1.amazonaws.com Password: Saving configuration to /root/.openshift/express.conf ... done Checking for git ... found git version 1.7.10.1 Checking common problems .The server did not respond correctly. This may be an issue with the server configuration or with your connection to the server (such as a Web proxy or firewall).Please verify that you can access the OpenShift server https://ec2-204-236-200-211.compute-1.amazonaws.com/broker/rest/domains [root@F17x64-openshift rhc]# rhc app create -a q2php -t php-5.3 The server did not respond correctly. This may be an issue with the server configuration or with your connection to the server (such as a Web proxy or firewall).Please verify that you can access the OpenShift server https://ec2-204-236-200-211.compute-1.amazonaws.com/broker/rest/cartridges 3.After start the mcollective service a.[root@F17x64-openshift rhc]# rhc cartridge list jbossas-7 JBoss Application Server 7.1 web jbosseap-6.0 JBoss Enterprise Application Platform 6.0 web jenkins-1.4 Jenkins Server 1.4 web nodejs-0.6 Node.js 0.6 web perl-5.10 Perl 5.10 web php-5.3 PHP 5.3 web python-2.6 Python 2.6 web ruby-1.8 Ruby 1.8 web ruby-1.9 Ruby 1.9 web jbossews-1.0 Tomcat 6 (JBoss EWS 1.0) web jbossews-2.0 Tomcat 7 (JBoss EWS 2.0) web zend-5.6 Zend Server 5.6 web diy-0.1 Do-It-Yourself web 10gen-mms-agent-0.1 10gen Mongo Monitoring Service Agent 0.1 addon cron-1.4 Cron 1.4 addon jenkins-client-1.4 Jenkins Client 1.4 addon mongodb-2.2 MongoDB NoSQL Database 2.2 addon mysql-5.1 MySQL Database 5.1 addon metrics-0.1 OpenShift Metrics 0.1 addon haproxy-1.4 OpenShift Web Balancer addon phpmyadmin-3.4 phpMyAdmin 3.4 addon postgresql-8.4 PostgreSQL Database 8.4 addon rockmongo-1.1 RockMongo 1.1 addon switchyard-0.6 SwitchYard 0.6 addon Note: Web cartridges can only be added to new applications. [root@F17x64-openshift rhc]# rhc app create -a q2php -t php-5.3 Password: Application Options ------------------- Namespace: qgong5 Cartridges: php-5.3 Gear Size: default Scaling: no Creating application 'q2php' ... done Waiting for your DNS name to be available ... done Downloading the application Git repository ... Cloning into 'q2php'... Warning: Permanently added 'q2php-qgong5.dev.rhcloud.com' (RSA) to the list of known hosts. Your application code is now in 'q2php' q2php @ http://q2php-qgong5.dev.rhcloud.com/ (uuid: 5107336cbbe573d02200008d) ----------------------------------------------------------------------------- Created: Jan 29 2:26 AM Gears: 1 (defaults to small) Git URL: ssh://5107336cbbe573d02200008d.rhcloud.com/~/git/q2php.git/ SSH: 5107336cbbe573d02200008d.rhcloud.com php-5.3 (PHP 5.3) ----------------- Gears: 1 small RESULT: Application q2php was created.
(In reply to comment #3) > [root@F17x64-openshift rhc]# rhc setup [...] > Checking common problems .The server did not respond correctly. This may be > an issue with the server configuration or with your connection to the server > (such as a Web proxy or firewall).Please verify that you can access the > OpenShift server > https://ec2-204-236-200-211.compute-1.amazonaws.com/broker/rest/domains I would argue that this indicates the fix failed. The point of this bug is that there's no need for rhc setup to fail just because there aren't any nodes yet. The server should "respond correctly" and not throw 500 errors even if the response indicates there are no cartridges available and apps can't be created. That's how I resolved bug 864921 for OSE and I'd prefer that keep working the same way. Setting back to NEW, feel free to override me if you disagree.
Note the fix wasn't in until devenv_2739 according to the pull request. I get this: rhc setup -l danmcp2 OpenShift Client Tools (RHC) Setup Wizard This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed. Using danmcp2 to login to 23.20.27.124 Password: Saving previous configuration to /home/dmcphers/.openshift/express.conf.bak Creating /home/dmcphers/.openshift/express.conf to store your configuration Your public SSH key must be uploaded to the OpenShift server to access code. Upload now? (yes|no) yes Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the 'default' key. Type: ssh-rsa Fingerprint: b7:cb:db:be:67:10:f9:c8:4e:cd:da:e0:cd:1f:d0:a8 Uploading key 'default' from /home/dmcphers/.ssh/id_rsa.pub ... done Checking for git ... found git version 1.7.11.7 Checking your namespace ... none Your namespace is unique to your account and is the suffix of the public URLs we assign to your applications. You may configure your namespace here or leave it blank and use 'rhc domain create' to create a namespace later. You will not be able to create applications without first creating a namespace. Please enter a namespace (letters and numbers only) |<none>|: danmcp1 Namespace 'danmcp1' is already in use. Please choose another. Please enter a namespace (letters and numbers only) |<none>|: danmcp2 Your domain name 'danmcp2' has been successfully created Checking for applications ... none Run 'rhc app create' to create your first application. You are using 0 of 3 total gears The following gear sizes are available to you: small Your client tools are now configured.
Checked on devenv_2749, 1.Stop mcollective service 2.Clear broker cache 3.Run rhc setup No exception appears in the rhc setup output. ====================== [root@ip-10-204-138-88 broker]# rhc setup OpenShift Client Tools (RHC) Setup Wizard This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed. The server's certificate is self-signed, which means that a secure connection can't be established to 'localhost'. You may bypass this check, but any data you send to the server could be intercepted by others. Connect without checking the certificate? (yes|no): yes Login to localhost: bmeng Password: *** Saving configuration to /root/.openshift/express.conf ... done Your public SSH key must be uploaded to the OpenShift server to access code. Upload now? (yes|no) yes Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the 'default' key. Type: ssh-rsa Fingerprint: 6e:54:fd:e1:7d:56:79:98:52:75:2d:50:02:7a:02:cc Uploading key 'default' from /root/.ssh/id_rsa.pub ... done Checking for git ... found git version 1.7.1 Checking common problems . done Checking your namespace ... none Your namespace is unique to your account and is the suffix of the public URLs we assign to your applications. You may configure your namespace here or leave it blank and use 'rhc domain create' to create a namespace later. You will not be able to create applications without first creating a namespace. Please enter a namespace (letters and numbers only) |<none>|: bmeng Your domain name 'bmeng' has been successfully created Checking for applications ... none Run 'rhc app create' to create your first application. You are using 0 of 3 total gears The following gear sizes are available to you: small Your client tools are now configured.