network icon indicating copy to clipboard operation
network copied to clipboard

adding cloned_mac

Open 35niavlys opened this issue 3 years ago • 28 comments

First draft to add cloned-mac/MACADDR config. I do not have the skills to know if it is consistent on all types of interfaces

Tests will fail at the moment but let me know if it's far to be mergeable first

35niavlys avatar Aug 23 '22 17:08 35niavlys

Please consider signing off the commit to remove the DCO failure, https://github.com/linux-system-roles/network/blob/main/contributing.md#sign-off-your-commit

liangwen12year avatar Aug 25 '22 01:08 liangwen12year

Coverage Status

Coverage increased (+0.9%) to 43.407% when pulling b50a1d6d9c88365aa251ad20be09af5db9d35351 on 35niavlys:add_cloned_mac into 385c27420ef6a1871392f04d1442b5e23ec48766 on linux-system-roles:main.

coveralls avatar Sep 02 '22 16:09 coveralls

The unit test, integration test and example need to be added. But overall, the implementation of this feature support is quite nice.

liangwen12year avatar Sep 02 '22 17:09 liangwen12year

I will try to prepare my environment to run tests easily and add some in the following weeks but it will take a little work time

35niavlys avatar Sep 07 '22 19:09 35niavlys

[wenliang@localhost network]$ tox -e yamllint 
./tests/tests_cloned_mac_initscripts.yml
  5:81      error    line too long (82 > 80 characters)  (line-length)

You may consider to ignore the line-length check of tests_cloned_mac_initscripts.yml in .yamllint.yml file.

liangwen12year avatar Sep 15 '22 16:09 liangwen12year

[citest]

liangwen12year avatar Sep 15 '22 18:09 liangwen12year

[citest pending]

richm avatar Sep 15 '22 22:09 richm

I did small corrections on the test. Not all devices are tested, especially wifi, but I can't get the existing tests to work :(

35niavlys avatar Sep 18 '22 14:09 35niavlys

[citest]

liangwen12year avatar Sep 20 '22 11:09 liangwen12year

A nit, maybe you can also provide an example under the ./examples/ directory.

liangwen12year avatar Sep 20 '22 11:09 liangwen12year

yamllint check failed:

./tests/playbooks/tests_cloned_mac.yml
  Error: 62:81 [line-length] line too long (84 > 80 characters)
  Error: 72:81 [line-length] line too long (83 > 80 characters)

ERROR:   yamllint: commands failed

liangwen12year avatar Sep 20 '22 15:09 liangwen12year

[citest]

liangwen12year avatar Sep 21 '22 12:09 liangwen12year

[citest]

liangwen12year avatar Sep 22 '22 15:09 liangwen12year

[citest]

BaseCI has to be triggered this way.

liangwen12year avatar Sep 22 '22 18:09 liangwen12year

[citest]

BaseCI has to be triggered this way.

I well understood but I don't see how my changes cause this error, I will check later

35niavlys avatar Sep 22 '22 19:09 35niavlys

[citest]

liangwen12year avatar Sep 25 '22 14:09 liangwen12year

[citest]

Can you restart CI on main branch ? because it's no more green :(

35niavlys avatar Sep 25 '22 16:09 35niavlys

[citest]

richm avatar Sep 25 '22 23:09 richm

[citest bad]

richm avatar Sep 26 '22 13:09 richm

@richm , the ./tests/tests_bond_cloned_mac_initscripts.yml failed with the following error, just out of curiosity, this is the CI problem, right? because I can not reproduce locally. Thanks.

TASK [linux-system-roles.network : Re-test connectivity] ***********************
task path: /WORKDIR/dist-git-network-add_cloned_mac-BwEDGn/tests/roles/linux-system-roles.network/tasks/main.yml:149
Monday 26 September 2022  14:39:08 +0000 (0:00:01.811)       0:04:29.473 ****** 
fatal: [sut]: UNREACHABLE! => {
    "changed": false,
    "unreachable": true
}

MSG:

