Hide Forgot
Description of problem: Delete app when userid is missing will not remove the gear dir Version-Release number of selected component (if applicable): devenv_4038 How reproducible: always Steps to Reproduce: 1.Create an app. 2.SSH into the instance. 3.Remove the user of the gear in /etc/passwd on node. 4.Delete the app. 5.Check the gear dir in /var/lib/openshift Actual results: App delete successfully, but the gear dir and the link to this directory are left behind. Expected results: The gear dir and link should be removed. Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=918764
I don't think that this is a bug, because if user at some point corrupts the system it is his fault. Its the same like if you delete some record from DB and then wonder where it is. Was looking on the platform-trace.log on the node and find that the problem might be that this two problems might be related. ... November 20 11:48:37 INFO oo_spawn running userdel --remove -f "528ce61667bcd186be000032": {:unsetenv_others=>false, :close_others=>true, :in=>"/dev/null", :out=>#<IO:fd 13>, :err=>#<IO:fd 11>} November 20 11:48:37 INFO oo_spawn running setquota --always-resolve -u 528ce61667bcd186be000032 0 0 0 0 -a /var: {:unsetenv_others=>false, :close_others=>true, :in=>"/dev/null", :out=>#<IO:fd 13>, :err=>#<IO:fd 11>} November 20 11:48:37 INFO oo_spawn buffer(8/) setquota: November 20 11:48:37 INFO oo_spawn buffer(8/) user 528ce61667bcd186be000032 does not exist. So what I think is that I will let this bug opened and will fix the error handling that the user doesnt exists.
"User does not exist" is gone from platform.log/platform-trace.log Based on comment #1, move to verified.
(In reply to Liang Xia from comment #2) > "User does not exist" is gone from platform.log/platform-trace.log > > Based on comment #1, move to verified. Build is devenv_4217.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/d5ca57a638ee7e3ede7850f890d12b5f94b83620 Bug 1030777 - Remove gear dir even if gear not in passwd file
Verified on devenv_4223, the issue has been fixed. 1.Check whether new codes are there or not. # grep remove_app_symlinks /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.19.8/lib/openshift-origin-node/model/application_container.rb remove_app_symlinks(@container_dir) remove_app_symlinks(@container_dir) def remove_app_symlinks(container_dir) 2.Create apps and check gears are created. # ls /var/lib/openshift/ 52d5eba01e82d3e7fb000007 915738339324026173784064 jenkins-lxia phps-lxia 52d5ebf81e82d3e7fb000028 915738339324026173784064-lxia last_access.log 3.Remove the users of the gears in /etc/passwd on node. 4.Delete the apps. # rhc app delete phps --confirm Deleting application 'phps' ... deleted # rhc app delete jenkins --confirm Deleting application 'jenkins' ... deleted 5.Check the gear dir in /var/lib/openshift/ # ls /var/lib/openshift/ last_access.log