Bug 1020162
Summary: | Deployments model validation fails for application | ||||||
---|---|---|---|---|---|---|---|
Product: | OpenShift Online | Reporter: | Qiushui Zhang <qiuzhang> | ||||
Component: | oc | Assignee: | Fabiano Franz <ffranz> | ||||
Status: | CLOSED WONTFIX | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | ccoleman, dmcphers, ffranz, xtian | ||||
Target Milestone: | --- | Keywords: | UpcomingRelease | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-06-11 21:32:13 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
Qiushui Zhang
2013-10-17 07:42:19 UTC
Created attachment 813214 [details]
Add broker log from instance in case it is helpful
When removing member from a domain, similar error message could be seen: [walter@dhcp-10-238 tmp]$ rhc domain list Domain qiuzhang (owned by qiuzhang) ---------------------------------------------- Created: 2:09 PM Allowed Gear Sizes: small, medium Members: walter (admin), user_with_certificate_capabilities (view) Domain qiuzhang2 (owned by qiuzhang) ----------------------------------------------- Created: 2:40 PM Allowed Gear Sizes: small, medium You have access to 2 domains. [walter@dhcp-10-238 tmp]$ rhc member remove user_with_certificate_capabilities -n qiuzhang -l walter Removing 1 member from domain ... Member '525f547e30ee63f8bf000005' not found. [walter@dhcp-10-238 tmp]$ rhc domain list Domain qiuzhang (owned by qiuzhang) ---------------------------------------------- Created: 2:09 PM Allowed Gear Sizes: small, medium Members: walter (admin) Domain qiuzhang2 (owned by qiuzhang) ----------------------------------------------- Created: 2:40 PM Allowed Gear Sizes: small, medium You have access to 2 domains. Can't recreate. Ran the above scenario 100 times and didn't hit any failures. Looking in the log, it looks like the following error was causing this message: [0;37m2013-10-17 02:50:35.287[0m [[31mERROR[0m] Problem: Validation of Application failed. Summary: The following errors were found: Deployments is invalid Resolution: Try persisting the document with valid data or remove the validations. (pid:1653) [0;37m2013-10-17 02:50:35.293[0m [[0;37mDEBUG[0m] SUCCESS ACTION=ADD_DOMAIN_MEMBER USER_ID=525f7f09aea893af4c000001 LOGIN=qiuzhang DOMAIN=qiuzhang is invalid (pid:1653) It looks like one of the deployment requests sent an empty array of activations in a Deployment object. This line in deployment.rb requires the "activations" field to be present (non-nil, non-empty): validates_presence_of :activations I see an empty activations array come through mcollective in the log: [0;37m2013-10-17 02:30:04.609[0m [[0;37mDEBUG[0m] DEBUG: [#<MCollective::RPC::Result:0x000000014f9d30 @agent="openshift", @action="cartridge_do", @results={:sender=>"ip-10-151-24-155", :statuscode=>0, :statusmsg=>"OK", :data=>{:time=>nil, :output=>"Starting PYTHON cart\n", :exitcode=>0, :addtl_params=>{:deployments=>[{:id=>"5e6b6319", :ref=>"master", :sha1=>"8519d91", :force_clean_build=>false, :hot_deploy=>false, :created_at=>1381991398.3779998, :activations=>[]}]}}}>] (Request ID: 2b0cf1810c64f58595770d821fa13ba3) (pid:1877) Then, attempts are made to add members, which fail because the login does not exist yet: [0;37m2013-10-17 02:49:10.785[0m [[32mINFO [0m] Started POST "/broker/rest/domain/qiuzhang/members" for 203.114.244.88 at 2013-10-17 02:49:10 -0400 (pid:1653) [0;37m2013-10-17 02:49:10.932[0m [[0;37mDEBUG[0m] SUCCESS ACTION=ADD_DOMAIN_MEMBER USER_ID=525f7f09aea893af4c000001 LOGIN=qiuzhang DOMAIN=qiuzhang Not all provided members exist. There is no account with identifier walter. (pid:1653) [0;37m2013-10-17 02:50:22.128[0m [[32mINFO [0m] Started POST "/broker/rest/domain/qiuzhang/members" for 203.114.244.88 at 2013-10-17 02:50:22 -0400 (pid:1653) [0;37m2013-10-17 02:50:22.139[0m [[0;37mDEBUG[0m] SUCCESS ACTION=ADD_DOMAIN_MEMBER USER_ID=525f7f09aea893af4c000001 LOGIN=qiuzhang DOMAIN=qiuzhang Not all provided members exist. There is no account with identifier walter. (pid:1653) And then, an attempt is made to add a member which fails because of the invalid deployment in the app model: [0;37m2013-10-17 02:50:35.230[0m [[32mINFO [0m] Started POST "/broker/rest/domain/qiuzhang/members" for 203.114.244.88 at 2013-10-17 02:50:35 -0400 (pid:1653) [0;37m2013-10-17 02:50:35.287[0m [[31mERROR[0m] Problem: Validation of Application failed. Summary: The following errors were found: Deployments is invalid Resolution: Try persisting the document with valid data or remove the validations. (pid:1653) ffranz, any idea on how this validation could fail, or if the empty activations array might have anything to do with it? |