/srv/irclogs.ubuntu.com/2017/05/30/#cloud-init.txt

=== sambetts_ is now known as sambetts
smoserlarsks, i'm sorry to bother you.13:49
smoserhttps://bugs.launchpad.net/cloud-init/+bug/169242413:49
ubot5Ubuntu bug 1692424 in cloud-init "util.py[WARNING]: Failed to disable password for user centos" [Undecided,Incomplete]13:49
smoserthat has audit.log there now, and it does seem to say that 'passwd' is being denied. can you at least confirm that ?13:49
larskssmoser: that looks like what it is saying, yes.  I'm not sure that's a cloud-init bug, though.  I wonder if someone modified the image and neglected to re-label the filesystem?13:51
larsksI am pretty sure that cloud-init (both 0.7.5 and 0.7.9) are in use under EL7 without this problem cropping up.13:51
larsksI wonder if Anil can share the image that is resulting in this issue?13:53
=== rangerpbzzzz is now known as rangerpb
smoserlarsks, yeah. thanks.14:04
smoserwhat is "neglected to re-label the filesystem"14:05
smoser?14:05
larskssmoser: applying correct selinux labels to filesystem objects.  E.g., if you replace a file, the new file will probably not have the correct selinux labels.  There are various of ways of addressing that...14:07
larsksE.g., the 'virt-customize' command has a --selinux-relabel option.14:07
smoser thanks14:07
larsksI'm going to ask Anil if we can get access to the image that is having these issues.14:07
smosergood14:07
smoseri was just going to ask if you wanted me to mess up your words (unintentionally) or if you wanted to ask yourself in the bug :)14:08
smoserthanks!14:08
blackboxswsmoser: what's the difference in actual behavior between dmi_product_name_is and dmi_product_name_matches in ds-identify? It looks shallowly that they are dupes but I bet I'm missing shellisms of case handling vs direct equality comparison15:28
blackboxswahh n/m *_matches handles globbing or regex15:30
blackboxswahh n/m *_matches handles globbing or regex:q15:32
blackboxswoops15:33
smoserright.15:40
smoserif you dont give it a shell glob, then they're equal15:40
blackboxswfeels like we could drop dmt_product_name_is as we can pass that string w/out the glob as $1  to get the same behavior as dmi_product_name_is15:43
blackboxswfeels like we could drop dmi_product_name_is as we can pass that string w/out the glob as $1 to dmi_product_name_match to  get the same behavior as dmi_product_name_is15:44
blackboxswbut maybe folks like the explicit semantic difference of the function name dmi_product_name_is versus dmi_product_name_matches15:45
smoserblackboxsw, i'im trying to launch you an instance on azure15:55
smoserhaving issues with login right now15:55
blackboxswthank you sir. that'll help a lot.15:55
blackboxswif it's too much work I can just setup an account15:55
blackboxswthen you don't have to be remote hands for me  :)15:55
smoserok. that is sorted, launching now.16:00
smoserblackboxsw, what is your preferred user name ?16:04
smosercsmith ?16:04
smoserblackboxsw, ssh csmith@chad-testing.cloudapp.net16:05
blackboxswcsmith would be perfect thx16:05
blackboxswI'm in thanks smoser16:06
smoserblackboxsw, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32462516:17
smosercould you take a review of that ?16:17
blackboxswon it smoser16:17
blackboxswstrange LP is showing no diff.  Pulling it into my local branch to check16:19
smosersee my third comment there, blackboxsw16:20
smoserThis has no merge proposal shown because of bug 169354316:20
ubot5bug 1693543 in Launchpad itself "oops when generating diff in git merge proposal" [Critical,In progress] https://launchpad.net/bugs/169354316:20
blackboxswahh interesting16:21
smoserblackboxsw, i'd just re-submit, but i dont know if it will hit it again.16:26
blackboxswit's no prob smoser . It's just 3 commits right, your 2 plus Junjie right?16:30
smoserright.16:30
smoseri'll squash them, so you can view the individual commits just as context16:31
blackboxswsmoser: what's fastest for ds-identify, reading dmi content or metadata directory? I'd expect the former , dmi from sysfs16:33
blackboxswI'm wondering why ds-identify in that branch doesn't check sysfs first and then metadata 2nd16:33
blackboxswespecially because the DMI product_name is already cached as a script var per collect_info16:36
smoserblackboxsw, looking16:38
smoserblackboxsw, http://paste.ubuntu.com/24716726/16:40
smoserthere, you're asking aobut line 202 ?16:41
smoseryou're probably right on the speed thing, since the dmi values are alreaady set16:41
blackboxswsmoser: yeah seed check should come after dmi check16:41
smoserbut the seed dir is really just a completely separate path. seed is really kind of just for testing.16:42
smoserso i guess the justification for the order is that the datasource looks in the order (seed and then dmi)16:42
smoserie, if you have seeded that datasource it wont look at the dmi data (and thus wont actually even read the metadata service)16:43
smoserrandom ... unrelated ..16:44
smoser i found out about https://repl.it/languages/python3 over the weekend.16:44
blackboxswahhh16:44
smoserit is pretty cool16:44
blackboxswso in the datasource itself, (per order of seed before sysfs) if that is an inefficient order would be want to eventually change it in both places?16:46
blackboxswboth places being ds-ident and the datasource itself16:46
smoserwell, its not inefficient as preference16:46
blackboxswahh ok16:46
smoserif you put seed data in /var/lib/cloud/ for almost any datasource, then you are basically disabling searching16:46
blackboxswahh nice on the autocomplete IDE :)16:48
smoseryeah, it even has really nice (seeming) vi keybindings16:48
blackboxswsmoser: order matters in default datasource detection right? Because ..  AliYun Ec2... because AliYun is a more specific case of Ec2 right?16:50
smoserumm.16:52
smoserso i *think* that i made it such that DataSourceEc2 will not recognize a aliyun and AliYun will not recognize Ec216:53
smoserie, aliyun does not provide the dmi platform info that Ec2 does16:53
smoser(if it did, and Aliyun was after Ec2 in the list, then that would break aliyun)16:54
=== sambetts is now known as sambetts|afk
blackboxswsmoser: finally finished the review. I've approved pending some minor fixes and I'll watch for your comments on that branch just to clarify points and my understanding of datasource order.18:04
blackboxswsmoser: that last comment you made was my understanding about the order and precedence or the datasources in the list "if it did, and Aliyun was after Ec2 in the list, then that would break aliyun".    Thank you for confirming.18:05
smoserblackboxsw, i responded to that mp. i'll make most of the changes you suggested and ask for re-rview.18:41
smoseri think if aliyun changes their platform to look like they are amazon, then t hey'd kind of have to expect that guests would all of a sunden think they were on amazon.18:42
smoserpowersj, when cjwatson said to me...18:50
smoser<cjwatson> smoser: don't have enough brain right now to work out whether it will hit it again, but you can try rescanning the repository using the API: https://launchpad.net/+apidoc/devel.html#git_repository-rescan18:50
smoserhave you looked at doing such a thing ?18:50
nacci've also foudn that resubmitting the MP works (re-propose?) it does supersede it, but you can keep the old comments18:51
smoserie, if its easy and youv'e done it before, i'd like to kicki it on18:51
smoser https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32462518:51
powersjI have not, but I would like to as that MP has generated 300+ emails to my18:51
smoseri guess i can just try re-submit18:51
powersjto me*18:51
powersjplease do :)18:51
naccit's a button int he top right, iirc18:51
powersjnot having a diff has made the CI job think it needs a review18:51
smoserdidnt fix it18:52
smoser:-(18:52
powersjok I'll look at rescan while I eat lunch in a bit.18:53
smoseri am pretty sureits because i changed Junji's name in a commit message.18:53
smoserand i suspect it wont help if we kick it another way18:53
powersjsmoser: https://paste.ubuntu.com/24717938/ you may need to try that as I don't have uber-user privs on cloud-init19:15
powersjactually I logged in as anon... that might be why19:15
powersjeffectively you would want to try this I think: https://paste.ubuntu.com/24717974/19:17
=== rangerpb is now known as rangerpbzzzz
smoserpowersj, ran that with python2.19:37
powersjsmoser: no 401 auth error?19:37
smoserit did run to completion19:38
smoserdont knwo what that means.19:38
smoserblackboxsw, i didnt realize your comment on the P_PRODUCT_NAME was from ds-identify test rather than from the datasource test19:49
smosermy response still kind of applies19:49
smoseri dont have really strong feelings19:49
blackboxswsame here smoser, just finished a reply on the MP. I don't really have strong feelings about it, I just like less duplication wherever possible19:57
blackboxswwe've combined spent way more time that needed for how on the fence I am.19:58
smoseragreed.20:06
smosercopying the variable into the unit tests ensures against future accidental breakage.20:09
smoserat least more so.20:09
smoserwe have diff at https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/324807 now20:09
smoserblackboxsw, i'm going to leave tests/unittests/test_ds_identify.py unmodified20:13
smoserin order to maintain consistency20:13
smoseri'm not opposed to a cleanup though20:13
smoser(other data there uses copied strings)20:13
blackboxsw+1 smoser20:14
blackboxswwoot visual diff20:15
smosernow i'm going to see if i break it20:15
smoserblackboxsw, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32480720:26
smoseri thin i've addressed all your feedback there20:26
smoser(other than *adding* a copy of that string)20:26
blackboxswthanks checking20:27
blackboxswsmoser: you're good on that branch thanks20:33
smosermerged. thanks.20:42
smoseroh fudge20:44
smoserwe missed one blackboxsw20:44
smoserthe settings test20:44
smoseras in why did that still pass20:45
blackboxswahh right the NonDefault20:46
blackboxswlooking20:46
smoseroh.20:47
smoserthe change was made to fix test_expected_default_network_sources_found20:47
smoserwe just now have no need for test_expected_nondefault_network_sources_found20:47
smoseras it is essentially covered now in the former20:47
blackboxswsmoser: agreed. Yeah it was only to cover non-default cloud datasources which now no longer exist.20:50
askbsmoser, ping22:02
askbsmoser, wondering if you got a chance to look into the updated for 169242422:02

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