Bug 916330 - "Document(s) not found for class PendingDomainOps" when renaming a domain with app(s) in it
Summary: "Document(s) not found for class PendingDomainOps" when renaming a domain wit...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-27 20:30 UTC by Andre Dietisheim
Modified: 2015-05-15 02:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 13:59:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBIDE-13666 0 Major Closed Error when renaming a domain with 1+ applications 2017-01-18 21:02:27 UTC

Description Andre Dietisheim 2013-02-27 20:30:10 UTC
Description of problem:
If you have a domain with an application in it and then try to rename it, you'll run into an error telling you "Document(s) not found for class PendingDomainOps"

Version-Release number of selected component (if applicable):
"1.0"

How reproducible:
frequently but not always

Steps to Reproduce:
1. create domain: curl -k --user "<USER>:<PASSWORD>" -H "Accept: application/xml" https://openshift.redhat.com/broker/rest/domains/ -X POST --form id=bingobongo
2. create an application in it: curl -k --user "<USER>:<PASSWORD>" -H "Accept: application/xml" https://openshift.redhat.com/broker/rest/domains/bingobongo/applications/ -X POST -v --form name=as --form cartridge=jbossas-7
3. rename the domain: curl -k --user "<USER>:<PASSWORD>" -H "Accept: application/xml" https://openshift.redhat.com/broker/rest/domains/bingobongo -X PUT -v --form id=honkabonka
  
Actual results:
< HTTP/1.1 100 Continue
< HTTP/1.1 500 
< Cache-Control: no-cache
< Content-Type: application/xml; charset=utf-8
< Date: Wed, 27 Feb 2013 20:21:04 GMT
< ProxyTime: D=15205851
< Server: Apache/2.2.15 (Red Hat)
< Status: 500
< Strict-Transport-Security: max-age=15768000, includeSubDomains
< Vary: Accept-Encoding,User-Agent
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17
< X-Rack-Cache: invalidate, pass
< X-Request-Id: 0503c01a1049c797f3c20d200f653ad3
< X-Runtime: 15.076344
< X-UA-Compatible: IE=Edge,chrome=1
< Content-Length: 1327
< Connection: keep-alive
< 
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>internal_server_error</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <severity>error</severity>
      <text>
Problem:
  Document(s) not found for class PendingDomainOps with id(s) 512e6abf4382ece7c10000ec.
Summary:
  When calling PendingDomainOps.find with an id or array of ids, each parameter must match a document in the database or this error will be raised. The search was for the id(s): 512e6abf4382ece7c10000ec ... (1 total) and the following ids were not found: 512e6abf4382ece7c10000ec.
Resolution:
  Search for an id that is in the database or set the Mongoid.raise_not_found_error configuration option to false, which will cause a nil to be returned instead of raising this error when searching for a single id, or only the matched documents when searching for multiples.</text>
      <exit-code>1</exit-code>
      <field nil="true"></field>
    </message>
  </messages>
  <version>1.3</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
  </supported-api-versions>
</response>

Expected results:
I should be able to rename the domain without any problems.

Additional info:
As far as I can see, the rename was executed even though the above error is reported:

curl -k --user "<USER>:<PASSWORD>" -H "Accept: application/xml" https://openshift.redhat.com/broker/rest/domains/ -X GET -v

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <type>domains</type>
  <data>
    <domain>
      <id>honkabonka</id>
      <suffix>rhcloud.com</suffix>
      <links>
        <link>
          <rel>Get domain</rel>
          <method>GET</method>
          <href>https://openshift.redhat.com/broker/rest/domains/honkabonka</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>List applications</rel>
        ...

Comment 1 Lili Nader 2013-02-27 21:49:36 UTC
working on this one

Comment 2 JBoss JIRA Server 2013-02-28 08:49:02 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-13666

reopening this issue after changing the description.

Comment 3 JBoss JIRA Server 2013-02-28 08:49:24 UTC
Andre Dietisheim <adietish> updated the status of jira JBIDE-13666 to Reopened

Comment 4 JBoss JIRA Server 2013-02-28 08:50:03 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-13666

This is a WATCHER/TRACKER issue. This is an issue on the OpenShift platform. There's nothing we can do about it.

Comment 5 Abhishek Gupta 2013-03-01 18:49:25 UTC
I believe this was an issue with trying to read the parent domain pending_op from secondary within 500ms of the domain pending op being created. Perhaps not enough time for things to have been synced to secondary on a loaded mongo.

This has now been fixed to read from the primary.

