Ghost gears are created when deleting an application while DNS is down on Openshift Enterprise
Issue
If a scaled application is deleted during when the DNS is having issues, the app directory gets deleted from the node gears but the mongo entry does not get deleted as openshift is unable to delete the DNS entry due to DNS server failure.
I was able to replicate the issues as follows:
1.Create an app called new2
2. $rhc domain show
new2 @ http://new2-poc.example.com/ (uuid: 53586cbaf9a8d166cd000018)
--------------------------------------------------------------------
Domain: poc
Created: Apr 23 8:45 PM
Gears: 1 (defaults to small)
Git URL: ssh://53586cbaf9a8d166cd000018@new2-poc.example.com/~/git/new2.git/
SSH: 53586cbaf9a8d166cd000018@new2-poc.example.com
Deployment: auto (on git push)
php-5.3 (PHP 5.3)
-----------------
Scaling: x1 (minimum: 1, maximum: available) on small gears
haproxy-1.4 (Web Load Balancer)
-------------------------------
Gears: Located with php-5.3
3. Misconfigure /etc/openshift/plugins.d/openshift-origin-dns-nsupdate.conf and restart openshift-broker
4. "oo-accept-broker -v" shows DNS errors
5. $ rhc app delete new2
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 'new2'? (yes|no): yes
Deleting application 'new2' ... error deleting app record new2-poc.example.com
6. $ rhc domain show
new2 @ http://new2-poc.example.com/ (uuid: 53586cbaf9a8d166cd000018)
--------------------------------------------------------------------
Domain: poc
Created: Apr 23 8:45 PM
Gears: 1 (defaults to small)
Git URL: ssh://53586cbaf9a8d166cd000018@new2-poc.example.com/~/git/new2.git/
SSH: 53586cbaf9a8d166cd000018@new2-poc.example.com
Deployment: auto (on git push)
php-5.3 (PHP 5.3)
-----------------
Scaling: x1 (minimum: 1, maximum: available) on small gears
haproxy-1.4 (Web Load Balancer)ls /var/lib/openshift/53586cbaf9a8d166cd000018
-------------------------------
Gears: Located with php-5.3
7. ls /var/lib/openshift/53586cbaf9a8d166cd000018
(the app is deleted, but not the DNS record and the mongo entry)
EXPECTED:
1) Do not delete any component of APP
2) Delete the app and mongo entry notifying the user to delete the DNS entry.
NOW:
1) Configure the /etc/openshift/plugins.d/openshift-origin-dns-nsupdate.conf correctly and pass oo-accept-broker
2) $ rhc app delete new2
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 'new2'? (yes|no): yes
Deleting application 'new2' ...
Application config change did not complete on 2 gears. Please try again and contact support if the
issue persists.
3) $ 'rhc domain show'
(still shows the app.)
Environment
OpenShift Enterprise 2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
