/srv/irclogs.ubuntu.com/2016/06/30/#cloud-init.txt

=== Wulf4 is now known as Wulf
=== rllu is now known as raylu
holser_smoser: Hi12:37
=== rangerpbzzzz is now known as rangerpb
smoserholser_, hey.15:05
holser_I’ve submitted 2 reviews for mcollective https://code.launchpad.net/~sgolovatiuk15:06
holser_smoser: your feedback is welcomed15:06
smosersix doesn't cover BytesIO ?15:10
smoserholser_,15:11
smoser$ for p in python2 python3; do echo $p; $p -c 'from six import BytesIO; print(BytesIO)'; done15:11
smoserpython215:11
smoserStringIO.StringIO15:11
smoserpython315:11
smoser<class '_io.BytesIO'>15:11
smosersmoser@milhouse:~/src/cirros/trunk$15:11
smoserseems to work15:11
smoserbut i'm guessin gyou tried that15:11
holser_yeah I tried15:12
smosermust be older version of six15:12
smoserthat you have15:12
smoserwhat a pita15:12
holser_I use the default version in 16.0415:12
smoserits got to be in there.15:12
holser_fresh 16.0415:12
holser_anyway, I gave the exact steps in bug15:12
holser_so you can try them with your six15:13
smoserpython3 on 16.04 most certainly can do: from six import BytesIO15:14
holser_I can do that way15:14
holser_without try:15:14
holser_just from six import BytesIO15:14
smosersee if that works on python2 though15:16
smoserits posisble configobj in python2 will not like that it gets bytes15:16
waldipossible. why do you want that?15:17
smoserwhy do i want python2?15:18
waldiwait. python2 does not have bytes15:18
smoserwell, some pytho2 do15:18
waldi>>> bytes15:18
waldi<type 'str'>15:18
waldiso no, no bytes, only str15:18
smoserright. ok.15:18
smosercould you add unit test for this ?15:19
smoseryou can rip the section out of 'handle' that does:15:19
smoser if 'conf' in mcollective_cfg:15:19
smoser ....15:19
smoserand just put that in a fuction that has 2 inputs.15:20
smoser config and output file15:20
smoserthen unit test that the file gets what you expected15:20
smoseror even that just returns a string (which you can pass to util.write_file())15:20
smoseri think if you re-factor that code a bit, it will be more easy for you do do the other mp too.15:23
smoseroh. i see that the method i mentioned would have other htings too PUBCERT_FILE, and such.15:23
=== rangerpb is now known as baude_lunch
=== baude_lunch is now known as rangerpb
=== rangerpb is now known as rangerpbzzzz
WulfHoping to get a more satisfying answer today:  I'm using cloud-init on aws ec2. I've seen in the source code, that retrieving ec2 meta data is supported. I would like to access the meta data from a userdata script written in python. Is it possible to access it without having to reinvent the wheel?19:11
smoserWulf,19:17
smoser from cloudinit import ec2_utils19:17
smoserec2_utils.get_instance_metadata()19:17
Wulfsmoser: and that is considered a public interface?19:18
smoserthat will work for 14.04 and 16.0419:19
WulfGood enough for me, thank you!19:19
WulfNow I only need to find out why I'm getting wrong data from AWS :-)19:19
WulfOdd_Bloke: and thanks to you too19:25
=== rangerpbzzzz is now known as rangerpb
=== jroll|dupe is now known as jroll
harlowjabtw, how far along is the networkd stuff for supporting systems?22:37
holser_smoser: I’ve updated review, added unit test22:39
copumpkindoes cloud-init ignore everything before #cloud-config in ec2 userdata?22:45
copumpkinI see a lot of people describe it as #cloud-config needs to be on the first line22:45
harlowjaarg, why do when i go to rebuild a cloud-init rpm and look at what redhat rpm has in it do i always find little surprises that never seemed toget upstreamed23:37
harlowja(where surprises == patches)23:38

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