Comment 6 Rony Gong 🔥 2013-03-04 05:16:43 UTC
Verified on the env that migrate from devenv_stage_312 to devenv_2888
1.Create domain
curl -k --user "qgong+1:111111" -H "Accept: application/xml" https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/ -X POST --form id=bingobongo

2.Create jbossas-7 application
curl -k --user "qgong+1:111111" -H "Accept: application/xml" https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/bingobongo/applications/ -X POST -v --form name=as --form cartridge=jbossas-7

3.update domain
[qgong@dhcp-8-169 python1]$ curl -k --user "qgong+1:111111" -H "Accept: application/xml" https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/bingobongo -X PUT --form id=honkabonka -v
* About to connect() to proxy file.rdu.redhat.com port 3128 (#0)
*   Trying 10.11.255.147... connected
* Connected to file.rdu.redhat.com (10.11.255.147) port 3128 (#0)
* Establish HTTP proxy tunnel to ec2-23-22-110-226.compute-1.amazonaws.com:443
* Server auth using Basic with user 'qgong+1'
> CONNECT ec2-23-22-110-226.compute-1.amazonaws.com:443 HTTP/1.1
> Host: ec2-23-22-110-226.compute-1.amazonaws.com:443
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Proxy-Connection: Keep-Alive
> Accept: application/xml
> 
< HTTP/1.0 200 Connection established
< 
* Proxy replied OK to CONNECT request
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* 	subject: E=root@ip-10-98-59-17,CN=ip-10-98-59-17,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
* 	start date: Feb 27 05:30:45 2013 GMT
* 	expire date: Feb 27 05:30:45 2014 GMT
* 	common name: ip-10-98-59-17
* 	issuer: E=root@ip-10-98-59-17,CN=ip-10-98-59-17,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
* Server auth using Basic with user 'qgong+1'
> PUT /broker/rest/domains/bingobongo HTTP/1.1
> Authorization: Basic cWdvbmcrMUByZWRoYXQuY29tOjExMTExMQ==
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: ec2-23-22-110-226.compute-1.amazonaws.com
> Accept: application/xml
> Content-Length: 147
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------7f17e29ca364
> 
< HTTP/1.1 100 Continue
< HTTP/1.1 100 Continue
< HTTP/1.1 200 
< Date: Mon, 04 Mar 2013 05:13:54 GMT
< Server: Apache/2.2.15 (Red Hat)
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17
< X-OpenShift-Identity: qgong+1
< X-OAuth-Scopes: session
< X-UA-Compatible: IE=Edge
< ETag: "7ccc1fa5dc458dd7c96aad299de6d3ea"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 6e664d41d3b15a951d6a96066326fc11
< X-Runtime: 10.374310
< X-Rack-Cache: invalidate, pass
< Status: 200
< Content-Length: 11047
< Content-Type: application/xml; charset=utf-8
< Vary: Accept-Encoding,User-Agent
< Strict-Transport-Security: max-age=15768000
< ProxyTime: D=11017145
< 
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <type>domain</type>
  <data>
    <domain>
      <id>honkabonka</id>
      <suffix>dev.rhcloud.com</suffix>
      <links>
        <link>
          <rel>Get domain</rel>
          <method>GET</method>
          <href>https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/honkabonka</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>List applications</rel>
          <method>GET</method>
          <href>https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/honkabonka/applications</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Create new application</rel>
          <method>POST</method>
          <href>https://ec2-23-22-110-226.compute-1.amazonaws.com/broker/rest/domains/honkabonka/applications</href>
          <required-params>
            <param>
              <name>name</name>
              <type>string</type>
              <description>Name of the application</description>
              <valid-options/>
....

Comment 7 JBoss JIRA Server 2013-03-19 18:42:41 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-13666

verified on PROD (which was freshly deployed today) and could not reproduce it. Thus resolving this issue.

Comment 8 JBoss JIRA Server 2013-03-19 18:42:47 UTC
Andre Dietisheim <adietish> updated the status of jira JBIDE-13666 to Resolved

Comment 9 JBoss JIRA Server 2013-04-10 11:37:03 UTC
Stefan Bunciak <sbunciak> updated the status of jira JBIDE-13666 to Closed

Comment 10 JBoss JIRA Server 2013-04-10 11:37:03 UTC
Stefan Bunciak <sbunciak> made a comment on jira JBIDE-13666

Verified in JBoss Developer Studio

Version: 7.0.0.Alpha2
Build id: Alpha2-v20130407-2320-B135
Build date: 20130407-2320


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