Data could not be sent to remote host "10.31.8.243". Make sure this host can be reached over ssh: mux_client_request_session: read from master failed: Broken pipe
ssh: connect to host 10.31.8.243 port 22: Connection timed out

	to retry, use: --limit @/tmp/tests_bond_cloned_mac_initscripts.retry

PLAY RECAP *********************************************************************
sut                        : ok=23   changed=5    unreachable=1    failed=0    skipped=14   rescued=0    ignored=0   

liangwen12year avatar Sep 27 '22 15:09 liangwen12year

I can't run all tests on the HEAD of current main branch. You #526 pull request @liangwen12year seems to break for the same reason

35niavlys avatar Sep 27 '22 17:09 35niavlys

[citest]

liangwen12year avatar Sep 27 '22 19:09 liangwen12year

I can't run all tests on the HEAD of current main branch. You #526 pull request @liangwen12year seems to break for the same reason

What do you mean specifically ?

liangwen12year avatar Sep 27 '22 20:09 liangwen12year

@richm , the ./tests/tests_bond_cloned_mac_initscripts.yml failed with the following error, just out of curiosity, this is the CI problem, right? because I can not reproduce locally. Thanks.

TASK [linux-system-roles.network : Re-test connectivity] ***********************
task path: /WORKDIR/dist-git-network-add_cloned_mac-BwEDGn/tests/roles/linux-system-roles.network/tasks/main.yml:149
Monday 26 September 2022  14:39:08 +0000 (0:00:01.811)       0:04:29.473 ****** 
fatal: [sut]: UNREACHABLE! => {
    "changed": false,
    "unreachable": true
}

MSG:

Data could not be sent to remote host "10.31.8.243". Make sure this host can be reached over ssh: mux_client_request_session: read from master failed: Broken pipe
ssh: connect to host 10.31.8.243 port 22: Connection timed out

	to retry, use: --limit @/tmp/tests_bond_cloned_mac_initscripts.retry

PLAY RECAP *********************************************************************
sut                        : ok=23   changed=5    unreachable=1    failed=0    skipped=14   rescued=0    ignored=0   

not sure - can you send me a link to the log? Is it possible that the test tests_bond_cloned_mac_initscripts can temporarily interrupt ssh networking? If so, then the task Re-test connectivity is going to have to be more robust to handle that case.

and yes - there is a difference between the way tests work when run locally with qemu/kvm machine managed node and local virtual networking, vs. the CI system which launches an openstack or aws machine for the managed node, and uses a "real" network connection which has a lot more latency and opportunities for drops.

richm avatar Sep 27 '22 20:09 richm

@richm , the ./tests/tests_bond_cloned_mac_initscripts.yml failed with the following error, just out of curiosity, this is the CI problem, right? because I can not reproduce locally. Thanks.

TASK [linux-system-roles.network : Re-test connectivity] ***********************
task path: /WORKDIR/dist-git-network-add_cloned_mac-BwEDGn/tests/roles/linux-system-roles.network/tasks/main.yml:149
Monday 26 September 2022  14:39:08 +0000 (0:00:01.811)       0:04:29.473 ****** 
fatal: [sut]: UNREACHABLE! => {
    "changed": false,
    "unreachable": true
}

MSG:

Data could not be sent to remote host "10.31.8.243". Make sure this host can be reached over ssh: mux_client_request_session: read from master failed: Broken pipe
ssh: connect to host 10.31.8.243 port 22: Connection timed out

	to retry, use: --limit @/tmp/tests_bond_cloned_mac_initscripts.retry

PLAY RECAP *********************************************************************
sut                        : ok=23   changed=5    unreachable=1    failed=0    skipped=14   rescued=0    ignored=0   

not sure - can you send me a link to the log? Is it possible that the test tests_bond_cloned_mac_initscripts can temporarily interrupt ssh networking? If so, then the task Re-test connectivity is going to have to be more robust to handle that case.

and yes - there is a difference between the way tests work when run locally with qemu/kvm machine managed node and local virtual networking, vs. the CI system which launches an openstack or aws machine for the managed node, and uses a "real" network connection which has a lot more latency and opportunities for drops.

