arkin | It isn't immediately clear from my google searches, but how do I add a public key to my "root" user | 08:05 |
---|---|---|
arkin | Any suggestions on the command failing— - [mysql, -e, "GRANT ALL PRIVILEGES ON `{{ mysql_db }}`.`*` TO '{{ mysql_user }}'@'%'"] | 11:24 |
arkin | I think its the * causing problems | 11:25 |
arkin | I've tried escaping it with \* and the problem persists... | 11:25 |
crobertsrh | 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:17 |
smoser | crobertsrh, you could have cloud-init to it for you | 13:43 |
crobertsrh | smoser: How would I do that? (Sorry, slightly new to cloud-init) | 13:46 |
crobertsrh | The docs regarding this didn't make much sense to me. | 13:46 |
smoser | crobertsrh, that is because it is not documented *at all*. :-( | 13:57 |
smoser | http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/1022 | 13:57 |
smoser | other than that commit. | 13:57 |
smoser | theres an example config there. | 13:58 |
smoser | if growpart is groing your disk, then when bootcmd runs, it wont have run yet. | 13:59 |
smoser | so fallocate might correctly be telling you no (becase at that point there *is* not any space) | 13:59 |
smoser | but there might be .2 seconds later | 13:59 |
crobertsrh | 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:02 |
crobertsrh | Will the "swap:...." bit work with 0.7.5? Or should I try to make images with a newer cloud-init version? | 14:05 |
smoser | crobertsrh, probably not. :-( | 14:06 |
smoser | it wont. | 14:07 |
crobertsrh | 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:07 |
smoser | ok. so i think the reason it is not working for you is this: | 14:08 |
smoser | * you use qemu-img to resize a disk from 2G to 10G | 14:08 |
smoser | b.) you boot system. | 14:08 |
smoser | c.) cloud-init runs your bootcommand with does 'fallocate 2G'. | 14:08 |
smoser | that fails, because there is no space | 14:08 |
smoser | d.) cloud-init (.2 seconds later or thereabouts, in the 'resizefs' module) grows the partition and runs resize2fs | 14:09 |
smoser | e.) crobertsrh goes in and says "why does the same thing i ran in 'c' work now, but it didnt then!" | 14:09 |
smoser | s/*/a./ | 14:09 |
crobertsrh | 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 |
crobertsrh | I realize it's not ideal, but I think it will be "good enough for now". Thanks again for the help and explanation. | 14:11 |
smoser | it should be good enough | 14:12 |
jtheuer | Can I add a custom cloud-init module? (I want it to run after cc_ssh.py) | 17:11 |
smoser | you can. you have to add it to the list though | 17:12 |
jtheuer | so I would have to add to /etc/cloud/cloud.cfg, correct? | 17:14 |
smoser | right. | 17:14 |
smoser | and add the 'cc_xxx.py' in the right place | 17:14 |
jtheuer | yeah, that would be my next question ;-) | 17:14 |
smoser | dpkg-query --show cloud-init | grep cc_ | 17:14 |
smoser | put it in that directory. where you see the .py | 17:15 |
arkin | 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:23 |
jtheuer | 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:26 |
smoser | arkin, i'm not sure what you mean. its possible you have other yaml rendering un-friendly characters there. | 17:29 |
smoser | and *yaml* is screwing you before shell gets the chance (although you've saved yourself from shell by the array) | 17:29 |
smoser | i'd yaml.load() your config and look at what the result is | 17:30 |
smoser | to make sure the array looks like what you think it should | 17:30 |
arkin | ok cheers | 17:32 |
arkin | with the array do I need to esacpe * ? | 17:32 |
smatzek | 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. | 17:41 |
=== ByPasS_ is now known as ByPasS | ||
smoser | arkin, you'll only have to escape if its a problem to yaml | 18:50 |
smoser | arkin, run http://paste.ubuntu.com/12557719/ | 18:51 |
smoser | and see if the arry there is what you think you would want | 18:51 |
smoser | if you your self correctly escaped all that on shell command line. | 18:52 |
crobertsrh | 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). | 19:28 |
=== crobertsrh is now known as _crobertsrh | ||
=== zz_gondoi is now known as gondoi | ||
=== gondoi is now known as zz_gondoi |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!