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

harmw_I have no idea how the current/latest fbsd stuff works out for c-i09:44
=== harmw_ is now known as harmw
harmwit's been quite a while09:44
=== smoser` is now known as smoser
smoserharlowja, i do not remember any specs per say on updating metadata.  I'm not sure whether or not the MD gets updated if you add a device or not (in the openstack metadata service)14:18
smoserbut i have said before, attempting to do  dynamic interface over config drive is really just stupid, and should not be attempted.14:19
harlowjasmoser ya, the shitty part is that we have folks here who poll the metadata stuff to see when it changes17:48
harlowjaand instead if said polling turned into 'wait for event that configdrive ejected and reinserted' that'd at least avoid polling17:49
smoseryou can't just pull a disk from a guest17:49
smoserand expect that that wont up upset something17:49
smosertry it, just yank your disk from your mac. see what happens.17:49
smoserits *not* a sane event mechanism.17:50
harlowjak17:50
smoserwhat would change in the md ?17:50
harlowjamacs don't have disks17:50
harlowjalol17:50
harlowjamy mac runs off pixie dust17:50
harlowjalol17:50
harlowjaobviously17:50
smoserwell, pry it open, get something to dissolve the glue, then rip it out17:50
harlowjalol17:50
smoserwhat would change in the md ?17:51
harlowjaso the guys here alter the instance users via it apparently17:51
harlowjaand apparently that works17:52
harlowjahttp://lists.openstack.org/pipermail/openstack-dev/2016-June/097705.html17:52
harlowjaand it appears u can update said stuff, which is werid17:52
harlowjanot sure why nova allows updating that stuff and having it be reflected17:53
harlowja(abuse waiting to happen)17:53
harlowja(maybe its one of those bug-features, lol)17:54
harlowja(that snuck in)17:54
harlowjaanyways, i'm not super-attached to that, the guys here have 'used this feature' (for better/worse), ha17:55
harlowjait just does raise the question, how do things that change get reflected in the instance (long polling metadata, repeated polling ... blah blah)17:58
harlowjasmoser how does amazon do this, just repeated polling?18:00
smoseri completely disagree with "abusing nova"18:04
smosermetadata is dynamic. config drive should not be.18:04
harlowjabut config-drive has equivalent of metadata in it18:04
harlowjaaka its a mirror of metadata18:04
harlowjaso then its a bad equivalent of the metadata service18:05
smoseryes18:05
smoserweb services are read/write and dynamic18:05
harlowjaya, so then maybe config-drive needs to be dumber18:05
smoserdisks are read/write and dynamic, but i dont think you really want to deal with that.18:06
harlowjaand not contain a full mirror18:06
smoseri really think basically config drive should provide you with networking information that is guaranteed static18:06
smoserand tells you where you can get dynamic information18:06
smoserwrt disks being read/write and dynamic...18:07
smoserone could argue that since disks *are* read/write, then the guest should be able to modify the contents of metadata by updating a key in the json and writing the new file18:07
harlowjaya, so it either is accepted that its not a full equivalent, orrr it is mutated into being that18:07
smoserand the host should have to deal with that18:07
harlowjaright, the pull the disk solution18:08
smoserbut that woudl be more insane than posting events through a iso9660 filesystem18:08
smoser(i was suggesting guest tells host, and host tells guest...18:08
smoserie, bi-directional18:08
harlowjasounds like a qemu-metadata-agent would be better than18:08
harlowjawhich then is pretty much the metadata service18:09
harlowjalol18:09
smoserright.18:09
smoserexcept for web services do not poll well18:09
smoseras you suggested18:09
smoserbut long-poll may be acceptable18:10
smoseri hadnt thought of metadata changing18:10
harlowjaya, i wasn't  really aware this was a feature, ha18:10
harlowjauntil i tried it, lol18:10
smoserbut for other events such as hotplug or remove of a disk or network, you do get an event sent to the guest18:10
smoserwhich it can respond to18:10
smoserideally the networking information in the MD woudl get updated18:11
harlowjaright, so its not like it would be impossible to do the eject metadata disk/cd18:11
harlowja(if full parity is really wanted)18:11
harlowjait might just be weird (ie for windows)18:11
harlowja(and the program doing something with that disk needs to be written so that it can have the disk drop at anytime..)18:11
smoserwhat happens if you eject while the guest is doing a read ?18:12
smoseror has it mounted.18:12
smoserand thus has whatever flag in that cdrom there is that says "no thank you" to the eject button18:12
harlowjaya, that sucks18:12
harlowjalol18:12
smoserthere are solutions to this, and those solutions should be used.18:12
smoser ie, etcd or zookeeper18:13
smoseror fancier stuff like that.18:13
harlowjaya18:13
harlowjanova is weird18:13
harlowjalol18:13
harlowjain that this feature exists, people started using it, but it is pretty shoddy lol18:13
harlowjaand half-parity and half...18:13
harlowjaopenstack is weird18:17
harlowjaha18:17
smoserthe nova metadata service really should not be used as a replacement for zookeeper or etcd and the like.18:23
smoseri do agree that that is a bit of abuse.18:23
smoseri think its sane to expect metadata to change in it.18:23
smoseri think its *insane* to expect config drive to change18:23
harlowjak18:24
harlowjaya, the feature parity of what is config-drive and what is not then i think needs to happen18:24
smoserharlowja, i didn't know of pythonn -m json.tool18:30
smoserthats nice18:30
smoserrharper, ^ . that is easy pretty print of json18:31
smoserharlowja, yeah, you need etcd or zookeeper.18:32
smoseror probably one of 30 different other solutions18:33
harlowjaya18:33
harlowjasomething like that18:33
smoserand then...18:33
smoserin full openstack style18:33
smoseryou should suggest a project to run that as a service18:33
harlowja:)18:35
rharpersmoser: nice18:47
smoserharlowja, so in rhel/centos18:56
smoserwe're not currently writing any .link files for renaming18:57
smoserbut i tihnk you do write the 70-persistent-net files18:57
smoseris that right ?18:58
harlowjaya, i do write it18:58
smoseri jsut realized that on ubuntu, we're writing those .link files, but they will [almost] never be read.18:58
smoseror respected at least18:58
smoseras cloud-init then reads the config drive information and renames them himself.18:58
harlowjaya, i also noticed that the team here is injecting dns searchdomains into the old eni format18:59
harlowjaand it appears neutron doesn't put those in yet18:59
smoser?19:00
harlowjait only appears to put in the nameservers, but not the searchdomains (and there is ongoing/idle/dead? work in neutron to fix this)19:00
smoseroh.19:00
smoserso your openstack declares networking in the old ENI format way19:00
harlowjaya, which does look for search domains19:05
harlowjait appears the network_data json stuff doesn't have that, lol19:05
harlowjahttps://bugs.launchpad.net/neutron/+bug/110864419:05
harlowjanot implemented (yet)19:06
harlowjaso ummm, ya, oops19:06
harlowjaand afaik the old renderers will use that if its avail19:06
harlowjawhile the newer ones may or may not19:07
harlowjaha19:07
harlowjahttps://code.launchpad.net/~harlowja/cloud-init/cloud-init-dns-sysconfig/+merge/297817 at least uses it if it exists (which in openstack case it won't, lol)19:07
harlowjapretty sure the eni renderer already uses it (if it exists)19:07
harlowjasmoser also, something we need to cleanup is the 2 eni parsers that now exist, lol19:07
harlowjapretty sure i can just use the better one and delete mine, lol19:08
smoseryeah. i think so. get rid of yours. as the other is pretty good at thsi point.19:10
harlowjaya19:18
satherwhen making a custom module, why is #cloud-config needed at the top of the injected user-data to 'activate' the module?20:14
smosersather, custom module ?20:32
=== gfidente is now known as gfidente|afk
sathersmoser: cloud-init directive21:00
satherhttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/config/cc_foo.py21:01
smoserif you provide cloud-config via user-data, it must start with #cloud-config (or in a multipart archive, it must be type cloud-config)21:01
satherbuilding off of ^^21:01
smoserin order for a moulde to be run, though, it has to be listed in the /etc/cloud./cloud.cfg21:02
smoserthey're not discovered.21:02
satherhmm21:02
satherPassing it as user-data though will get it to run?21:03
sather(assuming it has #cloud-config as first line of the file)?21:04
smoserno.21:06
smoseryou cannot really pass in config modules21:06
smoseryou *can* pass in 'handlers'21:06
satherok, that's what I'm doing21:06
sathersorry for the confusion21:06
smoserwell, i dont knwo that you are.21:06
smoser http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/part-handler-v2.txt21:08
smoserthat is a part handler21:08
smoseryou can pass it in as user-data.21:08
satherok no21:09
satherI'm passing a yaml-formatted text file21:09
satherwith #config-data on top21:09
smoserright.21:09
satherI have a custom cc_do_something.py module in my /usr/lib/python/site-packages/cloudinit/config21:09
satherdirectory21:09
satherwhen the user-data text has the key `do_something:` it runs that module21:10
satherso it's not a part-handler21:11
smosersather, right. it doesn't work like that.21:12
smoseryou have to enable your module21:12
smoserby adding it to one of the sections (cloud_init_modules, cloud_config_modules, or cloud_final_modules)21:13
smoserthen cloud-init will run it and feed it the whole config21:13
smoserwhich you can do whatever you want with21:13
satherinteresting. I'm not sure how this is working then21:14
satherI kind of re-implemented cc_write_files.py because I have to use a specifically formatted yaml file and can't prepend the necessary info for write_files21:15
satherbut it seems to work without touching /etc/cloud/cloud.cfg21:15
sather(original question was escaping #cloud-config at the top of the injected user-data)21:16
satherby 're-implemented' I mean I just used cc_foo.py as a base and wrote to a file using the value from cfg['key']21:18
satherwithout using cloudinit.util21:18

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