Description of problem: Previously non-scalable applications were able to have their gear sizes changed with the oo-admin-move command (as long as the application was not scalable). This functionality was changed in bug 907788. Steps to Reproduce: 1. oo-admin-move --change_district -i ose-mn01.example.com --gear_uuid 5179b245963569d76d00014d Actual results: [root@ose-br01 openshift]# oo-admin-move --change_district -i ose-mn01.example.com --gear_uuid 5179b245963569d76d00014d URL: http://devusers-namespace.ose.example.com Login: namespacedev App UUID: 5179b245963569d76d00014d Gear UUID: 5179b245963569d76d00014d DEBUG: Source district uuid: NONE DEBUG: Destination district uuid: 517898839635696a66000001 Cannot change node_profile for a gear - this operation is not supported. The destination container's node profile is medium, while the gear's node_profile is small /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.8.1/lib/openshift/mcollective_application_container_proxy.rb:1778:in `move_gear': Error moving app. Cannot change node profile. (OpenShift::UserException) from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.8.1/lib/openshift/mcollective_application_container_proxy.rb:1756:in `block in move_gear_secure' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.8.1/app/models/application.rb:1191:in `run_in_application_lock' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-msg-broker-mcollective-1.8.1/lib/openshift/mcollective_application_container_proxy.rb:1755:in `move_gear_secure' from /usr/sbin/oo-admin-move:112:in `<main>' Expected results: [root@ose-br01 openshift]# oo-admin-move --change_district -i ose-mn01.example.com --gear_uuid 5179b245963569d76d00014d URL: http://devusers-namespace.ose.example.com Login: namespacedev App UUID: 5179b245963569d76d00014d Gear UUID: 5179b245963569d76d00014d DEBUG: Source district uuid: NONE DEBUG: Destination district uuid: 517898839635696a66000001 DEBUG: Getting existing app 'devusers' status before moving DEBUG: Gear component 'jbosseap-6.0' was running DEBUG: Stopping existing app cartridge 'jbosseap-6.0' before moving DEBUG: Force stopping existing app cartridge 'jbosseap-6.0' before moving DEBUG: Reserved uid '' on district: 'NONE' DEBUG: Creating new account for gear 'devusers' on ose-mn01.example.com DEBUG: Moving content for app 'devusers', gear 'devusers' to ose-mn01.example.com Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa) Warning: Permanently added '10.0.0.15' (RSA) to the list of known hosts. Warning: Permanently added '10.0.0.16' (RSA) to the list of known hosts. Agent pid 16722 unset SSH_AUTH_SOCK; unset SSH_AGENT_PID; echo Agent pid 16722 killed; DEBUG: Performing cartridge level move for 'jbosseap-6.0' on ose-mn01.example.com DEBUG: Starting cartridge 'jbosseap-6.0' in 'devusers' after move on ose-mn01.example.com DEBUG: Fixing DNS and mongo for gear 'devusers' after move DEBUG: Changing server identity of 'devusers' from 'ose-sn01.example.com' to 'ose-mn01.example.com' DEBUG: The gear's node profile changed from medium to small DEBUG: Deconfiguring old app 'devusers' on ose-sn01.example.com after move Successfully moved 'devusers' with gear uuid '5179b245963569d76d00014d' from 'ose-sn01.example.com' to 'ose-mn01.example.com' Additional info: As discussed with rchopra in #libra
Commits pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/96df0128a5c62a780a4bdad370a435a64b423397 Bug 958249 : oo-admin-move will allow different node profile for non-scalable apps https://github.com/openshift/origin-server/commit/bffb7255bbe148607bc6289f279b492569040e1d Merge pull request #2385 from pravisankar/dev/ravi/misc-bug958249 Merged by openshift-bot
Verified on devenv_3202 1. Move the non_scalable app from small node to medium node. [root@ip-10-99-25-68 ~]# oo-admin-move --gear_uuid 518b3e6360c0d20a0e000001 -p medium -i ip-10-202-49-23 URL: http://qphp-qgong2.dev.rhcloud.com Login: qgong App UUID: 518b3e6360c0d26858000006 Gear UUID: 518b3e6360c0d26858000006 DEBUG: Option node_profile 'medium' is being ignored either in favor of destination district/container or node_profile is disabled in msg broker configuration. DEBUG: Source district uuid: 134558673785289730686976 DEBUG: Destination district uuid: 518b3cd660c0d2186d000001 DEBUG: Getting existing app 'qphp' status before moving DEBUG: Gear component 'php-5.3' was running DEBUG: Stopping existing app cartridge 'php-5.3' before moving DEBUG: Force stopping existing app cartridge 'php-5.3' before moving DEBUG: Reserved uid '5466' on district: '518b3cd660c0d2186d000001' DEBUG: Creating new account for gear 'qphp' on ip-10-202-49-23 DEBUG: Moving content for app 'qphp', gear 'qphp' to ip-10-202-49-23 Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa) Agent pid 16772 unset SSH_AUTH_SOCK; unset SSH_AGENT_PID; echo Agent pid 16772 killed; DEBUG: Moving system components for app 'qphp', gear 'qphp' to ip-10-202-49-23 Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa) Agent pid 16836 unset SSH_AUTH_SOCK; unset SSH_AGENT_PID; echo Agent pid 16836 killed; DEBUG: Starting cartridge 'php-5.3' in 'qphp' after move on ip-10-202-49-23 DEBUG: Fixing DNS and mongo for gear 'qphp' after move DEBUG: Changing server identity of 'qphp' from 'ip-10-99-25-68' to 'ip-10-202-49-23' DEBUG: Deconfiguring old app 'qphp' on ip-10-99-25-68 after move Successfully moved gear with uuid '518b3e6360c0d20a0e000001' of app 'qphp' from 'ip-10-99-25-68' to 'ip-10-202-49-23'