Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1169303 - Httpd config dir of DB cartridge gear wouldn't be deleted
Httpd config dir of DB cartridge gear wouldn't be deleted
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
2.2.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
: Upstream
Depends On:
Blocks: 1169306
  Show dependency treegraph
 
Reported: 2014-12-01 04:54 EST by Gaoyun Pei
Modified: 2015-01-08 10:34 EST (History)
3 users (show)

See Also:
Fixed In Version: openshift-origin-node-util-1.32.2.1-1
Doc Type: Bug Fix
Doc Text:
Cause: Previously, watchman did not clean up empty frontend config directories for scalable DB gears. Consequence: Empty directories were left around after applications had been deleted. Fix: Watchman now removes frontend configuration directories. Result: Watchman properly cleans up after scalable database gears after an application has been deleted.
Story Points: ---
Clone Of:
: 1169306 (view as bug list)
Environment:
Last Closed: 2015-01-08 10:34:36 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0019 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.3 bug fix and enhancement update 2015-01-08 15:33:24 EST

  None (edit)
Description Gaoyun Pei 2014-12-01 04:54:12 EST
Description of problem:
When deleting an app on a node which is using vhost frontend, the httpd config files under /var/lib/openshift/.httpd.d will be deleted by frontend_plugin of watchman now.
But frontend_plugin would not delete the gear_dir when the gear doesn't have a *.conf file, such as db cartridge gear.


Version-Release number of selected component (if applicable):
2.2/2014-11-26.3
openshift-origin-node-util-1.31.3.1-1.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1.Create a scalable ruby app with mysql-5.1 embedded. These files and directories would generate under /var/lib/openshift/.httpd.d/.
The ruby+haproxy gear(547c2c19e5fed5f62e0000a6) has a httpd *.conf file and a corresponding directory. While the mysql(547c2c7ce5fed5f62e0000c6) gear only get an empty directory.

[root@node1 .httpd.d]# ls -al
...
-rw-r--r--. 1 root root     2539 Dec  1 01:51 547c2c19e5fed5f62e0000a6_domain1_0_testapp.conf
drwxr-xr-x. 2 root root     4096 Dec  1 01:51 547c2c19e5fed5f62e0000a6_domain1_testapp
drwxr-xr-x. 2 root root     4096 Dec  1 01:53 547c2c7ce5fed5f62e0000c6_domain1_547c2c7ce5fed5f62e0000c6
...


2.Delete the app. Use openshift-watchman to delete the left httpd config files.
  Set FRONTEND_CLEANUP_PERIOD=10 in /etc/sysconfig/watchman
  Change the Line 53 in /etc/openshift/watchman/plugins.d/frontend_plugin.rb as:
  "next if File.mtime(conf_file) > (DateTime.now - Rational(1, 86400))" to make the testing faster, or else need to wait for 1 hour.

3.Restart openshift-watchman service. Check the httpd files and directories agaiin. The empty dir of mysql gear still there.

[root@node1 .httpd.d]# ls -al
total 60
...
drwxr-xr-x. 2 root root     4096 Dec  1 01:53 547c2c7ce5fed5f62e0000c6_domain1_547c2c7ce5fed5f62e0000c6


Actual results:


Expected results:
All the files related to the deleted app should be removed.

Additional info:
Comment 3 Gaoyun Pei 2014-12-09 00:31:00 EST
Verify this bug with openshift-origin-node-util-1.32.2.1-1

Create a scalable app with mysql embed, check the httpd conf files under /var/lib/openshift/.httpd.d on node.

[root@node1 .httpd.d]# ls -al
total 56
...
drwxr-xr-x. 2 root root    4096 Dec  8 22:21 domainn-app3-1_domainn_domainn-app3-1
-rw-r--r--. 1 root root       0 Dec  8 22:25 domainn-app3-2_domainn_0_app3.conf
drwxr-xr-x. 2 root root    4096 Dec  8 22:22 domainn-app3-2_domainn_app3


Delete the app, set the system time to 3 days later, restart openshift-watchman service. These files were deleted.
Comment 5 errata-xmlrpc 2015-01-08 10:34:36 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0019.html

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