On Thu, Jan 05, 2012 at 10:47:15AM +0000, Guido Trotter wrote: > On Thu, Jan 5, 2012 at 10:25 AM, Guido Trotter <[email protected]> wrote: > > On Tue, Dec 20, 2011 at 4:17 PM, Iustin Pop <[email protected]> wrote: > > > >> > >> Guido, wouldn't it make more sense to re-generate the config entirely? > >> It's anyway under our control, so doing that seems to me more safe than > >> sed'ing it. > >> > >> Otherwise the patch is good, just wondering. > >> > > > > Sure, either works, I'll check if I have all the information needed > > and regenerate it there. :) > > > > Ah, now that I recheck not having all info is indeed the reason why I > didn't do the rewrite. > _WriteConfigFile requires also a block_devices input, which then > requires fiddling with bdev and such to populate it correctly, and I > didn't want to have to do that just for ballooning an instance.
You mean, you don't have the data in the RPC call? If so, then LGTM as is. On the other hand, if the data is there, just abstract the bdev mangling code away into a separate function and do a clean regen… iustin
