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

=== vrubiolo1 is now known as vrubiolo
blackboxswrharper: I think https://github.com/canonical/cloud-init/pull/232 is good to go17:40
blackboxswI believe I addressed all comments17:40
rharperblackboxsw: excellent, I'll review17:45
blackboxswok addressed thx rharper19:18
fredlef1rharper: What purpose does DataSourceNone serve?22:00
rharperit's a fallback datasource that allows cloud-init to run without a datasource22:00
rharperbasically if we could not find any datasource at all, try to do something reasonable (we still generate host keys, and other bits);22:01
rharperwe've recently had a discussion that DataSourceNone really ought to look more like NoCloud ;  https://github.com/canonical/cloud-init/pull/20322:04
fredlef1Is there any scenario where it would leave an instance in a state where it is accessible to the user? Other than cloud-init running in a non-cloud scenatio22:04
rharperfredlef1: I think it depends on the image;  if there is included cloud-config , None will return user-data/metadata from the datasource;22:07
rharpera default user is normally created, host keys are generated;   however, without a password or an imported ssh key, I don't see how a user would have access22:08
rharperthis only happens if cloud-init detected a potential datasource, otherwise, cloud-init won't run at all22:08
rharperso, in your IMDS is down scenario; we'd detect ec2 via host UUID value, and then when we called _get_data() if that failed, we'd fall through to None, which would continue to run modules/final but a stock image won't include any user-data/metadata nor fetch it from remote URLs, etc22:09
fredlef1Yes. I have seen that.  My latest builds I have been testing for our AMIs have the None datasource removed from the list of candidate datasources for that reason.22:10
fredlef1The impact of falling back to DataSourceNone is that cloud-init concludes it's dealing with a new instance22:11
rharperYes, it does do that;22:12
fredlef1DataSourceNone doesn't seem like something we should ever use after first boot22:13
rharperthe general idea of falling back to the previous DS is new;22:13
rharperfredlef1: except if you're capturing and deploying again22:14
rharperif we end up falling back to the previous ds if the current ds is not viable;  None is not very useful.22:16
fredlef1rharper: Yes, I agree. But, on the other side, the list of things that can go awfully wrong if you capture/snapshot and re-deploy without properly cleaning up various states on your instance is very long already.22:16
rharperit's harder now than it used to be;  but none-the-less, it is very common workflow22:16
fredlef1I agree. We see it everyday (both the right way and the wrong way).  Clearing up cloud-init states is what people do wrong the least often (does that sentence even make any sense?).22:18
fredlef1I'll think about it some more and update my PR later this week.22:18
fredlef1There is a way to get this right22:19
rharper=)22:19
rharperfredlef1: I'm happy with the direction you're going here22:19
rharperI've asked the vmware folks to look at your changes as well, as they have a similar scenario where they need to restore the previous instance-id on subsequent boots even if they don't have any new data (which is different than IMDS being down)22:20

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