/srv/irclogs.ubuntu.com/2015/02/18/#cloud-init.txt

=== harlowja_ is now known as harlowja_away
mhroncokhi, I've seen Python 3 patches were merged, that's great, thanks09:08
mhroncoksmoser: is there a time estimate for new release containing Python 3 support?09:11
fish_hi13:19
fish_I probably just need a nudge in the right direction but how does passing the actual arguments to cloud-init work technically? on AWS it reads the config from the UserData stuff, but where does cloud-init pulls that from on the local system?13:21
fish_is it fetching it from http://169.254.169.254/latest/meta-data/? or reading it somehow from the local instance?13:23
Odd_Blokefish_: It uses EC2's metadata server.13:28
fish_Odd_Bloke: ok.. well then my next question would be how to mock that up for testing my cloud-init configs without spinning up a new instance every time13:31
Odd_Blokefish_: I _think_ if you put stuff in /var/lib/cloud/seed/ec2 then it will be picked up; not sure on the details of what would need to go there.13:35
Odd_Blokefish_: The docs helpfully have "TBD" in that section. :p13:35
fish_Odd_Bloke: ah thanks. at least that's good enough to digg through the code :)13:36
Odd_Blokefish_: Try /var/lib/cloud/seed/ec2/user-data and /var/lib/cloud/seed/ec2/meta-data, maybe.13:36
Odd_Blokefish_: Line 54 of DataSourceEc2.py is the place to look.13:36
=== Guest49948 is now known as rcj
=== rcj is now known as Guest20952
=== harlowja_away is now known as harlowja_
Odd_Blokeharlowja_: I've added support for CloudStack password servers to cloud-init: https://code.launchpad.net/~daniel-thewatkins/cloud-init/cloudstack-passwords/+merge/25002818:16
Odd_Blokeharlowja_: bzr blame suggests you might be a good person to tag for a review. :)18:16
harlowja_uh oh, cloud-stack18:16
harlowja_:)18:16
harlowja_is there anyway u can add some tests for that18:17
harlowja_i'll add some other comments to18:17
Odd_Blokeharlowja_: Thanks! I'm about to finish my day here, so will pick them up tomorrow morning (UTC). :)18:18
harlowja_:)18:19
harlowja_kk18:19
Odd_Blokeharlowja_: The CloudStack password server is terrible; it doesn't return any HTTP headers.18:33
harlowja_:-/18:33
harlowja_sad18:33
Odd_Blokeharlowja_: It literally returns those strings.18:33
harlowja_but those are my passwords!!18:33
harlowja_haha18:33
Odd_Blokeharlowja_: Which is also why url_helper can't be used; HTTP libraries break if they don't get HTTP headers.18:33
* harlowja_ pretty sure u can tell it to send some headers in18:34
harlowja_http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/url_helper.py#L179 (headers or headers_cb there)18:34
harlowja_unless u are thinking of some other headers or somethign18:34
Odd_Blokeharlowja_: Sorry; I meant that the password server doesn't return a status line or headers.18:35
harlowja_thats a weird server, lol18:35
harlowja_seems like someone forgot to read the http spec when making that, lol18:35
Odd_Blokeharlowja_: Which means that HTTP libraries fall over when parsing the response.18:35
harlowja_:-/18:35
harlowja_weird stuff18:35
Odd_BlokeYeah, it's been a fun few days. :p18:36
harlowja_so its like a sorta-half-baked http/not-http server, lol18:36
Odd_BlokeSo we use HTTPConnection to make the request, but then go in and read straight off of the socket it created.18:36
harlowja_can u at least chop out the 'http_client.HTTPConnection' and make a little mini client that has information about this?18:36
harlowja_like a PasswordServerClient18:36
harlowja_and add docs saying this thing is weirdo, lol18:36
Odd_BlokeGood thinking.18:37
harlowja_why even use a 'http_client.HTTPConnection' ?18:37
harlowja_vs just a raw sockt18:37
harlowja_seems like its so custom that its not even http, lol18:37
Odd_Blokeharlowja_: I did try, but it did complain when the HTTP request wasn't sensible.18:38
harlowja_weird http server, lol18:38
Odd_Bloke(Hypocritically, I might add :p)18:38
harlowja_then u should reply back your http response isn't sensible iether, lol18:38
Odd_BlokeI should probably open up a bug in CloudStack.18:39
harlowja_def :-/18:39
Odd_BlokeSubject: Are you nuts?18:39
harlowja_or, don't make your own http servers (which it seems like someone did)18:39
harlowja_i'm pretty sure java has something they should of just used, lol18:39
harlowja_like one of the hundreds of http servers/libraries that probably works18:39
Odd_BlokeI'm cloning the source to see if I can find out. :p18:39
harlowja_anyway, a 'PasswordServerClient' server client mini-class would be cool, and docs saying why this is so weird would be cool :)18:40
harlowja_and links i guess to any bug or whatever u uncover18:41
Odd_BlokeWill do.18:47
* Odd_Bloke --> pub18:47

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!