meena | i should be pushing my stuff to Codeberg instead of github with how unhappy Travis has been with my work | 14:20 |
---|---|---|
meena | or, you know, develop on the VM that I'm testing?? | 14:20 |
meena | okay! I have the parser and the state object in somewhat usable form | 14:48 |
meena | but now I'm already wishing I could access the Ifstate objects by name | 14:50 |
meena | I'd have to make it … iterable? | 14:50 |
meena | Also: https://github.com/igalic/cloud-init/blob/net/add-ifconfig-parsers/cloudinit/distros/parsers/ifconfig.py ← should I put me in (c) here or the FreeBSD Foundation? | 14:55 |
meena | also, i need to fix def foo(self) -> list[str]: | 15:10 |
meena | Python 3.8 doesn't seem to like that | 15:11 |
meena | Might have to use List[str]? | 15:11 |
meena | okay, 1 mypy error down, 48 to go… | 15:20 |
meena | hrm… might be easier to return {'name': Ifstate(name, ifs[name])} even if that duplicates name… | 15:24 |
* smoser learns of codeberg | 15:55 | |
=== esv_ is now known as esv | ||
meena | smoser: it's a coop. When i have money again, I'm planning to become a contributing member | 17:10 |
ananke | just a quick sanity check: when using write_files, and specifying permissions for a file to be created, will that also affect permissions for all of the intermediate dirs that may need to be created? | 18:13 |
meena | ananke: i couldn't figure it out from a quick glance at the docs. What does the source say? | 20:13 |
meena | I need some help with those mypy errors. Half of them make no sense to me. | 20:31 |
meena | cloudinit/distros/parsers/ifconfig.py:17: error: Need type annotation for "DEFAULT_IF" # why?? | 20:32 |
meena | Where's aciba when you, when I need 'em? | 21:06 |
falcojr | DEFAULT_IF: Mapping[str, Any] ... ? | 21:08 |
* meena is in #python asking important questions | 21:12 | |
* falcojr missed first half of that conversation | 21:14 | |
meena | falcojr: got rid of DEFAULT_IF completely… | 21:51 |
meena | new code: https://codeberg.org/meena/cloud-init/src/commit/0f0aaec6cb1b8318e7d859af899c06caf264170b/cloudinit/distros/parsers/ifconfig.py but now mypy is giving me lots of: | 21:52 |
meena | cloudinit/distros/parsers/ifconfig.py:91: error: Item "None" of "Optional[Ifstate]" has no attribute "flags" | 21:52 |
meena | cloudinit/distros/parsers/ifconfig.py:92: error: Item "None" of "Optional[Ifstate]" has no attribute "up" | 21:52 |
meena | cloudinit/distros/parsers/ifconfig.py:93: error: Item "None" of "Optional[Ifstate]" has no attribute "mtu" | 21:52 |
meena | errors… | 21:52 |
meena | What the heck is an attribute? | 21:52 |
meena | oh, i created private attributes… | 21:53 |
meena | no… no i didn't. | 21:53 |
meena | oh… removing that dev = None, fixes it… | 21:57 |
meena | holy shit it's finished and beautiful (please ignore the journey) | 22:01 |
meena | well, I'm down to 1 mypy error | 22:01 |
meena | phew. what a journey | 22:09 |
meena | i'm gonna un-draft this, so y'all can take a look, and make suggestions for better tests, and where to first hook it into | 22:10 |
meena | I feel like the most interesting function would be get_interfaces_by_mac() | 22:12 |
meena | also having a driver mapping would be good… | 22:13 |
Guest93 | Hello everyone. I am writing a custom datasource and for some reason the fallback None keeps being used; not sure how to test why even. In /run/cloud-init/cloud.cfg I see datasource_list: [ MINE, None]. I check in the /var/log/cloud-init.log and I see: Looking for data source in: [ 'MINE', 'None'] via packages... Then immediately on next line | 23:22 |
Guest93 | "Searching for network data source in: ['DataSourceNone']. I have my custom data source in sources/DataSourceMINE.py. But, for some reason it's not being detected. I added to to settings.py and updated ds-identify too. I also installed freshest cloud-init (22.3.3) and added my modifications and still nothing. How do I test that my actual datasource | 23:22 |
Guest93 | works as intended? | 23:22 |
meena | Guest93: what do you get when you run ds-identify? | 23:39 |
meena | sudo -H /usr/local/lib/cloud-init/ds-identify or where that is on your platform | 23:39 |
meena | and I mean: the full log | 23:39 |
Guest93 | meena: see https://0bin.net/paste/JLIBp3gA#VSyVBDTuK18Rp87jO43cpTh+Qmvt-56Qe8jyOPH3ZdT; it does find the datasource it seems. | 23:45 |
meena | Guest93: so why does cloud-init then disagree with that? What does the log say? | 23:46 |
Guest93 | meena: All that cloud-init.log tells me: https://0bin.net/paste/pBLNvg23#nA8-BmQtbbKdEdysVrvIMZCITt94HGaErr0zB+H3Xjx . When I run `cloud-init -d init` (after cloud-init clean). I do not have DEP_NETWORK though on my datasource. That may be the requirement in this case? Or, do I need to test this differently? | 23:50 |
meena | Guest93: there has to be a discovery phase before this: 2022-10-18 23:30:57,441 - __init__.py[DEBUG]: Looking for data source in: ['MINE', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK'] | 23:51 |
meena | can you run cloud-init clean -lrs # ceans logs, state, and reboots | 23:51 |
meena | when we'll get a fresh set of logs, and can get a clearer idea | 23:51 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!