Comments (9)
cool, thanks for reporting
Regarding initscripts support... there are various initscripts flavours, like Fedora/RHEL, SuSE. For the moment, the role only targets the Fedora/RHEL flavour, simply because there is no testing happening for other distros. So, unless somebody shows serious interest in testing and fixing initscripts for other distros, I'd rather not merge any patches that create initscripts that won't work on Fedora/RHEL. The referenced initscripts-macvlan is also not part of RHEL, so the same applies. But we can add macvlan support for NetworkManager only. Of course, optimally all providers support all options, but that is not a hard rule. I think Cmd_initscripts
should overload run_prepare()
and error out when encountering a macvlan device.
Regarding the patch, a few comments:
-
I think it shouldn't add a
macvlan_parent
property, but reuse the existingparent
, like forvlan
. -
Regarding
macvlan_mode
, it is the same style as VLAN'svlan_id
. I am no longer convinced this was the right decision, and would prefer that such properties are nested like
- type: "macvlan"
- parent: "eth0"
- macvlan:
- mode: "bridge"
How about that? Look at ArgValidator_DictBond()
which does the same for bonds.
If you are willing, please open a pull request. Thanks!
from network.
-
I am totally fine with this not working with initscripts (for now... or ever). I'll take out that part of the patch and see that I add a check for macvlans in Cmd_initscripts.
-
I can certainly create a ArgValidator_DictMacvlanModes class and change the structure of the parameters as you described. Right now, all modes have to be specified twice (in NMUtil and ArgValidator_DictConnection), the mode names should be private to this class only then, which is preferable.
-
I first tried using "parent" for the macvlan_parent, but parent parameter is checked to be a valid connection in a several places, e.g.:
ArgUtil.connection_find_by_name(connection['parent'], result, idx)
But for macvlan, the parent can be an unmanaged device. nmcli calls the option "dev" and allows
dev <parent device (connection UUID, ifname, or MAC)>
I only called it "parent" because that is the name the libnm uses:NM.SETTING_MACVLAN_PARENT
.
I agree reusing the parameter parent is favorable, but it would mean touching lots of other lines...
I'll get on it and prepare another patch.
from network.
ArgValidator_DictMacvlanModes
should be ArgValidator_DictMacvlan
.
I first tried using "parent" for the macvlan_parent, but parent parameter is checked to be a valid
connection in a several places, e.g.:
Yeah, that's intended. As far as NetworkManager is concerned, you can create a VLAN/MACVlan with a parent that is not managed by NetworkManager. The "parent" either references an interface-name or the UUID or another connection profile.
For the role, the "parent" is always the name of another profile in the same play, like
- name: wired
type: ethernet
interface_name: eth0
- name: wired.100
type: vlan
parent: wired
vlan_id: 100
so, you need to define the parent as well, otherwise, we wouldn't know which interface-name/UUID to set in NetworkManager. In the playbook, when a profile references another profile (either via parent
or master
), that other profile must also be fully declared in the same playbook. I think that restriction makes sense.
from network.
I think that restriction makes sense.
It does. I personally would prefer to have the same functionality regardless whether it's ansible or nmcli. In my case, the ethernet interface was unmanaged so far, but I found that assigning an ip address on the subnet with mask /32 makes it all work (ansible is happy and routing works). So this is an easy workaround.
from network.
Note #26 which reworks vlan
/ infiniband
handling. I think macvlan
also should use such a nested setting like bond
from network.
Yes, I've done that and also added the other two (boolean) options: "promiscuous" and "tap". Will send the patch today.
from network.
I think I sent you the pull request last week (I haven't used github before, so I could have done something wrong), did you have a chance to look at it?
from network.
I think I sent you the pull request last week (I haven't used github before, so I could have done something wrong), did you have a chance to look at it?
Right. Thanks for the reminder. Replied at #27.
(you can just --force re-push the branch, the pull request will automatically get updated.
from network.
Fixed with pull request #27
from network.
Related Issues (20)
- network_state functionality doesn't appear to be idempotent HOT 1
- pkey interfaces cannot be deleted reliably HOT 12
- 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 4
- not idempotent HOT 4
- Need further output from "check" mode HOT 7
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.