Bug 971876 - Jenkins server can not be deleted if jenkins-client has been added in an app created from downloadable cartridge
Jenkins server can not be deleted if jenkins-client has been added in an app ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 09:31 EDT by Matej Lazar
Modified: 2015-05-14 20:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:18:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Broker log while delete jenkins sever without the patch (146.98 KB, text/x-log)
2013-06-09 07:07 EDT, Xiaoli Tian
no flags Details

  None (edit)
Description Matej Lazar 2013-06-07 09:31:44 EDT
working with web console

- Cannot reuse an old jenkins gear with my applications.
- Also cannot create new one as only one is allowed.
- Neither can delete it: "We appear to be having technical difficulties"
  namespace: mlazar
  Reference #ee36e47ca82344d85930052393acd8aa
Comment 1 Matej Lazar 2013-06-07 11:21:31 EDT
my jenkins gear uuid: fd9205fb0d7f4ca592e947b858e5a182
Comment 2 Jianwei Hou 2013-06-09 07:01:22 EDT
Do we have any more detailed information on this bug?
I wasn't able to recreate this bug, I could remove my jenkins server app. There is no 500 error or any exceptions found from broker log
Comment 3 Xiaoli Tian 2013-06-09 07:07:00 EDT
Created attachment 758722 [details]
Broker log while delete jenkins sever without the patch

Attached is the broker log without the patch, it seems it even does not go through the code in this line:
 ucart = CartridgeCache.find_cartridge(feature_name, self)

Not sure how to reproduce it.
Comment 4 Rajat Chopra 2013-06-09 12:24:09 EDT
I think these steps should be able to reproduce this issue :

1. Create a jenkins server app
2. Create an app with a downloadable framework cartridge. Add jenkins-client to the app.
3. Delete the jenkins server app
Comment 5 Xiaoli Tian 2013-06-09 22:16:27 EDT
Thanks for the information, it could be reproduced with the steps in comment 4 if REMOVING the fix, the error will be like following:

# rhc delete-app jenkinsserver2
This is a non-reversible action! Your application code and data will be permanently deleted if you continue!

Are you sure you want to delete the application 'jenkinsserver2'? (yes|no): yes

Deleting application 'jenkinsserver2' ... 
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://localhost/broker/rest/domains/domx1/applications/jenkinsserver2


The broker log is like:
2013-06-09 22:11:50.858 [FATAL] NoMethodError (undefined method `is_ci_builder?' for nil:NilClass):
  openshift-origin-controller (1.9.14) app/models/application.rb:520:in `block (3 levels) in remove_features'
  openshift-origin-controller (1.9.14) app/models/application.rb:517:in `each'
  openshift-origin-controller (1.9.14) app/models/application.rb:517:in `block (2 levels) in remove_features'
  mongoid (3.0.21) lib/mongoid/relations/referenced/many.rb:167:in `block in each'
  mongoid (3.0.21) lib/mongoid/relations/targets/enumerable.rb:163:in `block in each'
  mongoid (3.0.21) lib/mongoid/relations/targets/enumerable.rb:162:in `each_pair'
  mongoid (3.0.21) lib/mongoid/relations/targets/enumerable.rb:162:in `each'
  mongoid (3.0.21) lib/mongoid/relations/referenced/many.rb:167:in `each'
  openshift-origin-controller (1.9.14) app/models/application.rb:515:in `block in remove_features'
  openshift-origin-controller (1.9.14) app/models/application.rb:502:in `each'
  openshift-origin-controller (1.9.14) app/models/application.rb:502:in `remove_features'
  openshift-origin-controller (1.9.14) app/models/application.rb:560:in `destroy_app'
  openshift-origin-controller (1.9.14) app/controllers/applications_controller.rb:138:in `destroy'
  actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'

Verified it on devenv-stage_370 with the steps in comment 4:

Before delete jenkins server, there's one app created from downloadable cartridge having jenkins-client added:

# rhc domain show
Applications in domx1 domain
----------------------------
  jenkinssever @ http://jenkinssever-domx1.dev.rhcloud.com/ (uuid: 51b52fd5e7275508a7000001)
  ------------------------------------------------------------------------------------------
    Created: 9:45 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://51b52fd5e7275508a7000001@jenkinssever-domx1.dev.rhcloud.com/~/git/jenkinssever.git/
    SSH:     51b52fd5e7275508a7000001@jenkinssever-domx1.dev.rhcloud.com

    jenkins-1.4 (Jenkins Server 1.4)
    --------------------------------
      Gears: 1 small

  downloadphpapp @ http://downloadphpapp-domx1.dev.rhcloud.com/ (uuid: 30079494d17111e286bd22000a9ab3e6)
  ------------------------------------------------------------------------------------------------------
    Created: 9:58 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://30079494d17111e286bd22000a9ab3e6@downloadphpapp-domx1.dev.rhcloud.com/~/git/downloadphpapp.git/
    SSH:     30079494d17111e286bd22000a9ab3e6@downloadphpapp-domx1.dev.rhcloud.com

    openshift-php-5.3 (PHP 5.3)
    ---------------------------
      From:  https://raw.github.com/xltian/phptestonly/master/metadata/manifest.yml
      Gears: Located with jenkins-client-1.4

    jenkins-client-1.4 (Jenkins Client 1.4)
    ---------------------------------------
      Gears:   Located with openshift-php-5.3
      Job URL: https://jenkinssever-domx1.dev.rhcloud.com/job/downloadphpapp-build/

You have 2 applications in your domain.


Delete the jenkins server:
# rhc app-delete jenkinssever
This is a non-reversible action! Your application code and data will be permanently deleted if you continue!
Are you sure you want to delete the application 'jenkinssever'? (yes|no): yes
Deleting application 'jenkinssever' ... deleted

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