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

smosermgagne, a build of https://code.launchpad.net/~smoser/cloud-init/trunk.fix-networking/+merge/296272 should be landing at https://launchpad.net/~smoser/+archive/ubuntu/cloud-init-dev shortly00:37
smoser(and this one should actually build :). the previous didn't build, which was why whatever you had there would have been garbage.00:37
smoserwhats there right now will use the 'id' as the nic name. i plan to look at changing that for openstack tomorrow.00:38
ubuntu__smoser: hi, is https://bugs.launchpad.net/cloud-init/+bug/1355909 still on the radar?08:53
Odd_BlokeWell, I've been sitting all by myself in a #cloud-init on a different IRC server for a few days. :p11:24
smoserubuntu__, i would like to have that functional, yeah.13:05
=== ubuntu is now known as Guest4264
=== ubuntu__ is now known as sfriesel
=== jgrimm-afk is now known as jgrimm
TakumoHi all, how would I set hostname based on an ec2 tag in cloud-config?13:53
=== rangerpbzzzz is now known as rangerpb
smoserTakumo, nothing really helpful to that in cloud-inti.14:43
smoserare tags available inside the instance, i forget14:43
smoseri didnt think they were.14:43
TakumoI think they're available from the metadata service14:43
Takumodoesn't matter too much14:43
Takumowas just looking for a way to assign a hostname or id to use within ansible scripts14:44
Takumothought I could set the fqdn based on a tag and keep my ansible stuff agnostic of ec214:44
smoserwell you can assign te hostname via cloud-init14:54
smoserjust not via a tag14:54
smoserhttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L40814:55
GivenToCodeHi I am using ubuntu 14.04.4 with cloud-init 0.7.5 on ec2 and am having issues with ephemeral drives on various instance families14:59
GivenToCodeessentially, for the r3 family, cloud-init runs mount -a and in fstab is an entry to mount xvdb to /mnt, however for r3s the ephemeral devices don't have file systems14:59
GivenToCodethe mechanisms cloud-init provide (bootcmd) run after mount -a runs...15:00
Odd_Blokesmoser: I have a doc improvement MP open at https://code.launchpad.net/~daniel-thewatkins/cloud-init/merging-doc-clarification/+merge/295822.  If gaughen reviews and approves it, are you happy for me to merge it, or would you like to review?15:21
smoserOdd_Bloke, thats fine/15:21
smoserGivenToCode, you just want it to not do that ?15:22
GivenToCodeif it matters i am using this AMI ami-0f8bce65, which has a mount for xvdb to /mnt in fstab and fails on r3 instances15:22
smoserGivenToCode, you should be able to provide user-data that says:15:23
GivenToCodesmoser, I'm not sure what I want it to do, but it is clear cloud-init has at least one faulty assumption on ec215:23
smosermounts:15:23
smoser - [ephemeral0, null]15:23
smoser - [swap, null]15:24
smoserhttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L17415:24
smoserand if you could, file a bug against cloud-images at http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L17415:25
smoserbah15:25
smoserat https://bugs.launchpad.net/cloud-images/+filebug15:25
smoserand Odd_Bloke and his team will see if they can't make it dtrt15:25
GivenToCodesmoser, but i still do in fact want xvdb to mount to /mnt, we depend on it15:25
smoserah. ok. then you can put a filesystem on it too.15:26
smoserhold on15:26
GivenToCodebut i want it to happen after we mkfs, which we are trying to do in bootcmd but it happens after mounts it looks like15:26
smoser http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config-disk-setup.txt#L415:26
smoserthat should work.15:26
smoserdisk_setup:15:26
GivenToCodesmoser, so something like that is happening for c3s but not r3s15:28
smoserright.15:29
smoserso on amazon in most cases they provide you an ephemeral disk that already has a filesystem on it.15:29
smoserand cloud-init just says "mount that"15:29
GivenToCodeok, so if i put that in my own custom user data it'll happen for all instances no matter the family?15:29
smoserbut in this case (and on other clouds) that is not the case.15:29
smoserthis is new info to me, i've not tracked ec2 closely for quite a while.15:30
GivenToCodeok, you've been a huge help15:30
smoserGivenToCode, i'd like it to. it is possible there are bugs in it. but this is generally the path that azure takes, so something should be able to be made to work there.15:30
GivenToCodecc_disk_setup.py[WARNING]: Query against device /ephmeral0 failed15:53
GivenToCodeutil.py[WARNING]: Failed partitioning operation15:53
GivenToCodeah typo on line 915:54
Odd_Blokesmoser: Will cloudinit.readthedocs.io eventually get updated, or is there another step that needs to happen?16:40
smoserOdd_Bloke, i think so.16:51
Odd_BlokeI guess we'll find out. ;)16:54
harlowjai think its a manual refresh for that one16:54
harlowjasince afaik smoser and i are the people that can click rebuild that website16:55
Odd_BlokeAh, OK.16:55
smoserharlowja, thank you16:55
smoser:)16:55
harlowjaguess u want me to click rebuild :-P16:55
Odd_BlokeI know some RTD things update on commit.16:55
Odd_Blokeharlowja: Make it so, number one.16:56
harlowjaOdd_Bloke i don't think bzr stuff does update on commit :(16:56
harlowjai think github stuff might16:56
harlowjabut bzr is manual afaik16:56
Odd_BlokeFair enough. :)16:56
Odd_BlokeAnyway, /me --> long weekend16:56
harlowjanot allowed16:56
harlowjalol16:56
GivenToCodeis 0.7.5 the latest version for ubuntu 14.04.4?16:58
smoserGivenToCode, yes.17:05
GivenToCodehmm, how hard is it to patch? I need the fix for this: https://bugs.launchpad.net/cloud-init/+bug/131146317:29
smoserGivenToCode, thats probably not too bad. and i'd help you learn the Ubuntu SRU process if you're really looking to  learn18:00
smoser(that is me saying i'd like to help but have limited time and higher priorities at the moment... but if i can get you involved and then later possibly get you to contribute m ore, then i'd probably help you along :)18:00
GivenToCodesmoser, to be clear the bug has been fixed, i just need the new version (0.7.7) which doesnt seem to be easy to upgrade to18:02
GivenToCodeor, since it is a one liner I could manually patch my AMI but it doesn't look like the .py files are actually on disk18:03
smoserwell, you need an SRU (Stable Release Update) to get it into 14.0418:03
GivenToCodeI'd be happy to contribute, am an ASF committer, but there is some red tape with my current employer18:03
smoserthe .py files are on disk, and you *can* do that.18:03
smoserdpkg -L cloud-init | grep .py18:04
GivenToCodesmoser, oh I see, my assumption of what SRU was was wrong18:04
smoserhttps://wiki.ubuntu.com/StableReleaseUpdates18:05
smoserrharper, so what happens if i do this:18:56
smoser http://paste.ubuntu.com/16928154/18:56
smoseror this18:58
smoser http://paste.ubuntu.com/16928206/18:58
rharpersmoser: for the first, if we omit the name, I don't think we'll write out correct eni files, rather, we'd need to create our own name value if we don't use id18:59
smoserfor some reason i thoguht it might just use the current name if its not present.18:59
rharperthe latter patch makes more sense, however,  the absence of a 'name' key in the network_config will break the requirements of a type: physical dict18:59
rharpersmoser: that'd require more introspection at network_config parse-time19:00
rharperbut it could be done19:00
rharperthe name_by_mac19:00
rharperwe have for ip set link stuff would provide the values19:00
rharperI need to think a bit more about whether we can construct reasonable configs for multi-layered things (like bonds, vlans and bridges)19:01
rharperwe have at-least the rackspace /ironic case which uses bonds and vlans in the network_data.json19:01
smosermgagne, i'm pretty sure my ppa should work for you now.20:41
smoseri've tested on dreamhost and we've tested via config drive similar to what you gave20:41
smoserrharper, so i think that https://code.launchpad.net/~smoser/cloud-init/trunk.fix-networking/+merge/296272 is ready ... except for the obnoxious naming in openstack20:42
smoserwhich i really just dont feel comfortable putting in20:42
rharpersmoser: you've got merge conflicts20:43
rharperin Changelog20:43
smoserwell, just that one. i was fixing it.20:44
rharperw.r.t the id -> name , what do you suggest otherwise then?  Is your concern that users will be confused in the case that the id was tap-fasdfs23  ?20:44
smoserwell, i expect  a few things20:44
smosera.) some users saying WTH UBUNTU!20:44
smoserb.) juju charms not expecting that name or being able to predict it in any way20:45
rharpers/UBUNTU/$DISTRO_WITH_CLOUD_INIT20:45
smoserrharper it doesn't make me feel better to say "WTH SMOSER!"20:45
smoser:)20:45
rharpersmoser: right, cloud-init -> smoser20:45
rharperunderstood20:45
rharperso, totally understand a and b, so instead of cloud-init picking; I think we can just re-use what the nics were named unless 'name' exists in the network_data20:46
rharperI think that's a completely reasonable alternative that allows folks to toggle the interface name wit net.ifnames=0 or 120:46
rharperand cloud-init won't be in the way20:46
smoseryeah. then we have to search, which we're not doign right now.20:50
rharperit's the same lookup call for rename later20:50
rharperat the time of config-drive conversion20:50
rharperwe fetch the list of nics and macs, and just inject name: <current name by mac>20:50
smoseryeah. i think so.20:52
smosermgagne, so your input would be appreciated. really should be fixed.20:58
mgagnewill test right now20:58
smoserok i have to go afk, but will check in later, and maybe try to do the last change there for openstack nic names.20:58
harlowja"WTH SMOSER!"21:30
harlowjalol21:30
mgagneit's not working. cloud-init thinks my interfaces are named after the link id (found in interfaces.d). After running ip link, they are still named ens3 and ens4.23:50
mgagnehostname is still not set, user scripts not run, etc.23:50
mgagneI had to reboot the instance in single mode to debug and read logs23:51

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