Bug 1024721 - Should not fail to destroy the front-end connection for a gear at the fist time
Summary: Should not fail to destroy the front-end connection for a gear at the fist time
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: mfisher
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 10:16 UTC by Yan Du
Modified: 2015-05-14 23:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:27:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yan Du 2013-10-30 10:16:58 UTC
Description of problem:

met the error "OPENSHIFT_GEAR_NAME is missing!" when first time destroy the front-end connection for a gear


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



How reproducible:
Always



Steps to Reproduce:

1. create app
2. ssh into instance
  #cd /var/lib/openshift/<uuid>/.env/
  #rm OPENSHIFT_GEAR_DNS OPENSHIFT_GEAR_NAME
3.run below cmd
a).oo-cgroup-reclassify --with-all-containers
b).oo-cgroup-enable --with-all-containers
c).oo-cgroup-reclassify --with-container-uuid <uuid>
d).oo-cgroup-enable --with-container-uuid <uuid>
e).oo-devel-node frontend-destroy -c <uuid>
f).oo-devel-node frontend-destroy -c <uuid>



Actual results:
step3  
e). 
[root@ip-10-239-13-250 .env]# oo-devel-node frontend-destroy -c 5270d4114bdb8ee197000110
5270d4114bdb8ee197000110 is missing or not a valid gear: OPENSHIFT_GEAR_NAME is missing!


f).
[root@ip-10-239-13-250 .env]# oo-devel-node frontend-destroy -c 5270d4114bdb8ee197000110
5270d4114bdb8ee197000110 is missing or not a valid gear: OPENSHIFT_GEAR_NAME is missing!


Expected results:

should not fail when first time destroy the front-end connection for a gear
will show the meassge when the second time run the command



Additional info:

get the infomation (should not fail when first time destroy the front-end connection for a gear ) from below bug :
https://bugzilla.redhat.com/show_bug.cgi?id=982403

Comment 1 Rob Millner 2013-11-04 19:39:10 UTC
A recent change in ApplicationContainer prevents the FrontendHttpServer object from implementing its internal database to lookup information on broken gears.

I'll provide a "purge" command which works around the lack of a working ApplicationContainer object.

Comment 2 Rob Millner 2013-11-04 22:18:04 UTC
Purge command added:
https://github.com/openshift/origin-server/pull/4082


Ex:
oo-devel-node frontend-purge -c rmtest-rmillner0165.dev.rhcloud.com

oo-devel-node frontend-purge -c 5278180c878c9c4046000001

Comment 3 openshift-github-bot 2013-11-05 01:29:45 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2ecbc8d7ea202dbf4586c4848bd7189d2ef88027
Bug 1024721 - Add purge functionality to the frontend plugins.

Comment 4 openshift-github-bot 2013-11-05 01:29:47 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/54e30ef3625b122dd0b820778a2f5e6f75254f81
Bug 1024721 - use the purge functionality in the frontends.

Comment 5 Yan Du 2013-11-05 07:00:58 UTC
1. For new apps on stg, all dbs can be connected normally.
2. For old apps on stg (after migration), seems some of them still have the problem:


[perlsdbjks-dystg.stg.rhcloud.com 52735fd1dbd93c7f6900001c]\> mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye



[perlsdbjks-dystg.stg.rhcloud.com 52735fd1dbd93c7f6900001c]\> psql
psql: could not connect to server: Connection refused
	Is the server running on host "52735fd1dbd93c7f6900002c-dystg.stg.rhcloud.com" and accepting
	TCP/IP connections on port 47036?



[perlsdbjks-dystg.stg.rhcloud.com 52735fd1dbd93c7f6900001c]\> mongo
MongoDB shell version: 2.4.6
connecting to: 52735fd1dbd93c7f69000038-dystg.stg.rhcloud.com:39921/admin
Mon Nov  4 21:22:53.149 Error: couldn't connect to server 52735fd1dbd93c7f69000038-dystg.stg.rhcloud.com:39921 at src/mongo/shell/mongo.js:147
exception: connect failed

Comment 6 Yan Du 2013-11-05 07:13:30 UTC
Sorry for adding the wrong comment by mistake in #C5. Pls. ignore it.

Comment 7 Yan Du 2013-11-05 09:02:49 UTC
Test on devenv_3688

Can purge a broken gear from the Frontend Http configuration by using oo-devel-node frontend-purge -c <UUID>   or 
oo-devel-node frontend-purge -c $app-url 

move bug to verified.


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