-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As discussed at [1] the nmstatectl tool is going to be added to FCOS, it will allow to declare the network configuration at boot time [1] coreos/fedora-coreos-tracker#1175 Signed-off-by: Enrique Llorente <[email protected]>
- Loading branch information
Showing
12 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
. $KOLA_EXT_DATA/commonlib.sh | ||
|
||
main() { | ||
nmstatectl show | ||
journalctl -u nmstate | ||
|
||
local prefix="first boot" | ||
if [ "${AUTOPKGTEST_REBOOT_MARK:-}" == rebooted ]; then | ||
prefix="second boot" | ||
fi | ||
|
||
if ! nmcli c show br-ex; then | ||
fatal "${prefix}: bridge not configured" | ||
fi | ||
|
||
if ! ls /etc/nmstate/*applied; then | ||
fatal "${prefix}: nmstate yamls files not marked as applied" | ||
fi | ||
|
||
if [ "${AUTOPKGTEST_REBOOT_MARK:-}" == "" ]; then | ||
/tmp/autopkgtest-reboot rebooted | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
variant: fcos | ||
version: 1.4.0 | ||
storage: | ||
files: | ||
- path: /etc/nmstate/br-ex-policy.yml | ||
contents: | ||
inline: | | ||
capture: | ||
default-gw-route: routes.running.destination=="0.0.0.0/0" | ||
default-gw-iface: interfaces.name==capture.default-gw-route.routes.running.0.next-hop-interface | ||
desiredState: | ||
interfaces: | ||
- name: "{{ capture.default-gw-iface.interfaces.0.name }}" | ||
type: ethernet | ||
state: up | ||
- name: br-ex | ||
type: linux-bridge | ||
copy-mac-from: "{{ capture.default-gw-iface.interfaces.0.name }}" | ||
state: up | ||
ipv4: "{{ capture.default-gw-iface.interfaces.0.ipv4 }}" | ||
ipv6: "{{ capture.default-gw-iface.interfaces.0.ipv6 }}" | ||
bridge: | ||
port: | ||
- name: "{{ capture.default-gw-iface.interfaces.0.name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../data/commonlib.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../data/nmstate-common.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
## kola: | ||
## tags: "platform-independent" | ||
# | ||
# Configure a DHCP linux bridge using butane and nmstate service with policy | ||
|
||
set -xeuo pipefail | ||
|
||
. $KOLA_EXT_DATA/nmstate-common.sh | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
variant: fcos | ||
version: 1.4.0 | ||
storage: | ||
files: | ||
- path: /etc/nmstate/br-ex.yml | ||
contents: | ||
inline: | | ||
interfaces: | ||
- name: br-ex | ||
type: linux-bridge | ||
state: up | ||
ipv4: | ||
enabled: false | ||
ipv6: | ||
enabled: false | ||
bridge: | ||
port: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../data/commonlib.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../data/nmstate-common.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
## kola: | ||
## tags: "platform-independent" | ||
# | ||
# Configure a DHCP linux bridge using butane and nmstate service with state | ||
|
||
set -xeuo pipefail | ||
|
||
. $KOLA_EXT_DATA/nmstate-common.sh | ||
|
||
main |