-
Notifications
You must be signed in to change notification settings - Fork 10
ci: Add two NICs for test purposes #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@richm do you know if specifying two NICs can be done in |
04700aa to
4e2ed73
Compare
| {%- endraw +%} | ||
| {%- if inventory_hostname == "network" %} | ||
| {%- raw %} | ||
| tmt_hardware: '{ "memory": ">= ${{ needs.prepare_vars.outputs.memory }} MB", "network": [{"type": "eth"},{"type": "eth"}]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok for now - but it would be nice if there were some sort of configuration file (like provision.fmf) that would be in the role code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've asked about this above. This file exists but I cannot find syntax to populate it. Workflow reads memory from this file already, it would be ideal to read nics from it too. Do you know if specifying two NICs can be done in tests/provision.fmf without breaking anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example from the timesync role - https://github.com/linux-system-roles/timesync/blob/main/tests/provision.fmf
standard-inventory-qcow2:
qemu:
net_nic:
# Use qemu-system-x86_64 -net nic,model=help for a list of available devices.
model: e1000which seems a different use case - so I don't think we can use provision.fmf for this.
But that is ok - we don't need to worry about this now - but at some point in the future if we need to add something similar to another role, we may need to use some sort of config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we could use provision.fmf for this, but I think it would be a bad idea - here is the only place where the code is used in standard-inventory-qcow2:
param_net_nic_model = str(fmf_get(['qemu', 'net_nic', 'model'], 'virtio'))so we could do something like this which would not break standard-inventory-qcow2
standard-inventory-qcow2:
qemu:
net_nic:
devices: [eth, eth]but it's bad to override the format - the format is supposed to map directly to qemu command line parameters and values https://pagure.io/fork/fbo/standard-test-roles/tree/master - Flexible Metadata Format for default provisioner(s)
Supported parameters
standard-inventory-qcow2
qemu.m - RAM size in megabytes. Optionally, a suffix of M or G.
qemu.net_nic.model - Use qemu-system-x86_64 -net nic,model=help for a list of available devices.
drive - has to contain dict of additional drive(s)
drive.size - allows to specify additional drive with size in bytes (default size: 2G)
drive.path - allows to specify additional drive with custom path to its backing file (default path: /tmp)
You can open a RFE ticket to extend supported parameters according to https://qemu.weilnetz.de/doc/qemu-doc.html
|
Agreed, we can add a file similar to provision.fmf to include hardware info for testing farm. |
|
I forgot a closing curly bracket though... |
No description provided.