[09:51] Is it possible to install i386 versions of packages via the packages: config key? I using Ubuntu 20.04 and have tried specifying the primary archive mirror with both amd64 and i386 architectures. The logs state that the apt command failed as it was unable to locate the package. [09:51] I've resorted to using `dpkg --add-architecture i386 apt ...` in the runcmd section. [14:18] I have the locale module failing for en_GB. I think it is because it is executing before the packages module attempts to install locales-all. How do I make it do that before the locale module runs? [14:18] None of the packages are installing. [14:24] eggbean: I believe that is governed by the ordering of the modules listed in /etc/cloud/cloud.cfg [14:25] minimal: Right, but I can't change that can I? [14:25] How are you supposed to change locales? [14:27] looking on a VM here, I see "locale" defined in the cloud_config_modules section and "package-update-upgrade-install" defined in the cloud_final_modules section [14:27] you could edit that fi eif you are building your own OS images [14:28] I guess the assumption is that the base OS has the locale files present [14:28] alternatively you could use a "run_cmd" to setup the locales after the package install has run [14:29] which Linux (or other OS) distro are you using? === meena1 is now known as meena [14:36] Debian [14:37] minimal: If this is the case, the locale module is pretty useless then? [14:38] This is not exactly some obscure edge case [14:38] eggbean: so it seems you have 3 options, (1) Ask Debian to add the locales to their cloud image, (2) modify the Debian image yourself to add the locale package, or (3) use "run_cmd" instead to configure the locales [14:39] eggbean: the locale module is not useless if the locale files are present - I suggest you ask the Debian Cloud Team why the locales package is not pre-installed. I make my own VM/Cloud images for Alpine Linux and specifically ensure that Alpine's locale package is preinstalled in the image for this very reason [14:40] I suppose 3 then. I was actually doing that intially, having converted my previous userdata bootstrap script to run_cmd commands, but trying to migrate that to cloud-init modules has led to all sorts of problems [14:41] perhaps the Debian Cloud team have never tested setting the locale via the cloud-init module? That would seem unlikely however [14:43] I'll just use run_cmd for now. cheers === gschanuel27 is now known as gschanuel2 [20:33] @blackboxsw: I addressed the nits in https://github.com/canonical/cloud-init/pull/1101 - Assuming travis passes this last (minor) change I don't plan on any more changes. [20:41] @holmanb should have this reviewed within the hour [20:41] thanks! [20:42] man, I really want to get onto some flag-day typing and mypy work with cloud-init. [20:42] Something to do over Christmas break :) [20:42] Indeed :) [20:45] holmanb: on first blush cloudinit.config.schema.get_jsonschema_validator docstring doesn't match return type [20:45] looking [20:45] not sure the intent of the Non in the 3-tuple returned [20:45] not sure the intent of the None in the 3-tuple returned [20:49] Ah, I remember (though I'm not sure it's the best reason in retrospect) [20:51] that's what validate_cloudconfig_metaschema() returns - it makes the return types match [20:52] which really isn't necessary, but allows the tuple assignment in cloudinit/config/schema.py:157 [21:16] thanks holmanb I'm grappling with why we are conflating the actual validation of metaschema with the the get_jsonschema_validator call in that initial try. I think I might suggest one more changeset, so, probably will wait until tomorrow for this :/ [21:19] holmanb: also, if we invoke: validate_cloudconfig_schema(strict_metaschema=True) doesn't the cloudinitValidator we return of validate_cloudconfig_metaschema have the META_SCHEMA["additionalProperties"] = False set so that all subsequent validation becomes strict a non-permissive of additionalProperties? [21:21] It can wait, no rush. [21:22] @blackboxsw - yes, that's the potential future use case - strict meta datavalidation. That isn't currently used [21:23] - yes, that's the potential future use case - strict metadata validation at runtime. That isn't currently used but I plummed through the flag in case we decide we want to turn it on in the future. [21:24] can't type today I guess [21:24] ahh " Return strict Validator and FormatChecker for use in validation" [21:25] my position was that metaschema itself would be strict if validating, but module schema would be permissive [21:25] event if we happen to also be validating metaschema. [21:26] But, this pespective can wait until we actually attempt to validate metaschema at runtime, if at all. [21:33] @blackboxsw: That makes sense. You make a good point; I wrote it that way to reuse the Validator and FormatChecker produced by validate_cloudconfig_metaschema() rather than a duplicate call to get_jsonschema_validator(), but doing that makes it less obvious what is happening there. [21:36] holmanb: no worries , I'm trying to write up the opinion on this and we can sort tomorrow if the suggestion makes sense or not. it feels like we've added a complexity in function return values and different error handling to reuse that one schema validator. And I think even if validate_meta is True, we probably should retain the original META_SCHEMA["additionalProperties"] definition was even when we return from [21:36] validate_cloudconfig_metaschema. [21:37] we might be able to still call get_jsonschema_validator once before validate_cloudconfig_metaschema and pass the validator into validate_cloudconfig_metaschema [21:37] then we don't have to have the implicit indirection [21:38] I like the simplicity of that. [21:38] and we'd also avoid trying to shoe-horn common 3-tuple return values into validate_cloudconfig_metaschema [21:39] +1 will try to form a solid suggestion on that front and see if that holds water [21:41] sounds good, thanks