Comments (3)
Thank you for the bug report. I tried to reproduce this on a current system with the upstream role but the role seems to work as expected.
On the target host I tried:
NetworkManager-1.18.0-5.el7_7.1
cat > 'role_test_static.yml' <<EOF
# SPDX-License-Identifier: BSD-3-Clause
---
- hosts: all
vars:
network_connections:
- name: "{{ network_interface }}"
state: up
type: ethernet
ip:
address:
- "192.0.2.42/30"
dhcp4: no
auto6: no
roles:
- linux-system-roles.network
EOF
ansible-playbook -i rhel77-cloud, role_test_static.yml -e network_interface=eth2
as the initial configuration. On the host:
4: eth2 inet 192.0.2.42/30 brd 192.0.2.43 scope global noprefixroute eth2\ valid_lft forever preferred_lft forever
Afterwards I applied the bond config:
cat > 'role_test_bond.yml' <<EOF
---
- hosts: all
vars:
network_connections:
- autoconnect: 'yes'
bond:
miimon: 100
mode: active-backup
interface_name: bond0
ip:
address:
- "192.0.2.5/30"
auto6: 'no'
dhcp4: 'no'
name: bond0
state: up
type: bond
- name: "{{ network_interface }}"
master: bond0
type: ethernet
state: up
roles:
- linux-system-roles.network
EOF
ansible-playbook -i rhel77-cloud, role_test_bond.yml -e network_interface=eth2
And it looks correct:
ip -o a |grep -iw inet |grep -e eth2 -e bond0
8: bond0 inet 192.0.2.5/30 brd 192.0.2.7 scope global noprefixroute bond0\ valid_lft forever preferred_lft forever
Ansible log:
ansible-playbook -i rhel77-cloud, role_test_bond.yml -e network_interface=eth2
PLAY [all] *************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [rhel77-cloud]
TASK [linux-system-roles.network : Check which services are running] ***************************************************************************************************************************************
ok: [rhel77-cloud]
TASK [linux-system-roles.network : Check which packages are installed] *************************************************************************************************************************************
ok: [rhel77-cloud]
TASK [linux-system-roles.network : Print network provider] *************************************************************************************************************************************************
ok: [rhel77-cloud] => {
"msg": "Using network provider: nm"
}
TASK [linux-system-roles.network : Install packages] *******************************************************************************************************************************************************
skipping: [rhel77-cloud]
TASK [linux-system-roles.network : Enable and start NetworkManager] ****************************************************************************************************************************************
ok: [rhel77-cloud]
TASK [linux-system-roles.network : Enable network service] *************************************************************************************************************************************************
skipping: [rhel77-cloud]
TASK [linux-system-roles.network : Ensure initscripts network file dependency is present] ******************************************************************************************************************
skipping: [rhel77-cloud]
TASK [linux-system-roles.network : Configure networking connection profiles] *******************************************************************************************************************************
[WARNING]: [005] <info> #0, state:up persistent_state:present, 'bond0': add connection bond0, fe7d0bdf-beba-4057-a9b7-a8eedcb78740
[WARNING]: [006] <info> #0, state:up persistent_state:present, 'bond0': up connection bond0, fe7d0bdf-beba-4057-a9b7-a8eedcb78740 (not-active)
[WARNING]: [007] <info> #1, state:up persistent_state:present, 'eth2': update connection eth2, f5b1efd7-4d71-46cd-82b0-2ae6132f37bb
[WARNING]: [008] <info> #1, state:up persistent_state:present, 'eth2': up connection eth2, f5b1efd7-4d71-46cd-82b0-2ae6132f37bb (is-modified)
changed: [rhel77-cloud]
TASK [linux-system-roles.network : Re-test connectivity] ***************************************************************************************************************************************************
ok: [rhel77-cloud]
PLAY RECAP *************************************************************************************************************************************************************************************************
rhel77-cloud : ok=7 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
Could you please check if this is still an issue for you?
from network.
network_providers: initscripts
network_connections:
- autoconnect: 'yes' bond: miimon: 100 mode: active-backup interface_name: bond0 ip: address: - 192.168.43.1/24 auto6: 'no' dhcp4: 'no' name: bond0 state: up type: bond - name: enp0s8 interface_name: enp0s8 master: bond0 type: ethernet state: up roles: - rhel-system-roles.network
There is no issue!! I tried to reproduce the issue using performed steps.
Everything is working great !!
[root@localhost ~]#ip -o a \| grep -iw inet
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
2: enp0s3 inet 192.168.43.243/24 brd 192.168.43.255 scope global dynamic noprefixroute enp0s3\ valid_lft 3032sec preferred_lft 3032sec
4: bond0 inet 192.168.43.1/24 brd 192.168.43.255 scope global noprefixroute bond0\ valid_lft forever preferred_lft forever
[root@localhost ~]# nmcli connection show
NAME UUID TYPE DEVICE
Wired connection 1 41719565-d70e-30e9-9da9-386175abd940 ethernet enp0s3
bond0 18a94465-1a9d-4f64-8aa0-0a7784893784 bond bond0
enp0s8 2515416c-b0db-49dd-977d-8ff7035607d7 ethernet enp0s8
--
from network.
Hello,
Thank you for your inputs.
I have verified with NetworkManager version "NetworkManager-1.18.4-3.el7.x86_64" and did not observed the issue. Will keep this open for some time and if I see everything okay, will close this.
from network.
Related Issues (20)
- Feature request: support adding tun devices HOT 14
- Routing rules improvement HOT 6
- Eliminate non-inclusive language HOT 5
- Address CodeQL warnings HOT 4
- Network override HOT 1
- add 'auto-dns' option also to network_connections HOT 6
- How to keep existing profile name HOT 3
- Verify and document no-aaaa DNS option HOT 2
- network_state should not change IPv6 state when not configured HOT 2
- Question Changing the IP of the remote host HOT 3
- ipv4.dns-data: unknown property (7) HOT 6
- RFE: Add support for DNS caching HOT 3
- WireGuard support HOT 1
- Rename the task `name: Check if rpm ostree system - cannot test` into a meaningful name explaining the reason for skipping test HOT 2
- Add support for veth pair HOT 3
- Add support for scope and src route options HOT 5
- not idempotent HOT 4
- Need further output from "check" mode HOT 7
- VRF Support HOT 2
- EL-7 tests fails because there is no EPEL-7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from network.