Bug 921951 - [fork][Card505]Can't add private_cert_info alias to application anymore after migrate
Summary: [fork][Card505]Can't add private_cert_info alias to application anymore after...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-15 10:24 UTC by Rony Gong 🔥
Modified: 2015-05-15 00:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-02 13:44:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
development.log (49.95 KB, text/plain)
2013-03-15 10:24 UTC, Rony Gong 🔥
no flags Details

Description Rony Gong 🔥 2013-03-15 10:24:25 UTC
Created attachment 710548 [details]
development.log

Description of problem:
Do migration from devenv_stage_320 to fork_ami_529
Then can't add private_cert_info alias to the exist application or new created application anymore.
show:  Node execution failure

Please see the attachment for detail

Version-Release number of selected component (if applicable):
migration from devenv_stage_320 to fork_ami_529

How reproducible:
Always

Steps to Reproduce:
1.Launch devenv_stage_320 and fork_ami_529 instance
2.Prepare data on the devenv_stage_320 server, add alias to applications
3. scp ~/devenv-local from fork_ami_529 ami into devenv_stage_320 ami (using libra.pem)
4. scp /etc/yum.repos.d/local.repo from fork_ami_529 ami into devenv_stage_320 ami (same location)
5. Change repos to point to candidate on devenv_stage_320 replace all label 'stage' by 'candidate' in /etc/yum.repos.d/devenv.repo
sed -i 's/stage/candidate/g' /etc/yum.repos.d/devenv.repo
6. yum -y install yum-priorities (on devenv_stage_320)
7. yum update --enablerepo devenv-local (on devenv_stage_320)
8.Execute migrate script
$./root/.source_build/li/misc/maintenance/bin/migrate-mongo-2.0.25
9.After migration, add private_cert_info alias to the exist application by RESTAPI.

Actual results:

{"data":null,"errors":{},"messages":[{"exit_code":1,"field":null,"severity":"error","text":"Failed to add alias q2perl.com due to: Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support."}],"status":"internal_server_error","supported_api_versions":[1.0,1.1,1.2,1.3,1.4],"type":null,"version":"1.4"}

Expected results:
Could add alias success.

Additional info:
After migration, the old app could work, and could create new app.

Comment 1 Lili Nader 2013-03-15 20:05:19 UTC
This has nothing to do with mongo migration.  Node execution failure is an error thrown by node.  It is possible that the process you followed for upgrading the stage environment does not work well with the code for node.

Comment 2 Rony Gong 🔥 2013-03-19 06:41:43 UTC
Retest on migrate from devenv_stage_323 to devenv_2962
@Lili, There I can't see any error when I do the migration
[root@ip-10-151-111-29 bin]# ./migrate-mongo-2.0.25
Starting migration
..
Mongo migrated 0 apps
Done!

But After migration, I could create app and add the alias without ssl_info by CLI successfully, only when add alias with ssl_info by restapi, show the node execution error, but it will add the alias with ssl_info to mongo db as:  
"_id": ObjectId("514806995f5f0bd145000046"),
       "fqdn": "qpythontest",
       "has_private_ssl_certificate": false 
actually I want to add an alias with ssl_info.

The development.log:
2013-03-19 02:32:57.281 [DEBUG] DEBUG: [#<MCollective::RPC::Result:0x0000000589be58 @agent="openshift", @action="cartridge_do", @results={:sender=>"ip-10-151-111-29", :statuscode=>1, :statusmsg=>"cartridge_do_action failed -1. Output undefined local variable or method `passphrase' for #<MCollective::Agent::Openshift:0x007fada4323da0>", :data=>{:time=>nil, :output=>"undefined local variable or method `passphrase' for #<MCollective::Agent::Openshift:0x007fada4323da0>", :exitcode=>-1}}>] (Request ID: 2765247665dcd6ea2ae92fc05689b097) (pid:18817)
2013-03-19 02:32:57.283 [DEBUG] DEBUG: MCollective Response Time (execute_direct: ssl-cert-add): 0.078106249s  (Request ID: 2765247665dcd6ea2ae92fc05689b097) (pid:18817)
2013-03-19 02:32:57.283 [DEBUG] DEBUG: server results: undefined local variable or method `passphrase' for #<MCollective::Agent::Openshift:0x007fada4323da0> (pid:18817)
2013-03-19 02:32:57.283 [ERROR] Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support. (pid:18817)
2013-03-19 02:32:57.284 [ERROR] ["/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.6.3/lib/openshift/mcollective_application_container_proxy.rb:2533:in `parse_result'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.6.3/lib/openshift/mcollective_application_container_proxy.rb:464:in `add_ssl_cert'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.6.3/app/models/gear.rb:158:in `method_missing'",

Comment 3 Rony Gong 🔥 2013-03-19 08:35:57 UTC
Since miss the operation 'restart broker service, mcollcetive' after migration,
comment2 is invalid. Retest this after restart broker service, mcollcetive, it works now.
curl -k -u "qgong+2:ppp" https://ec2-50-19-65-115.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/qtest/aliases -X POST -d "id=qphp.test2" --data-urlencode "ssl_certificate=-----BEGIN CERTIFICATE-----
MIIDADCCAegCCQC9wnKoDp0BgTANBgkqhkiG9w0BAQUFADBCMQswCQYDVQQGEwJV
UzEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBh
bnkgTHRkMB4XDTEzMDIyNjE3NDM0NloXDTE0MDIyNjE3NDM0NlowQjELMAkGA1UE
BhMCVVMxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBD
b21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANMxhBxF
cbw2Qr5LV5RFF2adv8W3SPm4ICXHAd0cOIqc2KS8O8YkWzP5PDsECDv+laaeNX0D
2d/TShrtTIXaOev9+pq5aC35mA9Tcmv9zdzwt0kcsVB9GaDAHXQCz7kP33/uIQNs
ndSOIV4ypSV1dZ98LUeaOhGEazo3gH8MYQpoDkDGYCM3ix+s830X8z9eJ73nXYDK
n3wrydFPMSznwa93HAcBhRcbwi5pc9Aizzo21XlC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rZsVHK/iW5MM6A==
-----END RSA PRIVATE KEY-----" -d "pass_phrase=abcd"
{"data":{"certificate_added_at":"2013-03-19T00:00:00Z","has_private_ssl_certificate":true,"id":"qphp.test2","links":{"GET":{"href":"https://ec2-50-19-65-115.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/qtest/aliases/qphp.test2","method":"GET","optional_params":[],"rel":"Get alias","required_params":[]},"UPDATE":{"href":"https://ec2-50-19-65-115.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/qtest/aliases/qphp.test2","method":"PUT","optional_params":[{"default_value":null,"description":"Optional passphrase for the private key","name":"pass_phrase","type":"string","valid_options":[]}],"rel":"Update alias","required_params":[{"description":"Content of SSL Certificate","invalid_options":[],"name":"ssl_certificate","type":"string","valid_options":[]},{"description":"Private key for the certifcate.  Required if adding a certificate","invalid_options":[],"name":"private_key","type":"string","valid_options":[]}]},"DELETE":{"href":"https://ec2-50-19-65-115.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/qtest/aliases/qphp.test2","method":"DELETE","optional_params":[],"rel":"Delete alias","required_params":[]}}},"errors":{},"messages":[{"exit_code":0,"field":"result","severity":"info","text":""}],"status":"created","supported_api_versions":[1.0,1.1,1.2,1.3,1.4],"type":"alias","version":"1.4"}


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