Hide Forgot
Description of problem: It's failed to detect the subaccount which has applications with its 'updated_at' field in mongodb also is one week ago by rhc-admin-delete-subaccounts. Version-Release number of selected component (if applicable): devenv_4067 How reproducible: always Steps to Reproduce: 1. Add capacity to your rhlogin oo-admin-ctl-user -l $user --allowsubaccount true --inheritgearsize true --addgearsize c9 2. Create a subaccount curl -k -X POST -H 'Accept: application/xml' -H 'X-Impersonate-User: $subaccount' -d id=$subdomain --user $user:$password https://ec2-50-17-83-185.compute-1.amazonaws.com/broker/rest/domains 3. Create an application as subaccount curl -k -X POST -H 'Accept: application/xml' -H 'X-Impersonate-User: $subaccount' -d name=c1 -d cartridge=php-5.3 -d gear_profile=c9 --user $user:$password https://ec2-50-17-83-185.compute-1.amazonaws.com/broker/rest/domains/$subdomain/applications 4. Update the value of 'updated_at' of the subaccount to a week ago in mongo # mongo openshift_broker_dev > db.cloud_users.update({"login":"$subaccount"},{$set:{"updated_at":"$time"}}) for example: db.cloud_users.update({"login":"c9sub"},{$set:{"updated_at":ISODate("2013-06-01T02:46:45.185Z")}}) 5. On broker, run oo-admin-delete-subaccounts rhc-admin-delete-subaccounts -l $user -v Actual results: Summary of one week old subaccounts for user 'chunchen': Total : 0 Deleted : 0 Failed : 0 Unprocessed : 0 SUCCESS Expected results: Should detect the subaccount even if it has applications by rhc-admin-delete-subaccounts Additional info:
Fixed in https://github.com/openshift/li/pull/2199 Output will be the same, minor change in the wording. Now it will say: "Summary of one week old subaccounts without any applications for user <user-name>:"
Commits pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/79055e608cf284db36c62cb30503e57a54237932 Bug 1034141 - Minor wording change in rhc-admin-delete-subaccounts script https://github.com/openshift/li/commit/b1989e43f1dc581b1f0db2ccd8154aba6b7e2328 Merge pull request #2199 from pravisankar/dev/ravi/bug1034141 Merged by openshift-bot
Verified on devenv_4084 Message is now updated, Steps are as bug description. [root@ip-10-243-34-113 ~]# rhc-admin-delete-subaccounts -l jhou -v Summary of one week old subaccounts without any applications for user 'jhou': Total : 0 Deleted : 0 Failed : 0 Unprocessed : 0 SUCCESS