/srv/irclogs.ubuntu.com/2020/02/04/#cloud-init.txt

_NiCIf I have an existing user 'debian' in my image, and in /etc/cloud/cloud.cfg I have system_info: -> default_user: -> name: debian, will the settings from cloud.cfg not be applied because the user already exists? Because the settings there are not applied. :-\ (debian 9, cloud-init 0.7.9-2)10:08
_NiCoh, perhaps it's skipped because I'm specifying another user in my user-data, and not also explicitly telling it to create the default user as well?10:23
meena_NiC: perhaps! is the user from user-data created?12:40
_NiCmeena, yes. and I didn't have "- default" listed under users:12:40
_NiCmeena, so from what I could gather, that meant to *not* care about the default_user as defined in cloud.cfg. So when I added "- default" it worked as expected again. :)12:41
meena👍12:41
_NiCWhen running the openstack create command, you get sent back an 'adminPass' though, and I tried to figure out if that could be injected somehow, but not easily it seems, so I ignored that as well. I have my custom user, so it's all good. :)12:42
brandor5hello everyone: we've got a pipeline that builds custom cloud images for openstack... I've added centos8 support and I'm having trouble with adduser for our custom user... on all the other builds stamping in an updated cloud.cfg that replaces the centos user with our user works ok, but with centos8 it doesnt... that user never gets added and our pipeline fails... any ideas on whats going on?14:07
hetiiHello14:11
hetiiI have a vmware instance where I spawn by terraform rancheros. The issue is that in this environment DHCP is disable so I need to provide network configuration. The question is should I do this by metadata or by cloud-config? What happens if I have defined in both? with one is taken?14:13
onklmapsHi :) I want to deploy some cloud servers at Hetzner. I plan to run 3-4 PrestaShops on them. I think nginx+php-fpm is the best and then a separate mysql server. So my question: does anyone have a good cloud-init-file for nginx + php-fpm that would be suitable for running prestashop? PHP 7.2 is needed14:26
_NiConklmaps, my knowledge of cloud-init is pretty limited, but I suspect you don't want to try to do *all* of your config using cloud-init14:41
_NiConklmaps, rather use cloud-init to get a good base, and use something else to configure the rest. (such as ansible, puppet, chef, or similar)14:41
onklmapsAhh. That makes sense.. You know any good base for nginx + php-fpm?14:42
_NiCI'm not familiar with prestashop either, but unless its requirements are very specific, any standard setup should work14:44
_NiCif you need high performance etc etc you should probably look into various forms of caching, but that's a topic for another channel I think.. :-)14:44
onklmapsIt's pretty standard, yes..I have some custom things that needs to go into the server block, but other than that its pretty standard14:44
onklmapsYeah - caching... I know.. It's a big subject14:45
onklmapsI just installed nginx as reverse proxy in front however. I might do static cache there?14:45
_NiCthat's possible14:46
onklmapsPrestaShop is much easier to set up with apache.. I might just serve the prestashops using apache + php-fpm, then use nginx reverse proxy with static cache in front14:47
onklmapsWhat you think?14:47
_NiCNot sure I have an opinion about that :-)14:52
wyoungonklmaps: I think php is a bad idea.15:19
blackboxswhey folks. let's do this....17:23
blackboxsw#startmeeting Cloud-init bi-weekly status17:23
meetingologyMeeting started Tue Feb  4 17:23:28 2020 UTC.  The chair is blackboxsw. Information about MeetBot at http://wiki.ubuntu.com/meetingology.17:23
meetingologyAvailable commands: action commands idea info link nick17:23
blackboxswmorning, afternoon and evening folks. Time for another cloud-init community status meeting17:23
blackboxsw#chair rharper17:24
meetingologyCurrent chairs: blackboxsw rharper17:24
blackboxsw#chair Odd_Bloke17:24
meetingologyCurrent chairs: Odd_Bloke blackboxsw rharper17:24
blackboxswCoud-init upstream uses this meeting as a platform for community updates, feature/bug discussions, and an opportunity to get some extra input on current development.17:24
blackboxswThe next scheduled status meeting is always listed in the topic of this channel, so feel free to drop in on next session if you miss this one17:24
blackboxswwhile we're at it I'll update for next status meeting.17:25
=== blackboxsw changed the topic of #cloud-init to: pull-requests https://git.io/JeVed | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting February 16 17:15 UTC | 19.4 (Dec 17) drops Py2.7 : origin/stable-19.4 | 20.1 (Feb 18) | https://bugs.launchpad.net/cloud-init/+filebug
blackboxsw2 weeks from today, same bat time, same bat channel17:26
blackboxswOur previous meeting minutes line here:17:26
blackboxsw#link https://cloud-init.github.io/17:26
blackboxsw*live here* rather17:26
blackboxswthe topics we cover in this meeting are the following: Previous Actions, Recent Changes, In-progress Development, Community Charter, Upcoming Meetings, Office Hours (~30 mins).17:27
blackboxswnew topics or intejections are always welcome17:27
blackboxsw#topic Previous Actions17:27
blackboxswFrom last meeting we had no unresolved actions so we can jump to the next section17:27
blackboxsw#topic Recent Changes17:27
blackboxswfound from tip of master with    `git log --since 01/21/2020`17:29
blackboxsw    - sysconfig: distro-specific config rendering for BOOTPROTO option (#162)17:29
blackboxsw      [Robert Schweikert] (LP: #1800854)17:29
blackboxsw    - cloudinit: replace "from six import X" imports (except in util.py) (#183)17:29
blackboxsw    - run-container: use 'test -n' instead of 'test ! -z' (#202)17:29
blackboxsw      [Paride Legovini]17:29
blackboxsw    - net/cmdline: correctly handle static ip= config (#201)17:29
blackboxsw      [Dimitri John Ledkov] (LP: #1861412)17:29
ubot5Launchpad bug 1800854 in cloud-init "BOTOPROTO handling between RHEL/Centos/Fedora and SUSE distros is different" [Medium,Triaged] https://launchpad.net/bugs/180085417:29
blackboxsw    - Replace mock library with unittest.mock (#186)17:29
blackboxsw    - HACKING.rst: update CLA link (#199)17:29
ubot5Launchpad bug 1861412 in cloud-init (Ubuntu) "cloud-init crashes with static network configuration" [Undecided,Fix committed] https://launchpad.net/bugs/186141217:29
blackboxsw    - Scaleway: Fix DatasourceScaleway to avoid backtrace (#128)17:29
blackboxsw      [Louis Bouchard]17:29
blackboxsw    - cloudinit/cmd/devel/net_convert.py: add missing space (#191)17:29
blackboxsw    - tools/run-container: drop support for python2 (#192) [Paride Legovini]17:29
blackboxsw    - Print ssh key fingerprints using sha256 hash (#188) (LP: #1860789)17:29
blackboxsw    - Make the RPM build use Python 3 (#190) [Paride Legovini]17:29
ubot5Launchpad bug 1860789 in cloud-init (Ubuntu) "ssh_authkey_fingerprints must use sha256 not md5" [Undecided,Fix committed] https://launchpad.net/bugs/186078917:29
powersjthought we were going to use pastebin :P17:29
blackboxswheh, that is a good point (I wondered if anyone would call me on that)17:29
blackboxsw#link https://paste.ubuntu.com/p/3jQdKZVPcM/17:30
blackboxswgenerally speaking, dropping use of six since our code based is not python3-only, tooling dropping py2,  sysconfig rendering flavors for opensuse, doc fixes and read the docs fixups17:31
blackboxswthanks all for the contributions over the last couple weeks17:32
blackboxsw#topic  In-progress Development,17:32
blackboxsw#topic  In-progress Development17:32
blackboxswAny existing PRs are up for review at the following url:17:32
blackboxsw#link https://github.com/canonical/cloud-init/pulls17:33
blackboxswgenerally speaking we are in the 'long tail' part of a couple of feature-sets:17:33
blackboxsw* we are trying to wrap up tooling for our automated CI,  publishing processes and documentation for the shift to github from launchpad17:34
blackboxsw* we are in progress on cloud-init handling network hotplug  for a couple of datasources17:34
blackboxsw* in progress on boot speed improvements for various platforms17:35
blackboxswWe also recently validated and released cloud-init v 19.4.33 to Xenial, Bionic and Eoan  (1/9/2020)17:36
ahosmanMSFTHi @blackboxsw I'm no longer in the provisioning team, but there's an urgency for the cloud test to be resilient. Have you looked at those issues, I can dedicate as much time as needed to this. If you have time, can we tackle this today?17:38
blackboxswthere are also a number of PRs in flight for FreeBSD,NetBSD, OpenSUSE and CentOS that need attention so we can better enable those distros17:38
ahosmanMSFTazurecloudtest that is17:38
blackboxswhi ahosmanMSFT I can spend some time on office hours here to peek more at it. my individual runs didn't hit the timeouts again, so we might need a reproducer cmdline from you in a new bug maybe?17:39
ahosmanMSFTSo your able to run all tests successfully without timeout and image not building>17:39
blackboxswahosmanMSFT: but yes I can spend a little time on this today. and I think ultimately we'll have to find the tox command line that exhibits this error. I'll go checkout my test run again and see. I don't think I saw the failure. but I might be invoking tests differently than you17:40
ahosmanMSFTblackboxsw: hmm that's interesting, thanks let me know17:41
blackboxswsame here ahosmanMSFT, can you file a bug with the traceback you see and the tox cmdline you are running?17:41
blackboxswthen I know exactly what to look for17:41
ahosmanMSFTSure, will do now17:42
blackboxswcool.17:43
blackboxswok next topic17:43
blackboxsw#topic Community Charter17:43
blackboxswok this section is reserved to raise general community work/goals.17:43
blackboxswAt last cloud-init summit we raised a couple of general themes of improvements cloud-init would like to achieve17:44
blackboxswThese themes fell into two categories for this year: datasource documentation updates and cloud-init json schema validation for the 50+ config modules in cloudinit/config/cc_*py  so that we can better raise user-config errors and remove some of cloud-init's "sharp edges"17:45
blackboxswwe converted a number of these feature requests in into bugs which can be searched here:17:45
blackboxsw#link https://bugs.launchpad.net/cloud-init/+bugs?field.tag=bitesize17:46
blackboxswtasks in this list should be fairly easy one-time bugs for folks with a little time available to help improve cloud-init.17:46
blackboxswwe'll revisit this set of bugs/features and the community charter goals near the end of 2020 at the next cloud-init summit17:47
blackboxsw#topic Office Hours (next ~30 mins)17:47
blackboxswthis time is spent with cloud-init upstream dev eyes on this channel for any cloud-init feature, bug  or implementation discussions. In the absence of such discussions, we'll review the active PRs to try to tidy up the review queue and unblock developers17:48
blackboxswfor the moment, I'll look over some Azure test timeouts ahosmanMSFT is seeing17:49
blackboxswany other topics, concerns, bugs, questions are welcome and someone should be around to field them17:49
blackboxswahosmanMSFT: so timeouts running integration tests, you said you are getting them about half the time?17:50
ahosmanMSFTblackboxsw: Yes, I tracked it down to platforms/instance._wait_for_system18:48
ahosmanMSFTI invoke it after initializing vm in platform/azurecloudtest/instance.start18:49
ahosmanMSFTwhen removed, everything works as expected18:49
ahosmanMSFTlooks like it's needed for cloud tests so thought I'd leave it to you, since I don't know how ec2/lxd/... rely on18:50
powersjahosmanMSFT, can you file a bug please with the cli example?18:50
powersjthat would help us triage and make a proper decision on what change to make18:50
ahosmanMSFTpowersj, yes, was in the middle of that side tracked by meeting. On it now18:51
powersjthanks!18:51
blackboxswaaaand, I should probably wrap the meeting for the day.19:07
blackboxswThanks all for the time and energy you put into improving cloud-init! See you next time, or anytime in between19:08
blackboxsw#endmeeting19:08
meetingologyMeeting ended Tue Feb  4 19:08:14 2020 UTC.19:08
meetingologyMinutes:        http://ubottu.com/meetingology/logs/cloud-init/2020/cloud-init.2020-02-04-17.23.moin.txt19:08
ahosmanMSFTblackboxsw, powersj: submitted the bug https://bugs.launchpad.net/cloud-init/+bug/186192119:27
ubot5Ubuntu bug 1861921 in cloud-init "cloud tests ssh time out" [Undecided,New]19:27
powersjahosmanMSFT, can you give us the full CLI you are using to launch?19:28
ahosmanMSFTsure19:29
ahosmanMSFTpowersj: added full log to the bug19:36
powersjahosmanMSFT, perfect thanks19:36
ahosmanMSFTpowersj: I found it most reproducible when going Idle19:37
ahosmanMSFTfor some reason that repro's it for me, for example launching the tests then checking on something else outside the vm where I am running it19:39
powersjahosmanMSFT, "reproduce this is by going idle." what do you mean by that?19:39
meenai missed another one!20:31
meenathis time my excuse is that I'm visiting family in Ireland20:31
rharpermeena: =)20:34
ahosmanMSFTpowersj, I run cloud tests on a vm, so when not on the vm it's self , ie use the browser. It typically hit's that time out error. This doesn't occur though when removing that wait function.20:35
rharperhrm, do you think the VM itself is suspending ?20:35
rharperthe wait has a timeout which is likely what it's hitting20:36
rharperif you remove the timeout, then when the VM resumes, it just continues executing20:36
rharperwhen you resume, the VM time will catch up, that will trip timers , ie, if you've suspeneded for longer than the 300 seconds, then when it resumes the timer expires immediately20:37
rharperahosmanMSFT: can you confirm that if you stay active in the VM that it does not fail ?20:37
rharperalternatively, launch an Ubuntu instance in Azure; and run cloud-tests from within the Azure instances (instead of a local VM)20:38
ahosmanMSFTThis was on a ubuntu VM in Azure, rharper20:39
ahosmanMSFTbut, yes, it's less likely to happen when staying on VM20:39
rharperquite strange20:39
rharperit still smells like some sort of suspend20:39
rharperyou could spawn some other cpu bound task  in the background  ?20:40
blackboxswmeena: you have to disavow all family  and friends like the rest of us... that's the only way this is going to work ;)21:13
blackboxswyeah ahosmanMSFT my full ci tests against azure are still running and I'm not seeing any of those failures yet. but I'm running from an Ubuntu lxc on Ubuntu host OS. If memory serves you may be running on an Ubuntu lxc running on an OSX host system?   How the 'vms' behave on OSX when focus shifts to other services (like browsers etc) could likely be the culprit21:17
blackboxswand I'd follow rharper's suggestion of "alternatively, launch an Ubuntu instance in Azure; and run cloud-tests from within the Azure instances (instead of a local VM)"21:18
rharperblackboxsw: I think ahosmanMSFT is doing that21:19
blackboxswoops just read that21:19
rharperblackboxsw: I suppose we could try that21:19
rharperbut still not sure what "going idle" means from that perspective21:19
blackboxswsure I can kick off an instance to do that. I was just thrown by the "browser" comment21:20
rharperrunning from within a screen/tmux or something else21:20
rharperblackboxsw: as was I21:20
ahosmanMSFTit's more random than anything21:20
ahosmanMSFTssh timeout21:20
rharperso I suspect there's still something else tooling-wise were missing21:20
rharperahosmanMSFT: sure, but there are really only two causes here;  1) bad connection between the cloud_test client and target instance  2) the instance is taking longer than the timeout to boot up to ssh21:22
rharper(1) and (2) can be intermittent21:22
ahosmanMSFTI agree, but the second is usually not the case. It usually never goes pass the boot time out of 300s21:23
blackboxswjust looking over those pastes more closely, I *am* running basically the same command as ahosmanMSFT : .tox/citest/bin/python -m tests.cloud_tests run --verbose   --os-name bionic  --data-dir results --preserve-data --platform azurecloud21:25
rharperahosmanMSFT: do we not have the console-log configured ?21:27
ahosmanMSFTrharpher: can you elaborate21:27
rharperserial_console_log_blob_uri21:28
ahosmanMSFTthat should be created21:28
rharperlooks like we enable the serial console, so cloud_tests should capture the serial-console log on failure21:28
rharperI'd like to see the serial console log of the failing instance21:28
rharperand comparing the failing serial-console log to the passing one likely will reveal some differences which may explain what's going on21:29
blackboxswI'm also a bit surprised to see  a 3:45 min gap between the following logs21:29
blackboxsw2020-02-04 19:11:03,628 - tests.cloud_tests - DEBUG - image not found, launching instance with base image21:30
blackboxsw2020-02-04 19:14:44,950 - tests.cloud_tests - DEBUG - executing "wait for instance start"21:30
ahosmanMSFTThat is stored in a storage account in your resource group when running, but the resource group is deleted after the cloud-tests21:30
blackboxswin my runs, typically that gap should only be around the time to launch and get a response back from Azure API. which is about 30 seconds on 'az vm create'21:30
rharperahosmanMSFT: ah you mentioned that bug;  we should dump the value before tearing down21:31
rharperblackboxsw: the compute_client.images.get() may be taking a long time21:32
ahosmanMSFTpreserve should keep it, but it doesn't working on fixing that too21:32
blackboxswahosmanMSFT: I think --preserve-instance and --preserve-data should keep that around post failure21:32
rharperdepending on the REST query; I've seen *long* REST calls to list of images21:32
blackboxswhrm :/21:32
rharperthough 3 minutes seems excessive21:32
ahosmanMSFTOut of three of these bugs, the current biggest flaw isn't even the timeout, it's that images aren't created properly due to azurecloud/image._img_instance staying None despite re-assignment, but this is more on my side, but can use your help. As the ssh timeout isn't 100%, this issue is.21:33
ahosmanMSFTthe preserve call should be a simple fix21:33
ahosmanMSFTssh timeout I think is more machine/system dependent now that I'm seeing your not getting it21:34
rharperahasenack: the default timeout is 300, it would be a terrible thing to bump that on azure platform to say 600 and see if that runs more reliabling to completion21:35
ahasenackahosmanMSFT: ^21:36
ahasenack:)21:36
rharperahasenack: sorry21:36
ahasenacknp :)21:36
rharperlack of extra tab21:36
ahosmanMSFTrharper: I agree, I don't think timeout is the issue21:38
ahosmanMSFTdefault timeout that is21:38
ahosmanMSFTrharper, blackboxsw: Are you still in today?22:07
rharperyep22:07
ahosmanMSFTMind taking a look at azurecloud/image._img_instance22:08
ahosmanMSFTit's not re-assigning correctly, which means images don't build correctly22:08
ahosmanMSFTit works on ec2, right?22:09
ahosmanMSFTI placed some print statements and it stays instantiated as None22:09
rharperahosmanMSFT: sure, do you have more details on "images aren't created properly due to azurecloud/image._img_instance staying None";22:10
ahosmanMSFTrharper: yes...22:12
ahosmanMSFTso when cloud-tests starts it hit's image.py checks if there is an image and if there isn't it creates one via streams parameters. Then in the next test it checks, is there a clean image, in our case the variable that specifies this never changes and always stays None for some reason22:13
ahosmanMSFTbecause of that, it always launches a base image, not a clean image22:14
ahosmanMSFTwhich negates the whole image process22:14
ahosmanMSFTof creating a clean image for all future tests22:14
rharperahosmanMSFT: are you specifying a cloud-init.deb or is one getting built ?22:15
ahosmanMSFTOne get's built, looking at the code, seems to be abstracted22:16
ahosmanMSFTThe fault comes when _img_instance is used in snapshot, it never passes the initial conditional22:16
ahosmanMSFThttps://paste.ubuntu.com/p/nwgm8KjXJk/22:16
ahosmanMSFTrharper22:17
rharperahosmanMSFT: just looking at some differences, in azurecloud/image.py:_instance(),   you call platform.create_images(); but you don't start it;22:24
ahosmanMSFTrharper: hmm I changed it and added some logging and still get that it's None22:27
ahosmanMSFThttps://paste.ubuntu.com/p/VPgqXZXkkX/22:27
rharperahosmanMSFT: so, if it's not started, then when snapshot gets called there's not self._img_instance set and it returns the AzureCloudSnapshot() rather than doing the boot clean script and such22:28
ahosmanMSFTrharper: running again, I'll show you the logs and all the logging I added when trying to debug22:30
ahosmanMSFTI modified _instance(), as shown above22:31
rharperright, so the call path goes from platform.get_image() -> AzureCloudImage() -> platform.get_snapshot() -> snapshot.launch();  where you create an instance, but don't start it either ()22:31
ahosmanMSFTrharper: that might be it, I didn't spot that22:33
ahosmanMSFTI'll make the change and run it again, keep you update22:33
rharperyeah, I'm just walking through cloud_tests/platforms/__init__.py  cloud_tests/bddeb.py:setup_build() and comparing platform/ec2/* to platform/azurecloud/*22:34
ahosmanMSFTare you running this in a container22:34
rharperno, I'm just reading the code22:40
ahosmanMSFTI mean where the tests are run22:41
rharperno, just under tox on an jenkins node;22:43

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