Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
+1Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case Razique Mahroua-Nuage Corazique.mahr...@gmail.comTel: +33 9 72 37 94 15 Le 9 janv. 2013 à 22:18, Sébastien Han han.sebast...@gmail.com a écrit :Moving instances from project to project is not possible however whatyou can do is (safe way):- as an admin user- snapshot the image from env 1- grab the snapshotted file from your glance store- import the snapshot into glance- make the image public- run the snapshot from env 2- enjoy!Cheers!--Regards,Sébastien Han.On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote:I have 2 projects in my environment:ProjectQA1: ID - 0001ProjectQA2: ID - 0002root@Controller:# keystone tenant-list+-++-+| id | name | enabled |+-++-+| 0001 | ProjectQA1 | True || 0002 | ProjectQA2 | True |+--++-+In Project 1 there are 1 instanceIn Project 2 there are 7 instancesroot@Controller:# nova usage-list+---+---+--+---+---+| Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours |+---+---+--+---+---+| 0001 | 1 | 12533.78 | 24.48 | 244.80 || 0002 | 7 | 127447.40 | 171.17 | 2100.45 |+---+---+--+---+---+Is it possible to move this instance of Project 1 for 2?root@Controller:# nova list+--+---+++| ID | Name | Status | Networks |+--+---+++| 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 |+--+---+++Move ID 9991/QA-07from: Tenant ID 0001to: Tenant ID 0002Is that possible?AttAlex VitolaSystem Administrator___Mailing list: https://launchpad.net/~openstackPost to : openstack@lists.launchpad.netUnsubscribe : https://launchpad.net/~openstackMore help : https://help.launchpad.net/ListHelp___Mailing list: https://launchpad.net/~openstackPost to : openstack@lists.launchpad.netUnsubscribe : https://launchpad.net/~openstackMore help : https://help.launchpad.net/ListHelp___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
Changed directly by the database. Not the best way but I did because it was an environment. So far I have not found any problems mysql use nova; mysql UPDATE `nova`.`instances` SET `user_id` = 'c892202c2a134b8e9f19c047f29c60ee', `project_id` = 'debd50b4ec2b4905a3296ac0f0971849' WHERE `instances`.`id` =7; att Alex Vitola 2013/1/10 Razique Mahroua razique.mahr...@gmail.com +1 Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case Razique Mahroua - Nuage Co razique.mahr...@gmail.com Tel : +33 9 72 37 94 15 Le 9 janv. 2013 à 22:18, Sébastien Han han.sebast...@gmail.com a écrit : Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
Cool! -- Regards, Sébastien Han. On Thu, Jan 10, 2013 at 11:15 AM, Alex Vitola alex.vit...@gmail.com wrote: Changed directly by the database. Not the best way but I did because it was an environment. So far I have not found any problems mysql use nova; mysql UPDATE `nova`.`instances` SET `user_id` = 'c892202c2a134b8e9f19c047f29c60ee', `project_id` = 'debd50b4ec2b4905a3296ac0f0971849' WHERE `instances`.`id` =7; att Alex Vitola 2013/1/10 Razique Mahroua razique.mahr...@gmail.com +1 Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case Razique Mahroua - Nuage Co razique.mahr...@gmail.com Tel : +33 9 72 37 94 15 Le 9 janv. 2013 à 22:18, Sébastien Han han.sebast...@gmail.com a écrit : Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
Thanks for this one. ... someone should really maintain a wiki with all the tricks that are passing through this ML! Cheers, Davide. On 10/gen/2013, at 11:15, Alex Vitola alex.vit...@gmail.com wrote: Changed directly by the database. Not the best way but I did because it was an environment. So far I have not found any problems mysql use nova; mysql UPDATE `nova`.`instances` SET `user_id` = 'c892202c2a134b8e9f19c047f29c60ee', `project_id` = 'debd50b4ec2b4905a3296ac0f0971849' WHERE `instances`.`id` =7; att Alex Vitola 2013/1/10 Razique Mahroua razique.mahr...@gmail.com +1 Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case Razique Mahroua - Nuage Co razique.mahr...@gmail.com Tel : +33 9 72 37 94 15 Le 9 janv. 2013 à 22:18, Sébastien Han han.sebast...@gmail.com a écrit : Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
Updating the DB for the project would be one step but there are other potential things to consider such as attached volumes. Building up the set of things that need to be done in the doc would be useful but eventually we need to get to an openstack command that can do this (or do the equivalent clone/snapshot function which may be more generic for other use cases such as replicating a VM/volumes for testing) Tim -Original Message- From: openstack-bounces+tim.bell=cern...@lists.launchpad.net [mailto:openstack-bounces+tim.bell=cern...@lists.launchpad.net] On Behalf Of Davide Guerri Sent: 10 January 2013 11:23 To: Alex Vitola Cc: L - OpenStack Subject: Re: [Openstack] Migrate Instance to another Tenant ID in the same environment Thanks for this one. ... someone should really maintain a wiki with all the tricks that are passing through this ML! Cheers, Davide. On 10/gen/2013, at 11:15, Alex Vitola alex.vit...@gmail.com wrote: Changed directly by the database. Not the best way but I did because it was an environment. So far I have not found any problems mysql use nova; mysql UPDATE `nova`.`instances` SET `user_id` = 'c892202c2a134b8e9f19c047f29c60ee', `project_id` = 'debd50b4ec2b4905a3296ac0f0971849' WHERE `instances`.`id` =7; att Alex Vitola 2013/1/10 Razique Mahroua razique.mahr...@gmail.com +1 Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case Razique Mahroua - Nuage Co razique.mahr...@gmail.com Tel : +33 9 72 37 94 15 Le 9 janv. 2013 à 22:18, Sébastien Han han.sebast...@gmail.com a écrit : Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp smime.p7s Description: S/MIME cryptographic signature ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
why not try boot from snapshot. That's will save some time. On Thu, Jan 10, 2013 at 5:18 AM, Sébastien Han han.sebast...@gmail.comwrote: Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp -- Lei Zhang Blog: http://jeffrey4l.github.com twitter/weibo: @jeffrey4l ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Migrate Instance to another Tenant ID in the same environment
Moving instances from project to project is not possible however what you can do is (safe way): - as an admin user - snapshot the image from env 1 - grab the snapshotted file from your glance store - import the snapshot into glance - make the image public - run the snapshot from env 2 - enjoy! Cheers! -- Regards, Sébastien Han. On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola alex.vit...@gmail.com wrote: I have 2 projects in my environment: ProjectQA1: ID - 0001 ProjectQA2: ID - 0002 root@Controller:# keystone tenant-list +-++-+ | id |name| enabled | +-++-+ | 0001| ProjectQA1 | True | | 0002| ProjectQA2 | True | +--++-+ In Project 1 there are 1 instance In Project 2 there are 7 instances root@Controller:# nova usage-list +---+---+--+---+---+ | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours | +---+---+--+---+---+ | 0001 | 1 | 12533.78 | 24.48 | 244.80| | 0002 | 7 | 127447.40| 171.17| 2100.45 | +---+---+--+---+---+ Is it possible to move this instance of Project 1 for 2? root@Controller:# nova list +--+---+++ | ID | Name | Status | Networks | +--+---+++ | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 | +--+---+++ Move ID 9991/QA-07 from: Tenant ID 0001 to: Tenant ID 0002 Is that possible? Att Alex Vitola System Administrator ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp