[07:54] <Sonia_> Hi , need help in cloud-init ?
[08:01] <kwadronaut> Sonia_: please state your question and stick around.
[08:02] <kwadronaut> formulating your question often already helps understanding the problem
[08:02] <kwadronaut> and people are not always behind their keyboards, so asking for the question, doesn't mean people stick around until it is there.
[09:57] <Sonia_> sorry , yesterday I put my question and got no response till today morning, hence realized if there is no one in the chat , and if time is out , question gets deleted 
[09:58] <Sonia_> my question on cloud-init is , how we can re-run cloud-init without rebooting the VM .....and in the same process give another user-data to it. (not the one initially executed by cloud-init)
[10:02] <kwadronaut> ah i see it now if i scroll up...., you could add any local data in /var/lib/cloud/?
[10:09] <Sonia_> I was doing following steps to re-run cloud-init :
[10:10] <Sonia_> 1. rm -rf /var/lib/cloud/insance*
[10:10] <Sonia_> 2. run cloud-init init , cloud-init modules --mode init/config/final
[10:10] <Sonia_> these will run it with the same user-data which I supplied at the time of VM provisioning
[10:28] <Sonia_> but in between if I try to give my own, doenst work
[10:53] <harmw> you could also fetch the userdata using curl, just to make sure it got updated properly on the infra-side (beeit openstack or whatever platform you're running)
[11:48] <Sonia_> I used config-drive here ,and user-data gets to the VM successfully and gets executed.
[11:48] <Sonia_> when i re-run cloud-init , it again gets the user-data from config-drive 
[12:47] <kwadronaut> i see a typo in your rm -rf, a t has gone missing in the instance
[12:48] <kwadronaut> well, if you want to use different data/source, that needs to be changed too of course?
[13:43] <smoser> Sonia_, you can use 'ci-tool' as a friendly-ish way to "seed" data.
[13:44] <smoser> http://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool
[13:44] <smoser> it also has 'reset' which will clean out the state in /var/lib/cloud
[13:45] <smoser> Sonia_, also, if you're just wanting to quickly iterate on testing things... lxc can provide a really nice way to do that.
[13:45] <smoser> http://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool
[13:45] <smoser> oops.
[13:45] <smoser> http://ubuntu-smoser.blogspot.com/2013/08/lxc-with-fast-cloning-via-overlayfs-and.html
[14:14] <Sonia_> thanks smoser for the link , I will certainly look at the tool
[14:14] <Sonia_> my use case is that , initially coud-init will work with user-data supplied during provisioning time 
[14:15] <Sonia_> just that at later point of time , want to re-run cloud-init without rebooting the VM with a different user-data script.
[14:15] <Sonia_> kwadronaut , sorry for the typo in the chat , during testing , 't' is there 
[14:16] <smoser> Sonia_, why do you want to do that ?
[14:16] <smoser> ci-tool would help you accomplish it, but curious.
[14:16] <Sonia_> kwadronaut , so if I want a different data source after the VM is provisioned, can  I change it later point of time ?
[14:17] <Sonia_> well , I dont want VM to do all the initial configurations .....running them again may wipe out many settings done
[14:19] <Sonia_> smoser , shouldnt these steps work too ? 
[14:20] <Sonia_> 1. clean out /var/lib/cloud 2. run cloud-init init 3.  replace the user-data script with out own in the instance/ directory 4. run cloud-init modules --mode init/config/final
[14:21] <smoser> no. it probably wont work.
[14:21] <smoser> i'm sorry, i can't really help now.
[14:21] <Sonia_> no problem , I will try ci-tool
[14:23] <Sonia_> smoser , is there a way to change the data source also ?
[14:24] <smoser> sure. its configurable.
[14:24] <smoser> in ubuntu 'dpkg-reconfigure cloud-init'
[14:25] <smoser> dpkg-reconfigure or ci-toolw ill adjust etc/cloud/cloud.cfg.d/90_dpkg.cfg
[14:27] <Sonia_> ok , I am on RHEL
[14:30] <Sonia_> hope I can still change the configurations.
[16:57] <kwadronaut> smoser: awwww. that lxc link is promising!
[16:58] <smoser> kwadronaut, yeah, its nice.
[16:58] <smoser> on ubuntu, you can also snapshot quickly with btrfs (or lvm if you wanted).
[16:58] <smoser> the big feature really was the "clone hook" to allow you to pass in user-data on the clone rather than create.
[18:27] <sauce> smoser you the man
[18:27] <smoser> thanks
[18:27] <smoser> :)
[20:24] <Sonia_> smoser , I may need help with ci-tool 
[20:26] <Sonia_> so first i ran ci-tool reset , which removed instance and instances/ directory for me.
[20:45] <Sonia_> post that , I am trying to seed data using the command , "ci-tool seed -s nocloud /opt/my-user-data"
[20:56] <Sonia_> then I run cloud init again by "ci-tool run"
[20:57] <Sonia_> correcting my earlier command : "ci-tool seed /opt/SJuser-data"
[20:57] <Sonia_> running ci-tool again doesnt execute the new user-data file , any mistake I am doing here in using the tool ?