szatox wrote:I did try debug, and it did help... A bit. I learned I do have eth0, so kernel is good enough for now. I also learned I don't have some pci devices.
I intentionally left out balloon, but my disk is missing too. I'll have to fix this one.
I wonder why there is no echo while typing commands though. Do you intentionally disable it? Just curious.
Meanwhile, I pulled net.net instead of net.static by mistake.
Once I fixed that, I it turned out netdev is still being autodetected by net.py. My interface names differ between machines, and also it stubbornly tried to pull configuration form /sys even though I already defined ip, gw and nic.
After disabling interface name and config checks I got stuck on error "net_device must be set". ugrd prints out this variable with empty value, even though I have set it in config (as a global one at the moment, right next to ip and gw, before any [headers] ). I could have broken this one with too nuclear @disabler though, since I went ahead and blocked _process_net_device as well as _validate_net_device.
It's like INI but in most ways stricter. The main gotcha is defining things under the wrong section
Yeah, and that's the gotcha that's bugging me.
I do like the part about all configs being similar to each other. Using module configs as reference does make things easier.
echo is not intentionally disabled, I'm not sure what would cause that. I've seen that only when using plymouth.
The net module needs a good bit of work; it's mostly a proof of concept at the moment. I think as you've pointed out, the validation only makes sense for hostonly cases. The network portion needs a mac address or something to use for configuration at runtime, since the interface names aren't very reliable.
At the very least, you'll need to ensure net_device_mac is set. I'll look into it and make sure the user can set that, and honestly it may make sense to have that as a cmdline option.
As a side note, the _process functions are kinda magic, they are called whenever that variable is set. This change could probably exist as a check here:
https://github.com/desultory/ugrd/blob/ ... net.py#L13 because if the process portion is entirely skipped, the net_device_mac never gets set (unless the user sets it). Part of the consideration is the processor should update the mac if something weird happens, like the specified interface is defined twice in the config, or redefined.
I _think_ this should fix it:
https://github.com/desultory/ugrd/pull/251
edit:
https://github.com/desultory/ugrd/pull/252 this should fix the rest, with the static module checking that net_device is set while it should check for net_device_mac.
I really need test coverage for the network stuff, but I think that would require setting up some sort of server to try to talk to the vm (pretty complex compared to current tests)
And yes, I want config to be easy to approach, and the modules being configured the same way a user would manage config makes it feel very cohesive to me. Writing a module is kinda just like a config extension in that sense. That also means a user could reasonably read most of the module toml definitions, especially since I try to document them well. I've been considering writing a custom toml parser to read the modules and use the comments as the description in the config markdown bits. This also means a user can override just about any module setting, by design. At it's core, I want the project to mostly be a framework, so any "opinions" on the routine/flow of the build process can be changed as much as the user would like.