/srv/irclogs.ubuntu.com/2017/01/23/#cloud-init.txt

=== Hazelesque_ is now known as Hazelesque
=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
smoserAhrotahntee, you can't (unless you are using 'nocloud') provide metadata. the general line is that 'metadata' comes from the cloud provider, and userdata comes from the user.14:23
smoserbut then further, yeah, there is no way to easily reference those things generically from inside a config or environment or anything.14:23
Ahrotahnteesmoser: once the environment is up I have no problems (it's just a json object), I was just really hoping I could bake it into the config14:30
Ahrotahnteeoh well; I'll figure something else14:30
smoserwhat is it that you ant to bake in ?14:33
smoseri'm kinda confused on what your goal is..14:33
ajorgGood morning. I just filed https://bugs.launchpad.net/cloud-init/+bug/1658734 but I'm happy to cook a patch for it if I can get a hint about how you'd prefer to see it resolved. At the very least what you'd like the config option to be called. I'm thinking a top-level list `dns_redirect_ips: []`, but if there's another top-level section it should live under17:01
ajorgI'm happy to entertain that notion.17:01
ajorgAlso, apologies for not upstreaming more of our (AWS) patches yet.17:02
* ajorg makes some excuse about being "busy" or something.17:02
ajorgsmoser: looks like the feature was your work? https://git.launchpad.net/cloud-init/commit/cloudinit/util.py?id=1bb67be517:05
smoserajorg, i dont think i unerstand what 'dns_redirect_ips' would do17:10
smoser(the bug is well written, and shows you've done homework, thank you)17:11
ajorgWould set the global _DNS_REDIRECT_IP (or otherwise get that into the method) to the provided list, so that we can set it to an empty list to disable the feature.17:16
ajorgsmoser: it would be a slightly opaque way to disable the feature, but it would also add the ability for users to set that list.17:20
smoserhm..17:22
ajorgexactly the initial reaction i thought i'd get, which is why i thought i'd ask before proposing a patch17:22
smoseryeah, and it'd mean that a config  module or somethign woudl have to set the value of that variable17:23
smoser(and then each time cloud-init ran it would have to set it too).17:23
smoserie, that code doesnt have easy access to the full config17:24
ajorga bit ugly, for sure. i wasn't sure what you had in mind when you added the global.17:24
smoserwell the global is really just to keep it from being re-done on per call17:24
smoserso you should only see 3 queries to your dns server, rather than N*3 in17:25
ajorgah, right... duh17:25
smoser results = [x for x in mynames if is_resolvable(x)]17:25
smoserhmm.17:27
smoserid ont have a good s olution of the top of my head.17:28
smosermultiple things use is_resolvable, and generally its nice to protect against stupid dns hijacking even though it should not really ever be used in a "real cloud"17:28
ajorgtotally agree, just someone ran into this IDS problem17:29
ajorgI can patch it to just disable the feature, but I'd rather not, now that our repositories are open for anyone to use outside of EC2 (since we made a public docker container of Amazon Linux).17:34
smoserids ?17:36
ajorgintrustion detection system17:37
ajorgapparently some of them alarm on suspicious DNS queries17:37
ajorgand these (or at least the random ones?) can get flagged as suspicious17:37
ajorgsmoser: shall i pass in the list, and use the global if the passed parameter is None?17:44
smoserwell, where woul dyou change the callers ?17:45
smoserin ec2 you probably hit that code in cloudinit/config/cc_apt_configure.py and cloudinit/sources/DataSourceEc2.py17:45
ajorgall of the callers should at least have access to on-disk config (except _is_resolvable_url, but it can also take that parameter and pass it on)17:46
ajorgit's also hit when deciding if it can talk to the instance metadata service, sadly17:46
smoserand cloudinit/sources/DataSourceOpenStack.py even17:46
ajorgyup17:47
smoserso here is what i dont like...17:48
smoserubuntu makes images available for download on cloud-images.ubuntu.com17:48
smoserif someone downloads that and uploads a new ami from it it should work well17:49
smoserbut you're telling me unless we changed the default value to not do this searching, then your IDS would flag an instance from that image.17:49
smoserbut if the image is used on some non-cloud, it makes good sense to have that.17:50
smoserthe end result of all of that above is i dont like "fix this by disabling it in specific cases"17:50
ajorgEC2 doesn't have an IDS that alarms at customers, but some customers have their own.17:50
ajorgSo I'm totally fine with leaving this on by default, but some customers will need to be able to disable it.17:51
ajorgRight now the only way to disable it is to patch the sources.17:51
ajorgI'd like to provide a way to disable it from the on-disk config, so we can tell specific customers how to do that (and document it, of course).17:53
smoserok. thats more acceptable.17:54
ajorgcool. sorry it wasn't obvious that's what i wanted.17:54
smoserso as it is right now, i think we hit that code even if we pass an ip address in17:55
smoserright ?17:55
ajorgyeah, that's true17:55
smoserwe could make is_resolvable not do this if it is an ip address.17:55
smoserwhich would mean that ec2's search and openstack's search would not do it.17:55
smoserthe  mirror searches still would17:55
ajorgbut making it skip IPs would make cloud-config user-data effective at controlling it17:56
ajorgdo you want a disable_it config or a i_know_my_redirect_ips config?17:56
ajorgi'm confident either would satisfy my needs17:59
smoseri think disable it would be better really.18:01
ajorgk, i'll take another look at the code and try to come up with a proposal18:07
ajorgmight be a while as i'm juggling a few things (as always)18:07
=== shardy is now known as shardy_afk
smoserlarsks, https://code.launchpad.net/~larsks/cloud-init/+git/cloud-init/+merge/31527620:27
smoseryou see that just by running 'nosetests' ?20:27
larskssmoser: I did, yes.20:27
smoserreally odd that i've never seen it.20:28
smosertox just runs nosetests20:29
larsksIf you'd like, I can write up a reproducer and add that to the lp issue.20:29
smoserother than in a virtual env, and with 'python -m nose' but i was under the impression those were the same, and in ubuntu build process we use nosetests too20:29
smoseryou think its more than just a ordering thing ?20:29
smoseri really do suspect its an issue, i'm just kind of wondering why i've never see it.20:30
larsksI'm not sure.  Let me see if I can reproduce somewhere other than on my F25 system.20:30
larsksMight be a couple of days, but I will update the lp issue with the results.20:31
powersjwould be interesting to see your CLI and versions.... https://paste.ubuntu.com/23853943/20:31
larsksWill do.20:31
smoserlarsks, is that python27 or python3 ?20:32
larsksThat was python3, I think.20:32
smoseri think probably we should be httpretty.activate decorating the individual test methods in tests/unittests/test_datasource/test_gce.py20:57
smoserlike tests/unittests/test_datasource/test_openstack.py and tests/unittests/test_ec2_util.py:20:57
smoserrather than the class like is done in tests/unittests/test_datasource/test_gce.py20:58
smoserOdd_Bloke, do you have thougths on above ?20:58
smosermuch of the httpretty stuff is currently blame'ing to you (just thats why i'm asking... blame in a git way,  not 'blame' in a bad way)20:58
smoserhm.. and as i look further, 33e1f251 which basically changes to activating on the class.20:59
smoseryeah, thats what does it... looking at the http pretty code21:02
smoser https://github.com/gabrielfalcao/HTTPretty/blob/master/httpretty/core.py#L116921:02
smoserlarsks, well,, looking at that httpretty code, it sure looks like its trying to decorate individual methods21:27
smoserso i can't explain how ou'd see this.21:28

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