[08:05] It isn't immediately clear from my google searches, but how do I add a public key to my "root" user [11:24] Any suggestions on the command failing— - [mysql, -e, "GRANT ALL PRIVILEGES ON `{{ mysql_db }}`.`*` TO '{{ mysql_user }}'@'%'"] [11:25] I think its the * causing problems [11:25] I've tried escaping it with \* and the problem persists... [13:17] I'm looking at adding swap to a vm (either fedora or ubuntu). I'm currently trying to do it by using fallocate and mkswap in bootcmd, but that seems to be failing. It leaves me with a 2GB disk (before launching, I used qemu-img resize to make a much larger disk) and no active swap (it did create a file, but it was much smaller than I tried in fallocate, probably because there wasn't enough disk). Anyone have any tips? [13:43] crobertsrh, you could have cloud-init to it for you [13:46] smoser: How would I do that? (Sorry, slightly new to cloud-init) [13:46] The docs regarding this didn't make much sense to me. [13:57] crobertsrh, that is because it is not documented *at all*. :-( [13:57] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/1022 [13:57] other than that commit. [13:58] theres an example config there. [13:59] if growpart is groing your disk, then when bootcmd runs, it wont have run yet. [13:59] so fallocate might correctly be telling you no (becase at that point there *is* not any space) [13:59] but there might be .2 seconds later [14:02] smoser: Thanks. I think I got kicked toward the end of your messages. I got things up to "but there might be .2 seconds later" [14:05] Will the "swap:...." bit work with 0.7.5? Or should I try to make images with a newer cloud-init version? [14:06] crobertsrh, probably not. :-( [14:07] it wont. [14:07] That's what I was gathering. I did try that at one point...which lead me to believe that I was just unable to understand the documentation, but then I got looking into versions. Thanks for your help. [14:08] ok. so i think the reason it is not working for you is this: [14:08] * you use qemu-img to resize a disk from 2G to 10G [14:08] b.) you boot system. [14:08] c.) cloud-init runs your bootcommand with does 'fallocate 2G'. [14:08] that fails, because there is no space [14:09] d.) cloud-init (.2 seconds later or thereabouts, in the 'resizefs' module) grows the partition and runs resize2fs [14:09] e.) crobertsrh goes in and says "why does the same thing i ran in 'c' work now, but it didnt then!" [14:09] s/*/a./ [14:11] Makes sense. I think my workaround will do me fine. I'm doing fallocate, etc in runcmd, which seems to get me what I need for now. [14:11] I realize it's not ideal, but I think it will be "good enough for now". Thanks again for the help and explanation. [14:12] it should be good enough [17:11] Can I add a custom cloud-init module? (I want it to run after cc_ssh.py) [17:12] you can. you have to add it to the list though [17:14] so I would have to add to /etc/cloud/cloud.cfg, correct? [17:14] right. [17:14] and add the 'cc_xxx.py' in the right place [17:14] yeah, that would be my next question ;-) [17:14] dpkg-query --show cloud-init | grep cc_ [17:15] put it in that directory. where you see the .py [17:23] smoser: tried your recommendation [mysql, -e, "GRANT ALL PRIVILEGES ON `{{ mysql_db }}`.`*` TO '{{ mysql_user }}'@'%'"] but im still getting warnings about the * even when I put \* any recommendations? [17:26] btw: I want to sign the generated ssh host keys (obviously between key generation and sshd start) -- ideas or hints are more than welcome! [17:29] arkin, i'm not sure what you mean. its possible you have other yaml rendering un-friendly characters there. [17:29] and *yaml* is screwing you before shell gets the chance (although you've saved yourself from shell by the array) [17:30] i'd yaml.load() your config and look at what the result is [17:30] to make sure the array looks like what you think it should [17:32] ok cheers [17:32] with the array do I need to esacpe * ? [17:41] if the sql syntax and parsing becomes unbareable, could you try writing the command to a file using the write-files module where you could base64 encode the command / file contents, and then use runcmd to run "mysql < /tmp/commandfile" ? Though who knows how yaml and the shell will work with that stdin redirect. === ByPasS_ is now known as ByPasS [18:50] arkin, you'll only have to escape if its a problem to yaml [18:51] arkin, run http://paste.ubuntu.com/12557719/ [18:51] and see if the arry there is what you think you would want [18:52] if you your self correctly escaped all that on shell command line. [19:28] Is there a way I can re-run the cloud-init bits from the command line? I've tried sudo /usr/bin/cloud-init -d modules, but I'm not seeing the things I did in write_files get re-done (they did get done at boot time, but the ownership of a file was not correct. I'm trying to correct that). === crobertsrh is now known as _crobertsrh === zz_gondoi is now known as gondoi === gondoi is now known as zz_gondoi