Skip to content
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

Add the ability to un/plug vnetX devices to anvil-manage-server-system. #740

Open
Tracked by #707
digimer opened this issue Sep 19, 2024 · 5 comments
Open
Tracked by #707
Assignees
Labels
3.1 Priorities enhancement High To be resolved once all urgent issues are clear Pending Test

Comments

@digimer
Copy link
Member

digimer commented Sep 19, 2024

This is a frequently used task with a lot of our users, we need to add support for it to the UI. Once the back-end is done, hand over to @ylei-tsubame for UI integration.

@digimer digimer added enhancement High To be resolved once all urgent issues are clear 3.1 Priorities labels Sep 19, 2024
@digimer digimer added this to the 3.1 Beta - blockers milestone Sep 19, 2024
@digimer digimer mentioned this issue Sep 19, 2024
10 tasks
@digimer
Copy link
Member Author

digimer commented Oct 20, 2024

The back-end is ready for testing.

@digimer
Copy link
Member Author

digimer commented Nov 18, 2024

Confirmed manually to be working.

@digimer
Copy link
Member Author

digimer commented Nov 18, 2024

For the tests, call anvil-manage-server-network --server <server_uuid> --mac 52:54:00:aa:bb:cc --unplug and then wait for the output from virsh dumpxml <server_name> to show:

    <interface type='bridge'>
      <mac address='52:54:00:aa:bb:cc'/>
      <source bridge='ifn1_bridge1'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <link state='down'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>

Key is <link state='down'/>. Then call again with --plug and wait for that to either change to <link state='up'/> or for the link state element to disappear.

@fabbione
Copy link
Member

bouncing back to devel. The tool only works on the node where the VM is running.

[root@an-striker01 ~]# anvil-manage-server-network --server an-test-deploy1 --mac 52:54:00:c2:cc:1a --unplug
Asked to unplug an interface from: [an-test-deploy1] but there was a problem parsing the definition file. More details are likely in the logs.
[root@an-striker01 ~]#
logout
Connection to an-striker01 closed.
[root@an-phy01 ~]# ssh an-a01n01
Last login: Wed Dec 25 06:32:54 2024 from 192.168.122.1
[root@an-a01n01 ~]# anvil-manage-server-network --server an-test-deploy1 --mac 52:54:00:c2:cc:1a --unplug
About to unplug the interface: [vnet0] -> [52:54:00:c2:cc:1a] -> [an-test-deploy1].
Successfully unplugged the interface: [vnet0] -> [52:54:00:c2:cc:1a] -> [an-test-deploy1].
Done!
[root@an-a01n01 ~]# anvil-manage-server-network --server an-test-deploy1 --mac 52:54:00:c2:cc:1a --plug
About to plug in the interface: [vnet0] -> [52:54:00:c2:cc:1a] -> [an-test-deploy1].
Successfully plugged in the interface: [vnet0] -> [52:54:00:c2:cc:1a] -> [an-test-deploy1].
Done!
[root@an-a01n01 ~]#

@fabbione
Copy link
Member

just to clarify, most tools are able to operate on a server as long as they are executed on one of the nodes. I don´t expect all tools to work from striker, but proper errors need to be displayed across. There is a major inconsistency here that makes writing tests rather challenging, as a consequence also admin an anvil can become complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.1 Priorities enhancement High To be resolved once all urgent issues are clear Pending Test
Projects
None yet
Development

No branches or pull requests

3 participants