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:
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.
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