https://dl.fedoraproject.org/pub/alt/linuxsystemroles/logs/lsr-citool_network-525-21d25a3_RHEL-8.8.0-20220923.0_20220927-004002/artifacts/summary.html

liangwen12year avatar Sep 27 '22 20:09 liangwen12year

@richm , the ./tests/tests_bond_cloned_mac_initscripts.yml failed with the following error, just out of curiosity, this is the CI problem, right? because I can not reproduce locally. Thanks.

TASK [linux-system-roles.network : Re-test connectivity] ***********************
task path: /WORKDIR/dist-git-network-add_cloned_mac-BwEDGn/tests/roles/linux-system-roles.network/tasks/main.yml:149
Monday 26 September 2022  14:39:08 +0000 (0:00:01.811)       0:04:29.473 ****** 
fatal: [sut]: UNREACHABLE! => {
    "changed": false,
    "unreachable": true
}

MSG:

Data could not be sent to remote host "10.31.8.243". Make sure this host can be reached over ssh: mux_client_request_session: read from master failed: Broken pipe
ssh: connect to host 10.31.8.243 port 22: Connection timed out

	to retry, use: --limit @/tmp/tests_bond_cloned_mac_initscripts.retry

PLAY RECAP *********************************************************************
sut                        : ok=23   changed=5    unreachable=1    failed=0    skipped=14   rescued=0    ignored=0   

not sure - can you send me a link to the log? Is it possible that the test tests_bond_cloned_mac_initscripts can temporarily interrupt ssh networking? If so, then the task Re-test connectivity is going to have to be more robust to handle that case. and yes - there is a difference between the way tests work when run locally with qemu/kvm machine managed node and local virtual networking, vs. the CI system which launches an openstack or aws machine for the managed node, and uses a "real" network connection which has a lot more latency and opportunities for drops.

https://dl.fedoraproject.org/pub/alt/linuxsystemroles/logs/lsr-citool_network-525-21d25a3_RHEL-8.8.0-20220923.0_20220927-004002/artifacts/summary.html

It might also be a test flake - I guess we'll find out in 5 hours or so when the tests complete.

richm avatar Sep 27 '22 20:09 richm

I can't run all tests on the HEAD of current main branch. You #526 pull request @liangwen12year seems to break for the same reason

What do you mean specifically ?

I mean that this error is not due to one my changes. Same error on your PR

35niavlys avatar Sep 28 '22 16:09 35niavlys

I can't run all tests on the HEAD of current main branch. You #526 pull request @liangwen12year seems to break for the same reason

What do you mean specifically ?

I mean that this error is not due to one my changes. Same error on your PR

Yes, we have been noticed that, and it is an bug in NM, it has been fixed in the NM upstream, https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/3871c670ab9417fc54d3c0450e91e08ced4a98b4. We may also backport the fix to the earlier version. Fixed by https://github.com/linux-system-roles/network/pull/527.

liangwen12year avatar Sep 28 '22 17:09 liangwen12year

Currently. the PR is blocked by the baseos CI failure (seems not caused by this PR), @richm is working on this.

TASK [linux-system-roles.network : Re-test connectivity] ***********************
task path: /WORKDIR/dist-git-network-add_cloned_mac-BwEDGn/tests/roles/linux-system-roles.network/tasks/main.yml:149
Monday 26 September 2022  14:39:08 +0000 (0:00:01.811)       0:04:29.473 ****** 
fatal: [sut]: UNREACHABLE! => {
    "changed": false,
    "unreachable": true
}

MSG:

Data could not be sent to remote host "10.31.8.243". Make sure this host can be reached over ssh: mux_client_request_session: read from master failed: Broken pipe
ssh: connect to host 10.31.8.243 port 22: Connection timed out

	to retry, use: --limit @/tmp/tests_bond_cloned_mac_initscripts.retry

PLAY RECAP *********************************************************************
sut                        : ok=23   changed=5    unreachable=1    failed=0    skipped=14   rescued=0    ignored=0   

liangwen12year avatar Oct 18 '22 12:10 liangwen12year

Also, please rebase on top of the latest main branch

richm avatar Oct 24 '22 16:10 richm