This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1024721 - Should not fail to destroy the front-end connection for a gear at the fist time
Should not fail to destroy the front-end connection for a gear at the fist time
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: mfisher
libra bugs
: UpcomingRelease
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-30 06:16 EDT by Yan Du
Modified: 2015-05-14 19:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:27:49 EST
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)

  None (edit)
Description Yan Du 2013-10-30 06:16:58 EDT
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 14:39:10 EST
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 17:18:04 EST
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-04 20:29:45 EST
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-04 20:29:47 EST
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 02:00:58 EST
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 02:13:30 EST
Sorry for adding the wrong comment by mistake in #C5. Pls. ignore it.
Comment 7 Yan Du 2013-11-05 04:02:49 EST
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.