Skip to content

Instantly share code, notes, and snippets.

@JoelSpeed
Created July 22, 2021 12:04
Show Gist options
  • Save JoelSpeed/c92cfe9c75dea0b98fae04019ebf7868 to your computer and use it in GitHub Desktop.
Save JoelSpeed/c92cfe9c75dea0b98fae04019ebf7868 to your computer and use it in GitHub Desktop.
Bootstrap E2E day 1 vs day 2 test output from 2668 + 2547
jspeed@jspeed-mac machine-config-operator % make bootstrap-e2e-local
go test -v${WHAT:+ -run="$WHAT"} ./test/e2e-bootstrap/
=== RUN TestE2EBootstrap
=== RUN TestE2EBootstrap/With_no_additional_manifests
E0722 12:49:52.227362 6206 template_controller.go:189] couldn't get ControllerConfig on dependency callback &errors.StatusError{ErrStatus:v1.Status{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ListMeta:v1.ListMeta{SelfLink:"", ResourceVersion:"", Continue:"", RemainingItemCount:(*int64)(nil)}, Status:"Failure", Message:"controllerconfig.machineconfiguration.openshift.io \"machine-config-controller\" not found", Reason:"NotFound", Details:(*v1.StatusDetails)(0xc000416420), Code:404}}
E0722 12:49:52.227826 6206 render_controller.go:185] error finding pools for machineconfig: could not find any MachineConfigPool set for MachineConfig 99-master-ssh with labels: map[machineconfiguration.openshift.io/role:master]
utils.go:87: Pool master has rendered configs [99-master-ssh 99-master-generated-registries] with rendered-master-127c2506beeb90afd1fb54b299182d69 (waited 6.029002315s)
bootstrap_test.go:192: Controller rendered master config as "rendered-master-127c2506beeb90afd1fb54b299182d69"
utils.go:87: Pool worker has rendered configs [99-worker-ssh 99-worker-generated-registries] with rendered-worker-20e467a166390fea5c5bc915e361f02d (waited 1.441239ms)
bootstrap_test.go:196: Controller rendered worker config as "rendered-worker-20e467a166390fea5c5bc915e361f02d"
bootstrap_test.go:238: Bootstrap rendered master config as "rendered-master-127c2506beeb90afd1fb54b299182d69"
bootstrap_test.go:238: Bootstrap rendered worker config as "rendered-worker-20e467a166390fea5c5bc915e361f02d"
=== RUN TestE2EBootstrap/With_a_featuregate_manifest
E0722 12:49:59.866665 6206 template_controller.go:189] couldn't get ControllerConfig on dependency callback &errors.StatusError{ErrStatus:v1.Status{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ListMeta:v1.ListMeta{SelfLink:"", ResourceVersion:"", Continue:"", RemainingItemCount:(*int64)(nil)}, Status:"Failure", Message:"controllerconfig.machineconfiguration.openshift.io \"machine-config-controller\" not found", Reason:"NotFound", Details:(*v1.StatusDetails)(0xc000da1440), Code:404}}
utils.go:87: Pool master has rendered configs [99-master-ssh 99-master-generated-registries 98-master-generated-kubelet] with rendered-master-7a0ffec960bcbb0e6060de5b102e5531 (waited 6.029655496s)
bootstrap_test.go:192: Controller rendered master config as "rendered-master-7a0ffec960bcbb0e6060de5b102e5531"
utils.go:87: Pool worker has rendered configs [99-worker-ssh 99-worker-generated-registries 98-worker-generated-kubelet] with rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277 (waited 1.429559ms)
bootstrap_test.go:196: Controller rendered worker config as "rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277"
bootstrap_test.go:238: Bootstrap rendered master config as "rendered-master-7a0ffec960bcbb0e6060de5b102e5531"
bootstrap_test.go:238: Bootstrap rendered worker config as "rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277"
=== RUN TestE2EBootstrap/With_a_featuregate_manifest_and_master_kubelet_config_manifest
E0722 12:50:07.715109 6206 render_controller.go:185] error finding pools for machineconfig: could not find any MachineConfigPool set for MachineConfig 99-master-ssh with labels: map[machineconfiguration.openshift.io/role:master]
E0722 12:50:07.715135 6206 render_controller.go:185] error finding pools for machineconfig: could not find any MachineConfigPool set for MachineConfig 99-worker-ssh with labels: map[machineconfiguration.openshift.io/role:worker]
utils.go:87: Pool master has rendered configs [99-master-ssh 99-master-generated-registries 99-master-generated-kubelet] with rendered-master-89c4bfb13cd58f89dab46b5317ee04e7 (waited 12.008308019s)
bootstrap_test.go:192: Controller rendered master config as "rendered-master-89c4bfb13cd58f89dab46b5317ee04e7"
utils.go:87: Pool worker has rendered configs [99-worker-ssh 99-worker-generated-registries] with rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277 (waited 2.179128ms)
bootstrap_test.go:196: Controller rendered worker config as "rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277"
bootstrap_test.go:238: Bootstrap rendered master config as "rendered-master-89c4bfb13cd58f89dab46b5317ee04e7"
bootstrap_test.go:238: Bootstrap rendered worker config as "rendered-worker-52022af564ba3e54e3279626f3f595b7"
bootstrap_test.go:241: Expected rendered worker configurations to match: got bootstrap config "rendered-worker-52022af564ba3e54e3279626f3f595b7", got controller config "rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277"
bootstrap_test.go:247: Controller rendered "rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277":
metadata:
annotations:
machineconfiguration.openshift.io/generated-by-controller-version: was-not-built-properly
creationTimestamp: "2021-07-22T11:50:12Z"
generation: 1
managedFields:
- apiVersion: machineconfiguration.openshift.io/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:machineconfiguration.openshift.io/generated-by-controller-version: {}
f:ownerReferences:
.: {}
k:{"uid":"264e97f4-b4a9-4a6f-8afa-0d0068171299"}:
.: {}
f:apiVersion: {}
f:blockOwnerDeletion: {}
f:controller: {}
f:kind: {}
f:name: {}
f:uid: {}
f:spec:
.: {}
f:config:
.: {}
f:ignition:
.: {}
f:version: {}
f:passwd:
.: {}
f:users: {}
f:storage:
.: {}
f:files: {}
f:systemd:
.: {}
f:units: {}
f:extensions: {}
f:fips: {}
f:kernelArguments: {}
f:kernelType: {}
f:osImageURL: {}
manager: e2e-bootstrap.test
operation: Update
time: "2021-07-22T11:50:12Z"
name: rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277
ownerReferences:
- apiVersion: machineconfiguration.openshift.io/v1
blockOwnerDeletion: true
controller: true
kind: MachineConfigPool
name: worker
uid: 264e97f4-b4a9-4a6f-8afa-0d0068171299
resourceVersion: "365"
selfLink: /apis/machineconfiguration.openshift.io/v1/machineconfigs/rendered-worker-bdccad5fb4fd1d45fc828f9de53c2277
uid: 396b93d8-c645-460a-ac91-2b6138bb34b2
spec:
config:
ignition:
version: 3.2.0
passwd:
users:
- name: core
sshAuthorizedKeys:
- ssh-rsa SSH-AUTHORIZED-KEY
storage:
files:
- contents:
source: data:,%5Bmain%5D%0Aplugins%3Dkeyfile%2Cifcfg-rh%0A%5Bkeyfile%5D%0Apath%3D%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/99-keyfiles.conf
- contents:
source: data:,
mode: 384
overwrite: true
path: /etc/pki/ca-trust/source/anchors/openshift-config-user-ca-bundle.crt
- contents:
source: data:,%23%20This%20file%20is%20managed%20by%20machine-config-operator.%0A%23%20Suppress%20audit%20rules%20which%20always%20trigger%20for%20container%0A%23%20workloads%2C%20as%20they%20spam%20the%20audit%20log.%20%20Workloads%20are%20expected%0A%23%20to%20be%20dynamic%2C%20and%20the%20networking%20stack%20uses%20iptables.%0A-a%20exclude%2Calways%20-F%20msgtype%3DNETFILTER_CFG%0A%23%20The%20default%20bridged%20networking%20enables%20promiscuous%20on%20the%20veth%0A%23%20device.%20%20Ideally%2C%20we'd%20teach%20audit%20to%20ignore%20only%20veth%20devices%2C%0A%23%20since%20one%20might%20legitimately%20care%20about%20promiscuous%20on%20real%20physical%0A%23%20devices.%20%20But%20we%20can't%20currently%20differentiate.%0A-a%20exclude%2Calways%20-F%20msgtype%3DANOM_PROMISCUOUS%0A
mode: 420
overwrite: true
path: /etc/audit/rules.d/mco-audit-quiet-containers.rules
- contents:
source: data:,r%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F80-openshift-network.conf%0Ar%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F10-ovn-kubernetes.conf%0Ad%20%2Frun%2Fmultus%2Fcni%2Fnet.d%2F%200755%20root%20root%20-%20-%0AD%20%2Fvar%2Flib%2Fcni%2Fnetworks%2Fopenshift-sdn%2F%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/cleanup-cni.conf
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/static-pod-resources/configmaps/cloud-config/ca-bundle.pem
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-eux%0A%0A%23%20This%20file%20is%20not%20needed%20anymore%20in%204.7%2B%2C%20but%20when%20rolling%20back%20to%204.6%0A%23%20the%20ovs%20pod%20needs%20it%20to%20know%20ovs%20is%20running%20on%20the%20host.%0Atouch%20%2Fvar%2Frun%2Fovs-config-executed%0A%0Aif%20%5B%20-d%20%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%20%5D%3B%20then%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0Aelse%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0Afi%0A%0A%23%20In%20RHEL7%20files%20in%20%2F%7Betc%2Crun%7D%2FNetworkManager%2Fsystem-connections%20end%20without%20the%20suffix%20'.nmconnection'%2C%20whereas%20in%20RHCOS%20they%20end%20with%20the%20suffix.%0Amanaged_nm_conn_files%3D(%24(echo%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection))%0A%0A%23%20Workaround%20to%20ensure%20OVS%20is%20installed%20due%20to%20bug%20in%20systemd%20Requires%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1888017%0Acopy_nm_conn_files()%20%7B%0A%20%20src_path%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0A%20%20dst_path%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0A%20%20if%20%5B%20-d%20%22%24src_path%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22%24src_path%20exists%22%0A%20%20%20%20for%20file%20in%20%22%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%22%3B%20do%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24src_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24dst_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20new%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20elif%20!%20cmp%20--silent%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20updated%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22Skipping%20%24file%20since%20its%20status%20is%20current%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20done%0A%20%20fi%0A%7D%0A%0A%23%20Used%20to%20replace%20an%20old%20master%20connection%20uuid%20with%20a%20new%20one%20on%20all%20connections%0Areplace_connection_master()%20%7B%0A%20%20local%20old%3D%22%241%22%0A%20%20local%20new%3D%22%242%22%0A%20%20for%20conn_uuid%20in%20%24(nmcli%20-g%20UUID%20connection%20show)%20%3B%20do%0A%20%20%20%20if%20%5B%20%22%24(nmcli%20-g%20connection.master%20connection%20show%20uuid%20%22%24conn_uuid%22)%22%20!%3D%20%22%24old%22%20%5D%3B%20then%0A%20%20%20%20%20%20continue%0A%20%20%20%20fi%0A%0A%20%20%20%20nmcli%20conn%20mod%20uuid%20%24conn_uuid%20connection.master%20%22%24new%22%0A%20%20%20%20%23%20make%20sure%20we%20persist%20this%20modification%0A%20%20%20%20conn_file%3D%22%24(egrep%20-l%20uuid%3D%24conn_uuid%20%24%7BNM_CONN_PATH%7D%2F*%20%7C%20xargs%20basename)%22%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24conn_file%22%20%26%26%20!%20%22%20%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%20%22%20%3D~%20%22%20%24%7Bconn_file%7D%20%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20managed_nm_conn_files%2B%3D(%24conn_file)%0A%20%20%20%20fi%0A%20%20done%0A%7D%0A%0Aif%20!%20rpm%20-qa%20%7C%20grep%20-q%20openvswitch%3B%20then%0A%20%20echo%20%22Warning%3A%20Openvswitch%20package%20is%20not%20installed!%22%0A%20%20exit%201%0Afi%0A%0Aif%20%5B%20%22%241%22%20%3D%3D%20%22OVNKubernetes%22%20%5D%3B%20then%0A%20%20%23%20Configures%20NICs%20onto%20OVS%20bridge%20%22br-ex%22%0A%20%20%23%20Configuration%20is%20either%20auto-detected%20or%20provided%20through%20a%20config%20file%20written%20already%20in%20Network%20Manager%0A%20%20%23%20key%20files%20under%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%0A%20%20%23%20Managing%20key%20files%20is%20outside%20of%20the%20scope%20of%20this%20script%0A%0A%20%20%23%20if%20the%20interface%20is%20of%20type%20vmxnet3%20add%20multicast%20capability%20for%20that%20driver%0A%20%20%23%20REMOVEME%3A%20Once%20BZ%3A1854355%20is%20fixed%2C%20this%20needs%20to%20get%20removed.%0A%20%20function%20configure_driver_options%20%7B%0A%20%20%20%20intf%3D%241%0A%20%20%20%20driver%3D%24(cat%20%22%2Fsys%2Fclass%2Fnet%2F%24%7Bintf%7D%2Fdevice%2Fuevent%22%20%7C%20grep%20DRIVER%20%7C%20awk%20-F%20%22%3D%22%20'%7Bprint%20%242%7D')%0A%20%20%20%20echo%20%22Driver%20name%20is%22%20%24driver%0A%20%20%20%20if%20%5B%20%22%24driver%22%20%3D%20%22vmxnet3%22%20%5D%3B%20then%0A%20%20%20%20%20%20ifconfig%20%22%24intf%22%20allmulti%0A%20%20%20%20fi%0A%20%20%7D%0A%0A%20%20iface%3D%22%22%0A%20%20counter%3D0%0A%20%20%23%20find%20default%20interface%0A%20%20while%20%5B%20%24counter%20-lt%2012%20%5D%3B%20do%0A%20%20%20%20%23%20check%20ipv4%0A%20%20%20%20iface%3D%24(ip%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv4%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20%23%20check%20ipv6%0A%20%20%20%20iface%3D%24(ip%20-6%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv6%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20%20%20echo%20%22No%20default%20route%20found%20on%20attempt%3A%20%24%7Bcounter%7D%22%0A%20%20%20%20sleep%205%0A%20%20done%0A%0A%20%20if%20%5B%20%22%24iface%22%20%3D%20%22br-ex%22%20%5D%3B%20then%0A%20%20%20%20%23%20handle%20vlans%20and%20bonds%20etc%20if%20they%20have%20already%20been%0A%20%20%20%20%23%20configured%20via%20nm%20key%20files%20and%20br-ex%20is%20already%20up%0A%20%20%20%20ifaces%3D%24(ovs-vsctl%20list-ifaces%20%24%7Biface%7D)%0A%20%20%20%20for%20intf%20in%20%24ifaces%3B%20do%20configure_driver_options%20%24intf%3B%20done%0A%20%20%20%20echo%20%22Networking%20already%20configured%20and%20up%20for%20br-ex!%22%0A%20%20%20%20%23%20remove%20bridges%20created%20by%20openshift-sdn%0A%20%20%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br0%0A%20%20%20%20exit%200%0A%20%20fi%0A%0A%20%20if%20%5B%20-z%20%22%24iface%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22ERROR%3A%20Unable%20to%20find%20default%20gateway%20interface%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20%23%20find%20the%20MAC%20from%20OVS%20config%20or%20the%20default%20interface%20to%20use%20for%20OVS%20internal%20port%0A%20%20%23%20this%20prevents%20us%20from%20getting%20a%20different%20DHCP%20lease%20and%20dropping%20connection%0A%20%20if%20!%20iface_mac%3D%24(%3C%22%2Fsys%2Fclass%2Fnet%2F%24%7Biface%7D%2Faddress%22)%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MAC%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20echo%20%22MAC%20address%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mac%7D%22%0A%0A%20%20%23%20find%20MTU%20from%20original%20iface%0A%20%20iface_mtu%3D%24(ip%20link%20show%20%22%24iface%22%20%7C%20awk%20'%7Bprint%20%245%3B%20exit%7D')%0A%20%20if%20%5B%5B%20-z%20%22%24iface_mtu%22%20%5D%5D%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MTU%2C%20defaulting%20to%201500%22%0A%20%20%20%20iface_mtu%3D1500%0A%20%20else%0A%20%20%20%20echo%20%22MTU%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mtu%7D%22%0A%20%20fi%0A%0A%20%20%23%20store%20old%20conn%20for%20later%0A%20%20old_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%0A%20%20extra_brex_args%3D%22%22%0A%20%20%23%20check%20for%20dhcp%20client%20ids%0A%20%20dhcp_client_id%3D%24(nmcli%20--get-values%20ipv4.dhcp-client-id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv4.dhcp-client-id%20%24%7Bdhcp_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20dhcp6_client_id%3D%24(nmcli%20--get-values%20ipv6.dhcp-duid%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp6_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv6.dhcp-duid%20%24%7Bdhcp6_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20%23%20create%20bridge%3B%20use%20NM's%20ethernet%20device%20default%20route%20metric%20(100)%0A%20%20if%20!%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-bridge%20%5C%0A%20%20%20%20%20%20%20%20con-name%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20conn.interface%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20ipv6.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20%24%7Bextra_brex_args%7D%0A%20%20fi%0A%0A%20%20%23%20find%20default%20port%20to%20add%20to%20bridge%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20%24%7Biface%7D%20master%20br-ex%20con-name%20ovs-port-phys0%0A%20%20fi%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20br-ex%20master%20br-ex%20con-name%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20extra_phys_args%3D()%0A%20%20%23%20check%20if%20this%20interface%20is%20a%20vlan%2C%20bond%2C%20team%2C%20or%20ethernet%20type%0A%20%20if%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22vlan%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dvlan%0A%20%20%20%20vlan_id%3D%24(nmcli%20--get-values%20vlan.id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_id%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_id%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20vlan_parent%3D%24(nmcli%20--get-values%20vlan.parent%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_parent%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_parent%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20extra_phys_args%3D(%20dev%20%22%24%7Bvlan_parent%7D%22%20id%20%22%24%7Bvlan_id%7D%22%20)%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22bond%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dbond%0A%20%20%20%20%23%20check%20bond%20options%0A%20%20%20%20bond_opts%3D%24(nmcli%20--get-values%20bond.options%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24bond_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20bond.options%20%22%24%7Bbond_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22team%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dteam%0A%20%20%20%20%23%20check%20team%20config%20options%0A%20%20%20%20team_config_opts%3D%24(nmcli%20--get-values%20team.config%20-e%20no%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24team_config_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20team.config%20%22%24%7Bteam_config_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20else%0A%20%20%20%20iface_type%3D802-3-ethernet%0A%20%20fi%0A%0A%20%20%23%20use%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%20instead%20of%20%24%7Bextra_phys_args%5B%40%5D%7D%20to%20be%20compatible%20with%20bash%204.2%20in%20RHEL7.9%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20%24%7Biface_type%7D%20conn.interface%20%24%7Biface%7D%20master%20ovs-port-phys0%20con-name%20ovs-if-phys0%20%5C%0A%20%20%20%20connection.autoconnect-priority%20100%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%0A%20%20fi%0A%0A%20%20%23%20Get%20the%20new%20connection%20uuid%0A%20%20new_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%0A%20%20%23%20Setup%20an%20exit%20trap%20to%20restore%20any%20modifications%20going%20further%0A%20%20handle_exit_error()%20%7B%0A%20%20%20%20e%3D%24%3F%0A%20%20%20%20%5B%20%24e%20-eq%200%20%5D%20%26%26%20exit%200%0A%20%20%20%20%23%20if%20there%20was%20a%20problem%20network%20isn't%20coming%20up%2C%20revert%20for%20debugging%0A%20%20%20%20set%20%2Be%0A%20%20%20%20replace_connection_master%20%24new_conn%20%24old_conn%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-br-ex%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-phys0%0A%20%20%20%20nmcli%20conn%20up%20%24old_conn%0A%20%20%20%20exit%20%24e%0A%20%20%7D%0A%20%20trap%20%22handle_exit_error%22%20EXIT%0A%0A%20%20%23%20Update%20connections%20with%20master%20property%20set%20to%20use%20the%20new%20connection%0A%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20replace_connection_master%20%24iface%20%24new_conn%0A%0A%20%20%23%20bring%20down%20old%20iface%0A%20%20nmcli%20device%20disconnect%20%24iface%0A%0A%20%20%23%20bring%20up%20new%20connection%20%0A%20%20nmcli%20conn%20up%20ovs-if-phys0%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20if%20nmcli%20--fields%20ipv4.method%2Cipv6.method%20conn%20show%20%24old_conn%20%7C%20grep%20manual%3B%20then%0A%20%20%20%20%20%20echo%20%22Static%20IP%20addressing%20detected%20on%20default%20gateway%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20%23%20find%20and%20copy%20the%20old%20connection%20to%20get%20the%20address%20settings%0A%20%20%20%20%20%20if%20egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*%3B%20then%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24(egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*)%0A%20%20%20%20%20%20%20%20cloned%3Dfalse%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20unable%20to%20find%20NM%20configuration%20file%20for%20conn%3A%20%24%7Bold_conn%7D.%20Attempting%20to%20clone%20conn%22%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24%7BNM_CONN_PATH%7D%2F%24%7Bold_conn%7D-clone.nmconnection%0A%20%20%20%20%20%20%20%20nmcli%20conn%20clone%20%24%7Bold_conn%7D%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20cloned%3Dtrue%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24old_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20locate%20cloned%20conn%20file%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20%20%20%20%20exit%201%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20%20%20echo%20%22Successfully%20cloned%20conn%20to%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20echo%20%22old%20connection%20file%20found%20at%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20new_conn_file%3D%24%7BNM_CONN_PATH%7D%2Fovs-if-br-ex.nmconnection%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24new_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20existing%20br-ex%20interface%20file%20found%3A%20%24new_conn_file%2C%20which%20is%20not%20loaded%20in%20NetworkManager...overwriting%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cp%20-f%20%24%7Bold_conn_file%7D%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20restorecon%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20%24cloned%3B%20then%0A%20%20%20%20%20%20%20%20nmcli%20conn%20delete%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20rm%20-f%20%24%7Bold_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20ovs_port_conn%3D%24(nmcli%20--fields%20connection.uuid%20conn%20show%20ovs-port-br-ex%20%7C%20awk%20'%7Bprint%20%242%7D')%0A%20%20%20%20%20%20br_iface_uuid%3D%24(cat%20%2Fproc%2Fsys%2Fkernel%2Frandom%2Fuuid)%0A%20%20%20%20%20%20%23%20modify%20file%20to%20work%20with%20OVS%20and%20have%20unique%20settings%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Euuid%3D.*%24%2Fuuid%3D'%22%24br_iface_uuid%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5Emulti-connect%3D.*%24%2Fd'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Etype%3D.*%24%2Ftype%3Dovs-interface%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Eid%3D.*%24%2Fid%3Dovs-if-br-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20slave-type%3Dovs-port'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20master%3D'%22%24ovs_port_conn%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20grep%20'interface-name%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Einterface-name%3D.*%24%2Finterface-name%3Dbr-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20interface-name%3Dbr-ex'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20!%20grep%20'cloned-mac-address%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20cloned-mac-address%3D'%22%24iface_mac%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Ecloned-mac-address%3D.*%24%2Fcloned-mac-address%3D'%22%24iface_mac%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20grep%20'mtu%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Emtu%3D.*%24%2Fmtu%3D'%22%24iface_mtu%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20mtu%3D'%22%24iface_mtu%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cat%20%3C%3CEOF%20%3E%3E%20%24%7Bnew_conn_file%7D%0A%5Bovs-interface%5D%0Atype%3Dinternal%0AEOF%0A%20%20%20%20%20%20nmcli%20c%20load%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20echo%20%22Loaded%20new%20ovs-if-br-ex%20connection%20file%3A%20%24%7Bnew_conn_file%7D%22%0A%20%20%20%20else%0A%20%20%20%20%20%20nmcli%20c%20add%20type%20ovs-interface%20slave-type%20ovs-port%20conn.interface%20br-ex%20master%20ovs-port-br-ex%20con-name%20%5C%0A%20%20%20%20%20%20%20%20ovs-if-br-ex%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20802-3-ethernet.cloned-mac-address%20%24%7Biface_mac%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20ipv6.route-metric%20100%0A%20%20%20%20fi%0A%20%20fi%0A%0A%20%20%23%20wait%20for%20DHCP%20to%20finish%2C%20verify%20connection%20is%20up%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20sleep%205%0A%20%20%20%20%23%20check%20if%20connection%20is%20active%0A%20%20%20%20if%20nmcli%20--fields%20GENERAL.STATE%20conn%20show%20ovs-if-br-ex%20%7C%20grep%20-i%20%22activated%22%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22WARN%3A%20OVS%20did%20not%20succesfully%20activate%20NM%20connection.%20Attempting%20to%20bring%20up%20connections%22%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20if%20nmcli%20conn%20up%20ovs-if-br-ex%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20sleep%205%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22ERROR%3A%20Failed%20to%20activate%20ovs-if-br-ex%20NM%20connection%22%0A%20%20exit%201%0Aelif%20%5B%20%22%241%22%20%3D%3D%20%22OpenShiftSDN%22%20%5D%3B%20then%0A%20%20%23%20Revert%20changes%20made%20by%20%2Fusr%2Flocal%2Fbin%2Fconfigure-ovs.sh.%0A%20%20%23%20Remove%20OVS%20bridge%20%22br-ex%22.%20Use%20the%20default%20NIC%20for%20cluster%20network.%0A%20%20iface%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20iface%3D%24(nmcli%20--get-values%20connection.interface-name%20connection%20show%20ovs-port-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-port-phys0%20%0A%20%20fi%0A%0A%20%20old_conn%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20old_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-if-phys0%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-if-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20br-ex%0A%20%20fi%0A%0A%20%20rm%20-f%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection%0A%20%20%23%20remove%20bridges%20created%20by%20ovn-kubernetes%2C%20try%20to%20delete%20br-ex%20again%20in%20case%20NM%20fail%20to%20talk%20to%20ovsdb%0A%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br-int%20--%20--if-exists%20del-br%20br-local%20--%20--if-exists%20del-br%20br-ex%0A%0A%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20nmcli%20device%20connect%20%24iface%0A%20%20%20%20if%20%5B%20-n%20%22%24old_conn%22%20%5D%3B%20then%0A%20%20%20%20%20%20new_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%20%20%20%20%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20%20%20%20%20%23%20re-activate%20the%20profile%20so%20that%20it%20picks%20the%20master%20changes%0A%20%20%20%20%20%20nmcli%20c%20up%20%24new_conn%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20fi%0A%20%20fi%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/bin/configure-ovs.sh
- contents:
source: data:,%23%20This%20file%20is%20generated%20by%20the%20Machine%20Config%20Operator's%20containerruntimeconfig%20controller.%0A%23%0A%23%20storage.conf%20is%20the%20configuration%20file%20for%20all%20tools%0A%23%20that%20share%20the%20containers%2Fstorage%20libraries%0A%23%20See%20man%205%20containers-storage.conf%20for%20more%20information%0A%23%20The%20%22container%20storage%22%20table%20contains%20all%20of%20the%20server%20options.%0A%5Bstorage%5D%0A%0A%23%20Default%20Storage%20Driver%0Adriver%20%3D%20%22overlay%22%0A%0A%23%20Temporary%20storage%20location%0Arunroot%20%3D%20%22%2Fvar%2Frun%2Fcontainers%2Fstorage%22%0A%0A%23%20Primary%20Read%2FWrite%20location%20of%20container%20storage%0Agraphroot%20%3D%20%22%2Fvar%2Flib%2Fcontainers%2Fstorage%22%0A%0A%5Bstorage.options%5D%0A%23%20Storage%20options%20to%20be%20passed%20to%20underlying%20storage%20drivers%0A%0A%23%20AdditionalImageStores%20is%20used%20to%20pass%20paths%20to%20additional%20Read%2FOnly%20image%20stores%0A%23%20Must%20be%20comma%20separated%20list.%0Aadditionalimagestores%20%3D%20%5B%0A%5D%0A%0A%23%20Size%20is%20used%20to%20set%20a%20maximum%20size%20of%20the%20container%20image.%20%20Only%20supported%20by%0A%23%20certain%20container%20storage%20drivers.%0Asize%20%3D%20%22%22%0A%0A%23%20OverrideKernelCheck%20tells%20the%20driver%20to%20ignore%20kernel%20checks%20based%20on%20kernel%20version%0Aoverride_kernel_check%20%3D%20%22true%22%0A%0A%23%20Remap-UIDs%2FGIDs%20is%20the%20mapping%20from%20UIDs%2FGIDs%20as%20they%20should%20appear%20inside%20of%0A%23%20a%20container%2C%20to%20UIDs%2FGIDs%20as%20they%20should%20appear%20outside%20of%20the%20container%2C%20and%0A%23%20the%20length%20of%20the%20range%20of%20UIDs%2FGIDs.%20%20Additional%20mapped%20sets%20can%20be%20listed%0A%23%20and%20will%20be%20heeded%20by%20libraries%2C%20but%20there%20are%20limits%20to%20the%20number%20of%0A%23%20mappings%20which%20the%20kernel%20will%20allow%20when%20you%20later%20attempt%20to%20run%20a%0A%23%20container.%0A%23%0A%23%20remap-uids%20%3D%200%3A1668442479%3A65536%0A%23%20remap-gids%20%3D%200%3A1668442479%3A65536%0A%0A%23%20Remap-User%2FGroup%20is%20a%20name%20which%20can%20be%20used%20to%20look%20up%20one%20or%20more%20UID%2FGID%0A%23%20ranges%20in%20the%20%2Fetc%2Fsubuid%20or%20%2Fetc%2Fsubgid%20file.%20%20Mappings%20are%20set%20up%20starting%0A%23%20with%20an%20in-container%20ID%20of%200%20and%20the%20a%20host-level%20ID%20taken%20from%20the%20lowest%0A%23%20range%20that%20matches%20the%20specified%20name%2C%20and%20using%20the%20length%20of%20that%20range.%0A%23%20Additional%20ranges%20are%20then%20assigned%2C%20using%20the%20ranges%20which%20specify%20the%0A%23%20lowest%20host-level%20IDs%20first%2C%20to%20the%20lowest%20not-yet-mapped%20container-level%20ID%2C%0A%23%20until%20all%20of%20the%20entries%20have%20been%20used%20for%20maps.%0A%23%0A%23%20remap-user%20%3D%20%22storage%22%0A%23%20remap-group%20%3D%20%22storage%22%0A%0A%5Bstorage.options.thinpool%5D%0A%23%20Storage%20Options%20for%20thinpool%0A%0A%23%20autoextend_percent%20determines%20the%20amount%20by%20which%20pool%20needs%20to%20be%0A%23%20grown.%20This%20is%20specified%20in%20terms%20of%20%25%20of%20pool%20size.%20So%20a%20value%20of%2020%20means%0A%23%20that%20when%20threshold%20is%20hit%2C%20pool%20will%20be%20grown%20by%2020%25%20of%20existing%0A%23%20pool%20size.%0A%23%20autoextend_percent%20%3D%20%2220%22%0A%0A%23%20autoextend_threshold%20determines%20the%20pool%20extension%20threshold%20in%20terms%0A%23%20of%20percentage%20of%20pool%20size.%20For%20example%2C%20if%20threshold%20is%2060%2C%20that%20means%20when%0A%23%20pool%20is%2060%25%20full%2C%20threshold%20has%20been%20hit.%0A%23%20autoextend_threshold%20%3D%20%2280%22%0A%0A%23%20basesize%20specifies%20the%20size%20to%20use%20when%20creating%20the%20base%20device%2C%20which%0A%23%20limits%20the%20size%20of%20images%20and%20containers.%0A%23%20basesize%20%3D%20%2210G%22%0A%0A%23%20blocksize%20specifies%20a%20custom%20blocksize%20to%20use%20for%20the%20thin%20pool.%0A%23%20blocksize%3D%2264k%22%0A%0A%23%20directlvm_device%20specifies%20a%20custom%20block%20storage%20device%20to%20use%20for%20the%0A%23%20thin%20pool.%20Required%20if%20you%20setup%20devicemapper%0A%23%20directlvm_device%20%3D%20%22%22%0A%0A%23%20directlvm_device_force%20wipes%20device%20even%20if%20device%20already%20has%20a%20filesystem%0A%23%20directlvm_device_force%20%3D%20%22True%22%0A%0A%23%20fs%20specifies%20the%20filesystem%20type%20to%20use%20for%20the%20base%20device.%0A%23%20fs%3D%22xfs%22%0A%0A%23%20log_level%20sets%20the%20log%20level%20of%20devicemapper.%0A%23%200%3A%20LogLevelSuppress%200%20(Default)%0A%23%202%3A%20LogLevelFatal%0A%23%203%3A%20LogLevelErr%0A%23%204%3A%20LogLevelWarn%0A%23%205%3A%20LogLevelNotice%0A%23%206%3A%20LogLevelInfo%0A%23%207%3A%20LogLevelDebug%0A%23%20log_level%20%3D%20%227%22%0A%0A%23%20min_free_space%20specifies%20the%20min%20free%20space%20percent%20in%20a%20thin%20pool%20require%20for%0A%23%20new%20device%20creation%20to%20succeed.%20Valid%20values%20are%20from%200%25%20-%2099%25.%0A%23%20Value%200%25%20disables%0A%23%20min_free_space%20%3D%20%2210%25%22%0A%0A%23%20mkfsarg%20specifies%20extra%20mkfs%20arguments%20to%20be%20used%20when%20creating%20the%20base%0A%23%20device.%0A%23%20mkfsarg%20%3D%20%22%22%0A%0A%23%20mountopt%20specifies%20extra%20mount%20options%20used%20when%20mounting%20the%20thin%20devices.%0A%23%20mountopt%20%3D%20%22%22%0A%0A%23%20use_deferred_removal%20Marking%20device%20for%20deferred%20removal%0A%23%20use_deferred_removal%20%3D%20%22True%22%0A%0A%23%20use_deferred_deletion%20Marking%20device%20for%20deferred%20deletion%0A%23%20use_deferred_deletion%20%3D%20%22True%22%0A%0A%23%20xfs_nospace_max_retries%20specifies%20the%20maximum%20number%20of%20retries%20XFS%20should%0A%23%20attempt%20to%20complete%20IO%20when%20ENOSPC%20(no%20space)%20error%20is%20returned%20by%0A%23%20underlying%20storage%20device.%0A%23%20xfs_nospace_max_retries%20%3D%20%220%22%0A
mode: 420
overwrite: true
path: /etc/containers/storage.conf
- contents:
source: data:,%23%20Proxy%20environment%20variables%20will%20be%20populated%20in%20this%20file.%20Properly%0A%23%20url%20encoded%20passwords%20with%20special%20characters%20will%20use%20'%25%3CHEX%3E%3CHEX%3E'.%0A%23%20Systemd%20requires%20that%20any%20%25%20used%20in%20a%20password%20be%20represented%20as%0A%23%20%25%25%20in%20a%20unit%20file%20since%20%25%20is%20a%20prefix%20for%20macros%3B%20this%20restriction%20does%20not%0A%23%20apply%20for%20environment%20files.%20Templates%20that%20need%20the%20proxy%20set%20should%20use%0A%23%20'EnvironmentFile%3D%2Fetc%2Fmco%2Fproxy.env'.%0A
mode: 420
overwrite: true
path: /etc/mco/proxy.env
- contents:
source: data:,%5BManager%5D%0ADefaultEnvironment%3DGODEBUG%3Dx509ignoreCN%3D0%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/10-default-env-godebug.conf
- contents:
source: data:,%23%20Force-load%20legacy%20iptables%20so%20it%20is%20usable%20from%20pod%20network%20namespaces%0Aip_tables%0A
mode: 420
overwrite: true
path: /etc/modules-load.d/iptables.conf
- contents:
source: data:,NODE_SIZING_ENABLED%3Dfalse%0ASYSTEM_RESERVED_MEMORY%3D1Gi%0ASYSTEM_RESERVED_CPU%3D500m
mode: 420
overwrite: true
path: /etc/node-sizing-enabled.env
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-e%0ANODE_SIZES_ENV%3D%24%7BNODE_SIZES_ENV%3A-%2Fetc%2Fnode-sizing.env%7D%0Afunction%20dynamic_memory_sizing%20%7B%0A%20%20%20%20total_memory%3D%24(free%20-g%7Cawk%20'%2F%5EMem%3A%2F%7Bprint%20%242%7D')%0A%20%20%20%20%23%20total_memory%3D8%20test%20the%20recommended%20values%20by%20modifying%20this%20value%0A%20%20%20%20recommended_systemreserved_memory%3D0%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2025%25%20of%20the%20first%204GB%20of%20memory%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24total_memory%200.25%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D1%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2020%25%20of%20the%20next%204GB%20of%20memory%20(up%20to%208GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.20%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%208))%3B%20then%20%23%2010%25%20of%20the%20next%208GB%20of%20memory%20(up%20to%2016GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.10%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-8))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%20112))%3B%20then%20%23%206%25%20of%20the%20next%20112GB%20of%20memory%20(up%20to%20128GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%206.72%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-112))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3E%3D%200))%3B%20then%20%23%202%25%20of%20any%20memory%20above%20128GB%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.02%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%24%7Brecommended_systemreserved_memory%7DGi%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_cpu_sizing%20%7B%0A%20%20%20%20total_cpu%3D%24(getconf%20_NPROCESSORS_ONLN)%0A%20%20%20%20recommended_systemreserved_cpu%3D0%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%206%25%20of%20the%20first%20core%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24total_cpu%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D0.06%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%201%25%20of%20the%20next%20core%20(up%20to%202%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%202))%3B%20then%20%23%200.5%25%20of%20the%20next%202%20cores%20(up%20to%204%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.005%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-2))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3E%3D%200))%3B%20then%20%23%200.25%25%20of%20any%20cores%20above%204%20cores%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.0025%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%24%7Brecommended_systemreserved_cpu%7D%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_ephemeral_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_pid_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20dynamic_memory_sizing%0A%20%20%20%20dynamic_cpu_sizing%0A%20%20%20%20%23dynamic_ephemeral_sizing%0A%20%20%20%20%23dynamic_pid_sizing%0A%7D%0Afunction%20static_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%241%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%242%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0A%0Aif%20%5B%20%241%20%3D%3D%20%22true%22%20%5D%3B%20then%0A%20%20%20%20dynamic_node_sizing%0Aelif%20%5B%20%241%20%3D%3D%20%22false%22%20%5D%3B%20then%0A%20%20%20%20static_node_sizing%20%242%20%243%0Aelse%0A%20%20%20%20echo%20%22Unrecongnized%20command%20line%20option.%20Valid%20options%20are%20%5C%22true%5C%22%20or%20%5C%22false%5C%22%22%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/sbin/dynamic-system-reserved-calc.sh
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AKUBE%20API%20SERVER%20SERVING%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet-ca.crt
- contents:
source: data:,%23%20Turning%20on%20Accounting%20helps%20track%20down%20performance%20issues.%0A%5BManager%5D%0ADefaultCPUAccounting%3Dyes%0ADefaultMemoryAccounting%3Dyes%0ADefaultBlockIOAccounting%3Dyes%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/kubelet-cgroups.conf
- contents:
source: data:,%5BService%5D%0AEnvironment%3D%22KUBELET_LOG_LEVEL%3D2%22%0A
mode: 420
overwrite: true
path: /etc/systemd/system/kubelet.service.d/20-logging.conf
- contents:
source: data:,%23%20ignore%20known%20SDN-managed%20devices%0A%5Bdevice%5D%0Amatch-device%3Dinterface-name%3Abr-int%3Binterface-name%3Abr-local%3Binterface-name%3Abr-nexthop%2Cinterface-name%3Aovn-k8s-*%2Cinterface-name%3Ak8s-*%3Binterface-name%3Atun0%3Binterface-name%3Abr0%3Bdriver%3Aveth%0Amanaged%3D0%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/sdn.conf
- contents:
source: data:,D%20%2Frun%2Fnm-system-connections%200755%20root%20root%20-%20-%0AD%20%2Frun%2Fnm-system-connections-work%200755%20root%20root%20-%20-%0Ad%20%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/nm.conf
- contents:
source: data:,%7B%22auths%22%3A%7B%22example.com%22%3A%7B%22auth%22%3A%22MCC-PULL-SECRET%22%7D%7D%7D%0A
mode: 384
overwrite: true
path: /var/lib/kubelet/config.json
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AROOT%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/ca.crt
- contents:
source: data:,%23%20disable%20key%20lookup%20from%20~%2F.ssh%2Fauthorized_keys.d%2F%20on%20FCOS%0AAuthorizedKeysCommand%20none%0A
mode: 420
overwrite: true
path: /etc/ssh/sshd_config.d/10-disable-ssh-key-dir.conf
- contents:
source: data:,net.ipv4.ip_forward%20%3D%201%0Anet.ipv6.conf.all.forwarding%20%3D%201%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/forward.conf
- contents:
source: data:,%0Afs.inotify.max_user_watches%20%3D%2065536%0Afs.inotify.max_user_instances%20%3D%208192%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/inotify.conf
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20First%2C%20we%20need%20to%20wait%20until%20DHCP%20finishes%20and%20the%20node%20has%20a%20non-%60localhost%60%0A%23%20hostname%20before%20%60kubelet.service%60%20starts.%0A%23%20That's%20the%20%60--wait%60%20argument%20as%20used%20by%20%60node-valid-hostname.service%60.%0A%23%0A%23%20Second%2C%20on%20GCP%20specifically%20we%20truncate%20the%20hostname%20if%20it's%20%3E63%20characters.%0A%23%20That's%20%60gcp-hostname.service%60.%0A%0A%23%20Block%20indefinitely%20until%20the%20host%20gets%20a%20non-localhost%20name.%0A%23%20Note%20node-valid-hostname.service%20uses%20systemd%20to%20abort%20if%20this%20takes%20too%20long.%0Await_localhost()%20%7B%0A%20%20%20%20echo%20%22waiting%20for%20non-localhost%20hostname%20to%20be%20assigned%22%0A%20%20%20%20while%20%5B%5B%20%22%24(%3C%20%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%20%3D~%20(localhost%7Clocalhost.localdomain)%20%5D%5D%3B%0A%20%20%20%20do%0A%20%20%20%20%20%20%20%20sleep%201%0A%20%20%20%20done%0A%20%20%20%20echo%20%22node%20identified%20as%20%24(%3C%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_aws_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20aws%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%0A%20%20%20%20echo%20%22setting%20transient%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20--transient%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_gcp_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20gcp%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%20%20%20%20local%20type_arg%3D%22transient%22%0A%0A%20%20%20%20%23%20%2Fetc%2Fhostname%20is%20used%20for%20static%20hostnames%20and%20is%20authoritative.%0A%20%20%20%20%23%20This%20will%20check%20to%20make%20sure%20that%20the%20static%20hostname%20is%20the%0A%20%20%20%20%23%20less%20than%20or%20equal%20to%2063%20characters%20in%20length.%0A%20%20%20%20if%20%5B%20-f%20%2Fetc%2Fhostname%20%5D%20%26%26%20%5B%20%22%24(cat%20%2Fetc%2Fhostname%20%7C%20wc%20-m)%22%20-gt%200%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20etc_name%3D%22%24(%3C%20%2Fetc%2Fhostname)%22%0A%20%20%20%20%20%20%20%20type_arg%3D%22static%22%0A%20%20%20%20%20%20%20%20if%20%5B%20%22%24%7Betc_name%7D%22%20!%3D%20%22%24%7Bhost_name%7D%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22%2Fetc%2Fhostname%20is%20set%20to%20%24%7Betc_name%7D%20but%20does%20not%20match%20%24%7Bhost_name%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22using%20%2Fetc%2Fhostname%20as%20the%20authoritative%20name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20host_name%3D%22%24%7Betc_name%7D%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20fi%0A%0A%20%20%20%20%23%20Only%20mutate%20the%20hostname%20if%20the%20length%20is%20longer%20than%2063%20characters.%20The%0A%20%20%20%20%23%20hostname%20will%20be%20the%20lesser%20of%2063%20characters%20after%20the%20first%20dot%20in%20the%0A%20%20%20%20%23%20FQDN.%20%20This%20algorithm%20is%20only%20known%20to%20work%20in%20GCP%2C%20and%20hence%20is%20only%0A%20%20%20%20%23%20executed%20in%20GCP.%0A%20%20%20%20if%20%5B%20%22%24%7B%23host_name%7D%22%20-gt%2063%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20alt_name%3D%24(printf%20%22%24%7Bhost_name%7D%22%20%7C%20cut%20-f1%20-d'.'%20%7C%20cut%20-c%20-63)%0A%20%20%20%20%20%20%20%20echo%20%22%24%7Bhost_name%7D%20is%20longer%20than%2063%20characters%2C%20using%20truncated%20hostname%22%0A%20%20%20%20%20%20%20%20host_name%3D%22%24%7Balt_name%7D%22%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22setting%20%24%7Btype_arg%7D%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20%22--%24%7Btype_arg%7D%22%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aarg%3D%24%7B1%7D%3B%20shift%3B%0Acase%20%22%24%7Barg%7D%22%20in%0A%20%20%20%20--wait)%20wait_localhost%3B%3B%0A%20%20%20%20--gcp)%20set_gcp_hostname%3B%3B%0A%20%20%20%20--aws)%20set_aws_hostname%3B%3B%0A%20%20%20%20*)%20echo%20%22Unhandled%20arg%20%24arg%22%3B%20exit%201%0Aesac%0A
mode: 493
overwrite: true
path: /usr/local/bin/mco-hostname
- contents:
source: data:,
mode: 493
overwrite: true
path: /etc/kubernetes/kubelet-plugins/volume/exec/.dummy
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20Workaround%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1941714%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1935539%0A%0Adriver%3D%24(nmcli%20-t%20-m%20tabular%20-f%20general.driver%20dev%20show%20%22%24%7BDEVICE_IFACE%7D%22)%0A%0Aif%20%5B%5B%20%22%242%22%20%3D%3D%20%22up%22%20%26%26%20%22%24%7Bdriver%7D%22%20%3D%3D%20%22vmxnet3%22%20%5D%5D%3B%20then%0A%20%20logger%20-s%20%2299-vsphere-disable-tx-udp-tnl%20triggered%20by%20%24%7B2%7D%20on%20device%20%24%7BDEVICE_IFACE%7D.%22%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-segmentation%20off%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-csum-segmentation%20off%0Afi%0A
mode: 484
overwrite: true
path: /etc/NetworkManager/dispatcher.d/99-vsphere-disable-tx-udp-tnl
- contents:
source: data:text/plain,unqualified-search-registries%20%3D%20%5B%22registry.access.redhat.com%22%2C%20%22docker.io%22%5D%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2Frelease%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-1.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-2.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22blocked-reg.io%22%0A%20%20blocked%20%3D%20true%0A
mode: 420
overwrite: true
path: /etc/containers/registries.conf
- contents:
source: data:,%5Bcrio%5D%0Ainternal_wipe%20%3D%20true%0A%0A%5Bcrio.api%5D%0Astream_address%20%3D%20%22%22%0Astream_port%20%3D%20%2210010%22%0A%0A%5Bcrio.runtime%5D%0Aconmon%20%3D%20%22%2Fusr%2Flibexec%2Fcrio%2Fconmon%22%0Aconmon_cgroup%20%3D%20%22pod%22%0Adefault_env%20%3D%20%5B%0A%20%20%20%20%22NSS_SDB_USE_CACHE%3Dno%22%2C%0A%5D%0Alog_level%20%3D%20%22info%22%0Acgroup_manager%20%3D%20%22systemd%22%0Adefault_sysctls%20%3D%20%5B%0A%20%20%20%20%22net.ipv4.ping_group_range%3D0%202147483647%22%2C%0A%5D%0Ahooks_dir%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%20%20%20%20%22%2Frun%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%5D%0Amanage_ns_lifecycle%20%3D%20true%0Aabsent_mount_sources_to_reject%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fhostname%22%2C%0A%5D%0A%0A%5Bcrio.image%5D%0Aglobal_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_image%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%40sha256%3Abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%22%0Apause_image_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_command%20%3D%20%22%2Fusr%2Fbin%2Fpod%22%0A%0A%5Bcrio.network%5D%0Anetwork_dir%20%3D%20%22%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F%22%0Aplugin_dirs%20%3D%20%5B%0A%20%20%20%20%22%2Fvar%2Flib%2Fcni%2Fbin%22%2C%0A%20%20%20%20%22%2Fusr%2Flibexec%2Fcni%22%2C%0A%5D%0A%0A%5Bcrio.metrics%5D%0Aenable_metrics%20%3D%20true%0Ametrics_port%20%3D%209537%0A
mode: 420
overwrite: true
path: /etc/crio/crio.conf.d/00-default
- contents:
source: data:text/plain,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22atomic%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
mode: 420
overwrite: true
path: /etc/containers/policy.json
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/cloud.conf
- contents:
source: data:text/plain,%7B%0A%20%20%22kind%22%3A%20%22KubeletConfiguration%22%2C%0A%20%20%22apiVersion%22%3A%20%22kubelet.config.k8s.io%2Fv1beta1%22%2C%0A%20%20%22staticPodPath%22%3A%20%22%2Fetc%2Fkubernetes%2Fmanifests%22%2C%0A%20%20%22syncFrequency%22%3A%20%220s%22%2C%0A%20%20%22fileCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22httpCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22tlsCipherSuites%22%3A%20%5B%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256%22%0A%20%20%5D%2C%0A%20%20%22tlsMinVersion%22%3A%20%22VersionTLS12%22%2C%0A%20%20%22rotateCertificates%22%3A%20true%2C%0A%20%20%22serverTLSBootstrap%22%3A%20true%2C%0A%20%20%22authentication%22%3A%20%7B%0A%20%20%20%20%22x509%22%3A%20%7B%0A%20%20%20%20%20%20%22clientCAFile%22%3A%20%22%2Fetc%2Fkubernetes%2Fkubelet-ca.crt%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22anonymous%22%3A%20%7B%0A%20%20%20%20%20%20%22enabled%22%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22authorization%22%3A%20%7B%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheAuthorizedTTL%22%3A%20%220s%22%2C%0A%20%20%20%20%20%20%22cacheUnauthorizedTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22clusterDomain%22%3A%20%22cluster.local%22%2C%0A%20%20%22clusterDNS%22%3A%20%5B%0A%20%20%20%20%22172.30.0.10%22%0A%20%20%5D%2C%0A%20%20%22streamingConnectionIdleTimeout%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusUpdateFrequency%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusReportFrequency%22%3A%20%220s%22%2C%0A%20%20%22imageMinimumGCAge%22%3A%20%220s%22%2C%0A%20%20%22volumeStatsAggPeriod%22%3A%20%220s%22%2C%0A%20%20%22systemCgroups%22%3A%20%22%2Fsystem.slice%22%2C%0A%20%20%22cgroupRoot%22%3A%20%22%2F%22%2C%0A%20%20%22cgroupDriver%22%3A%20%22systemd%22%2C%0A%20%20%22cpuManagerReconcilePeriod%22%3A%20%220s%22%2C%0A%20%20%22runtimeRequestTimeout%22%3A%20%220s%22%2C%0A%20%20%22maxPods%22%3A%20250%2C%0A%20%20%22kubeAPIQPS%22%3A%2050%2C%0A%20%20%22kubeAPIBurst%22%3A%20100%2C%0A%20%20%22serializeImagePulls%22%3A%20false%2C%0A%20%20%22evictionPressureTransitionPeriod%22%3A%20%220s%22%2C%0A%20%20%22featureGates%22%3A%20%7B%0A%20%20%20%20%22APIPriorityAndFairness%22%3A%20true%2C%0A%20%20%20%20%22CSIDriverAzureDisk%22%3A%20true%2C%0A%20%20%20%20%22CSIDriverVSphere%22%3A%20true%2C%0A%20%20%20%20%22CSIMigrationAWS%22%3A%20true%2C%0A%20%20%20%20%22CSIMigrationOpenStack%22%3A%20true%2C%0A%20%20%20%20%22DownwardAPIHugePages%22%3A%20true%2C%0A%20%20%20%20%22LegacyNodeRoleBehavior%22%3A%20false%2C%0A%20%20%20%20%22NodeDisruptionExclusion%22%3A%20true%2C%0A%20%20%20%20%22RotateKubeletServerCertificate%22%3A%20true%2C%0A%20%20%20%20%22ServiceNodeExclusion%22%3A%20true%2C%0A%20%20%20%20%22SupportPodPidsLimit%22%3A%20true%0A%20%20%7D%2C%0A%20%20%22containerLogMaxSize%22%3A%20%2250Mi%22%2C%0A%20%20%22systemReserved%22%3A%20%7B%0A%20%20%20%20%22ephemeral-storage%22%3A%20%221Gi%22%0A%20%20%7D%2C%0A%20%20%22logging%22%3A%20%7B%7D%2C%0A%20%20%22shutdownGracePeriod%22%3A%20%220s%22%2C%0A%20%20%22shutdownGracePeriodCriticalPods%22%3A%20%220s%22%0A%7D%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet.conf
systemd:
units:
- dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="ENABLE_PROFILE_UNIX_SOCKET=true"
name: 10-mco-profile-unix-socket.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
name: crio.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: docker.socket
- contents: |
[Unit]
Description=Dynamically sets the system reserved for the kubelet
Wants=network-online.target
After=network-online.target ignition-firstboot-complete.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/node-sizing-enabled.env
ExecStart=/bin/bash /usr/local/sbin/dynamic-system-reserved-calc.sh ${NODE_SIZING_ENABLED} ${SYSTEM_RESERVED_MEMORY} ${SYSTEM_RESERVED_CPU}
[Install]
RequiredBy=kubelet.service
enabled: true
name: kubelet-auto-node-size.service
- contents: |
[Unit]
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target
Requires=crio.service kubelet-auto-node-size.service
After=network-online.target crio.service kubelet-auto-node-size.service
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
EnvironmentFile=/etc/node-sizing.env
ExecStart=/usr/bin/hyperkube \
kubelet \
--config=/etc/kubernetes/kubelet.conf \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=${ID} \
--node-ip=${KUBELET_NODE_IP} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--cloud-provider= \
\
--pod-infra-container-image=registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \
--system-reserved=cpu=${SYSTEM_RESERVED_CPU},memory=${SYSTEM_RESERVED_MEMORY} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
enabled: true
name: kubelet.service
- contents: |
[Unit]
Description=Machine Config Daemon Firstboot
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# Removal of this file signals firstboot completion
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
After=machine-config-daemon-pull.service
Before=crio.service kubelet.service
[Service]
Type=oneshot
RemainAfterExit=yes
# Disable existing repos (if any) so that OS extensions would use embedded RPMs only
ExecStartPre=-/usr/bin/sh -c "sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/*.repo"
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
enabled: true
name: machine-config-daemon-firstboot.service
- contents: |
[Unit]
Description=Machine Config Daemon Pull
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# This "stamp file" is unlinked when we complete
# machine-config-daemon-firstboot.service
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
# Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown
Wants=network-online.target crio-wipe.service
After=network-online.target crio-wipe.service
[Service]
Type=oneshot
RemainAfterExit=yes
# See https://github.com/coreos/fedora-coreos-tracker/issues/354
ExecStart=/bin/sh -c '/bin/mkdir -p /run/bin && chcon --reference=/usr/bin /run/bin'
ExecStart=/bin/sh -c "while ! /usr/bin/podman pull --authfile=/var/lib/kubelet/config.json --quiet '<no value>'; do sleep 1; done"
ExecStart=/bin/sh -c "/usr/bin/podman run --rm --quiet --net=host --entrypoint=cat '<no value>' /usr/bin/machine-config-daemon > /run/bin/machine-config-daemon.tmp"
ExecStart=/bin/sh -c '/usr/bin/chmod a+x /run/bin/machine-config-daemon.tmp && mv /run/bin/machine-config-daemon.tmp /run/bin/machine-config-daemon'
[Install]
RequiredBy=machine-config-daemon-firstboot.service
enabled: true
name: machine-config-daemon-pull.service
- contents: |
[Unit]
Before=NetworkManager.service
After=systemd-tmpfiles-setup.service
[Mount]
Where=/etc/NetworkManager/systemConnectionsMerged
What=overlay
Type=overlay
Options=lowerdir=/etc/NetworkManager/system-connections,upperdir=/run/nm-system-connections,workdir=/run/nm-system-connections-work
[Install]
WantedBy=multi-user.target
enabled: true
name: etc-NetworkManager-systemConnectionsMerged.mount
- contents: |
[Unit]
Description=Wait for a non-localhost hostname
Before=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/local/bin/mco-hostname --wait
# Wait up to 5min for the node to get a non-localhost name
TimeoutSec=300
[Install]
WantedBy=multi-user.target
# Ensure that network-online.target will not complete until the node has a non-localhost hostname.
RequiredBy=network-online.target
enabled: true
name: node-valid-hostname.service
- contents: |
[Unit]
Description=Writes IP address configuration so that kubelet and crio services select a valid node IP
Wants=network-online.target crio-wipe.service
After=network-online.target ignition-firstboot-complete.service crio-wipe.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
# Would prefer to do Restart=on-failure instead of this bash retry loop, but
# the version of systemd we have right now doesn't support it. It should be
# available in systemd v244 and higher.
ExecStart=/bin/bash -c " \
until \
/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
--volume /etc/systemd/system:/etc/systemd/system:z \
\
node-ip \
set \
--retry-on-failure; \
do \
sleep 5; \
done"
ExecStart=/bin/systemctl daemon-reload
[Install]
RequiredBy=kubelet.service
enabled: true
name: nodeip-configuration.service
- enabled: false
name: openvswitch.service
- contents: "[Unit]\nDescription=Configures OVS with proper host networking
configuration\n# Removal of this file signals firstboot completion\nConditionPathExists=!/etc/ignition-machine-config-encapsulated.json\n#
This service is used to move a physical NIC into OVS and reconfigure OVS
to use the host IP\nRequires=openvswitch.service\nWants=NetworkManager-wait-online.service\nAfter=NetworkManager-wait-online.service
openvswitch.service network.service\nBefore=network-online.target kubelet.service
crio.service node-valid-hostname.service\n\n[Service]\n# Need oneshot to
delay kubelet\nType=oneshot\nExecStart=/usr/local/bin/configure-ovs.sh \nStandardOutput=journal+console\nStandardError=journal+console\n\n[Install]\nWantedBy=network-online.target\n"
enabled: false
name: ovs-configuration.service
- dropins:
- contents: |
[Service]
Restart=always
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'
name: 10-ovs-vswitchd-restart.conf
name: ovs-vswitchd.service
- dropins:
- contents: |
[Service]
Restart=always
name: 10-ovsdb-restart.conf
enabled: false
name: ovsdb-server.service
- dropins:
- contents: ""
name: 10-mco-default-env.conf
name: pivot.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: zincati.service
extensions: []
fips: false
kernelArguments: []
kernelType: default
osImageURL: registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
bootstrap_test.go:251: Bootstrap rendered "rendered-worker-52022af564ba3e54e3279626f3f595b7":
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
annotations:
machineconfiguration.openshift.io/generated-by-controller-version: was-not-built-properly
creationTimestamp: null
name: rendered-worker-52022af564ba3e54e3279626f3f595b7
ownerReferences:
- apiVersion: machineconfiguration.openshift.io/v1
blockOwnerDeletion: true
controller: true
kind: MachineConfigPool
name: worker
uid: ""
spec:
config:
ignition:
version: 3.2.0
passwd:
users:
- name: core
sshAuthorizedKeys:
- ssh-rsa SSH-AUTHORIZED-KEY
storage:
files:
- contents:
source: data:,%5Bmain%5D%0Aplugins%3Dkeyfile%2Cifcfg-rh%0A%5Bkeyfile%5D%0Apath%3D%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/99-keyfiles.conf
- contents:
source: data:,
mode: 384
overwrite: true
path: /etc/pki/ca-trust/source/anchors/openshift-config-user-ca-bundle.crt
- contents:
source: data:,%23%20This%20file%20is%20managed%20by%20machine-config-operator.%0A%23%20Suppress%20audit%20rules%20which%20always%20trigger%20for%20container%0A%23%20workloads%2C%20as%20they%20spam%20the%20audit%20log.%20%20Workloads%20are%20expected%0A%23%20to%20be%20dynamic%2C%20and%20the%20networking%20stack%20uses%20iptables.%0A-a%20exclude%2Calways%20-F%20msgtype%3DNETFILTER_CFG%0A%23%20The%20default%20bridged%20networking%20enables%20promiscuous%20on%20the%20veth%0A%23%20device.%20%20Ideally%2C%20we'd%20teach%20audit%20to%20ignore%20only%20veth%20devices%2C%0A%23%20since%20one%20might%20legitimately%20care%20about%20promiscuous%20on%20real%20physical%0A%23%20devices.%20%20But%20we%20can't%20currently%20differentiate.%0A-a%20exclude%2Calways%20-F%20msgtype%3DANOM_PROMISCUOUS%0A
mode: 420
overwrite: true
path: /etc/audit/rules.d/mco-audit-quiet-containers.rules
- contents:
source: data:,r%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F80-openshift-network.conf%0Ar%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F10-ovn-kubernetes.conf%0Ad%20%2Frun%2Fmultus%2Fcni%2Fnet.d%2F%200755%20root%20root%20-%20-%0AD%20%2Fvar%2Flib%2Fcni%2Fnetworks%2Fopenshift-sdn%2F%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/cleanup-cni.conf
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/static-pod-resources/configmaps/cloud-config/ca-bundle.pem
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-eux%0A%0A%23%20This%20file%20is%20not%20needed%20anymore%20in%204.7%2B%2C%20but%20when%20rolling%20back%20to%204.6%0A%23%20the%20ovs%20pod%20needs%20it%20to%20know%20ovs%20is%20running%20on%20the%20host.%0Atouch%20%2Fvar%2Frun%2Fovs-config-executed%0A%0Aif%20%5B%20-d%20%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%20%5D%3B%20then%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0Aelse%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0Afi%0A%0A%23%20In%20RHEL7%20files%20in%20%2F%7Betc%2Crun%7D%2FNetworkManager%2Fsystem-connections%20end%20without%20the%20suffix%20'.nmconnection'%2C%20whereas%20in%20RHCOS%20they%20end%20with%20the%20suffix.%0Amanaged_nm_conn_files%3D(%24(echo%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection))%0A%0A%23%20Workaround%20to%20ensure%20OVS%20is%20installed%20due%20to%20bug%20in%20systemd%20Requires%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1888017%0Acopy_nm_conn_files()%20%7B%0A%20%20src_path%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0A%20%20dst_path%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0A%20%20if%20%5B%20-d%20%22%24src_path%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22%24src_path%20exists%22%0A%20%20%20%20for%20file%20in%20%22%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%22%3B%20do%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24src_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24dst_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20new%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20elif%20!%20cmp%20--silent%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20updated%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22Skipping%20%24file%20since%20its%20status%20is%20current%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20done%0A%20%20fi%0A%7D%0A%0A%23%20Used%20to%20replace%20an%20old%20master%20connection%20uuid%20with%20a%20new%20one%20on%20all%20connections%0Areplace_connection_master()%20%7B%0A%20%20local%20old%3D%22%241%22%0A%20%20local%20new%3D%22%242%22%0A%20%20for%20conn_uuid%20in%20%24(nmcli%20-g%20UUID%20connection%20show)%20%3B%20do%0A%20%20%20%20if%20%5B%20%22%24(nmcli%20-g%20connection.master%20connection%20show%20uuid%20%22%24conn_uuid%22)%22%20!%3D%20%22%24old%22%20%5D%3B%20then%0A%20%20%20%20%20%20continue%0A%20%20%20%20fi%0A%0A%20%20%20%20nmcli%20conn%20mod%20uuid%20%24conn_uuid%20connection.master%20%22%24new%22%0A%20%20%20%20%23%20make%20sure%20we%20persist%20this%20modification%0A%20%20%20%20conn_file%3D%22%24(egrep%20-l%20uuid%3D%24conn_uuid%20%24%7BNM_CONN_PATH%7D%2F*%20%7C%20xargs%20basename)%22%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24conn_file%22%20%26%26%20!%20%22%20%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%20%22%20%3D~%20%22%20%24%7Bconn_file%7D%20%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20managed_nm_conn_files%2B%3D(%24conn_file)%0A%20%20%20%20fi%0A%20%20done%0A%7D%0A%0Aif%20!%20rpm%20-qa%20%7C%20grep%20-q%20openvswitch%3B%20then%0A%20%20echo%20%22Warning%3A%20Openvswitch%20package%20is%20not%20installed!%22%0A%20%20exit%201%0Afi%0A%0Aif%20%5B%20%22%241%22%20%3D%3D%20%22OVNKubernetes%22%20%5D%3B%20then%0A%20%20%23%20Configures%20NICs%20onto%20OVS%20bridge%20%22br-ex%22%0A%20%20%23%20Configuration%20is%20either%20auto-detected%20or%20provided%20through%20a%20config%20file%20written%20already%20in%20Network%20Manager%0A%20%20%23%20key%20files%20under%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%0A%20%20%23%20Managing%20key%20files%20is%20outside%20of%20the%20scope%20of%20this%20script%0A%0A%20%20%23%20if%20the%20interface%20is%20of%20type%20vmxnet3%20add%20multicast%20capability%20for%20that%20driver%0A%20%20%23%20REMOVEME%3A%20Once%20BZ%3A1854355%20is%20fixed%2C%20this%20needs%20to%20get%20removed.%0A%20%20function%20configure_driver_options%20%7B%0A%20%20%20%20intf%3D%241%0A%20%20%20%20driver%3D%24(cat%20%22%2Fsys%2Fclass%2Fnet%2F%24%7Bintf%7D%2Fdevice%2Fuevent%22%20%7C%20grep%20DRIVER%20%7C%20awk%20-F%20%22%3D%22%20'%7Bprint%20%242%7D')%0A%20%20%20%20echo%20%22Driver%20name%20is%22%20%24driver%0A%20%20%20%20if%20%5B%20%22%24driver%22%20%3D%20%22vmxnet3%22%20%5D%3B%20then%0A%20%20%20%20%20%20ifconfig%20%22%24intf%22%20allmulti%0A%20%20%20%20fi%0A%20%20%7D%0A%0A%20%20iface%3D%22%22%0A%20%20counter%3D0%0A%20%20%23%20find%20default%20interface%0A%20%20while%20%5B%20%24counter%20-lt%2012%20%5D%3B%20do%0A%20%20%20%20%23%20check%20ipv4%0A%20%20%20%20iface%3D%24(ip%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv4%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20%23%20check%20ipv6%0A%20%20%20%20iface%3D%24(ip%20-6%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv6%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20%20%20echo%20%22No%20default%20route%20found%20on%20attempt%3A%20%24%7Bcounter%7D%22%0A%20%20%20%20sleep%205%0A%20%20done%0A%0A%20%20if%20%5B%20%22%24iface%22%20%3D%20%22br-ex%22%20%5D%3B%20then%0A%20%20%20%20%23%20handle%20vlans%20and%20bonds%20etc%20if%20they%20have%20already%20been%0A%20%20%20%20%23%20configured%20via%20nm%20key%20files%20and%20br-ex%20is%20already%20up%0A%20%20%20%20ifaces%3D%24(ovs-vsctl%20list-ifaces%20%24%7Biface%7D)%0A%20%20%20%20for%20intf%20in%20%24ifaces%3B%20do%20configure_driver_options%20%24intf%3B%20done%0A%20%20%20%20echo%20%22Networking%20already%20configured%20and%20up%20for%20br-ex!%22%0A%20%20%20%20%23%20remove%20bridges%20created%20by%20openshift-sdn%0A%20%20%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br0%0A%20%20%20%20exit%200%0A%20%20fi%0A%0A%20%20if%20%5B%20-z%20%22%24iface%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22ERROR%3A%20Unable%20to%20find%20default%20gateway%20interface%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20%23%20find%20the%20MAC%20from%20OVS%20config%20or%20the%20default%20interface%20to%20use%20for%20OVS%20internal%20port%0A%20%20%23%20this%20prevents%20us%20from%20getting%20a%20different%20DHCP%20lease%20and%20dropping%20connection%0A%20%20if%20!%20iface_mac%3D%24(%3C%22%2Fsys%2Fclass%2Fnet%2F%24%7Biface%7D%2Faddress%22)%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MAC%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20echo%20%22MAC%20address%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mac%7D%22%0A%0A%20%20%23%20find%20MTU%20from%20original%20iface%0A%20%20iface_mtu%3D%24(ip%20link%20show%20%22%24iface%22%20%7C%20awk%20'%7Bprint%20%245%3B%20exit%7D')%0A%20%20if%20%5B%5B%20-z%20%22%24iface_mtu%22%20%5D%5D%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MTU%2C%20defaulting%20to%201500%22%0A%20%20%20%20iface_mtu%3D1500%0A%20%20else%0A%20%20%20%20echo%20%22MTU%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mtu%7D%22%0A%20%20fi%0A%0A%20%20%23%20store%20old%20conn%20for%20later%0A%20%20old_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%0A%20%20extra_brex_args%3D%22%22%0A%20%20%23%20check%20for%20dhcp%20client%20ids%0A%20%20dhcp_client_id%3D%24(nmcli%20--get-values%20ipv4.dhcp-client-id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv4.dhcp-client-id%20%24%7Bdhcp_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20dhcp6_client_id%3D%24(nmcli%20--get-values%20ipv6.dhcp-duid%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp6_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv6.dhcp-duid%20%24%7Bdhcp6_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20%23%20create%20bridge%3B%20use%20NM's%20ethernet%20device%20default%20route%20metric%20(100)%0A%20%20if%20!%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-bridge%20%5C%0A%20%20%20%20%20%20%20%20con-name%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20conn.interface%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20ipv6.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20%24%7Bextra_brex_args%7D%0A%20%20fi%0A%0A%20%20%23%20find%20default%20port%20to%20add%20to%20bridge%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20%24%7Biface%7D%20master%20br-ex%20con-name%20ovs-port-phys0%0A%20%20fi%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20br-ex%20master%20br-ex%20con-name%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20extra_phys_args%3D()%0A%20%20%23%20check%20if%20this%20interface%20is%20a%20vlan%2C%20bond%2C%20team%2C%20or%20ethernet%20type%0A%20%20if%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22vlan%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dvlan%0A%20%20%20%20vlan_id%3D%24(nmcli%20--get-values%20vlan.id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_id%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_id%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20vlan_parent%3D%24(nmcli%20--get-values%20vlan.parent%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_parent%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_parent%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20extra_phys_args%3D(%20dev%20%22%24%7Bvlan_parent%7D%22%20id%20%22%24%7Bvlan_id%7D%22%20)%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22bond%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dbond%0A%20%20%20%20%23%20check%20bond%20options%0A%20%20%20%20bond_opts%3D%24(nmcli%20--get-values%20bond.options%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24bond_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20bond.options%20%22%24%7Bbond_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22team%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dteam%0A%20%20%20%20%23%20check%20team%20config%20options%0A%20%20%20%20team_config_opts%3D%24(nmcli%20--get-values%20team.config%20-e%20no%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24team_config_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20team.config%20%22%24%7Bteam_config_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20else%0A%20%20%20%20iface_type%3D802-3-ethernet%0A%20%20fi%0A%0A%20%20%23%20use%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%20instead%20of%20%24%7Bextra_phys_args%5B%40%5D%7D%20to%20be%20compatible%20with%20bash%204.2%20in%20RHEL7.9%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20%24%7Biface_type%7D%20conn.interface%20%24%7Biface%7D%20master%20ovs-port-phys0%20con-name%20ovs-if-phys0%20%5C%0A%20%20%20%20connection.autoconnect-priority%20100%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%0A%20%20fi%0A%0A%20%20%23%20Get%20the%20new%20connection%20uuid%0A%20%20new_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%0A%20%20%23%20Setup%20an%20exit%20trap%20to%20restore%20any%20modifications%20going%20further%0A%20%20handle_exit_error()%20%7B%0A%20%20%20%20e%3D%24%3F%0A%20%20%20%20%5B%20%24e%20-eq%200%20%5D%20%26%26%20exit%200%0A%20%20%20%20%23%20if%20there%20was%20a%20problem%20network%20isn't%20coming%20up%2C%20revert%20for%20debugging%0A%20%20%20%20set%20%2Be%0A%20%20%20%20replace_connection_master%20%24new_conn%20%24old_conn%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-br-ex%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-phys0%0A%20%20%20%20nmcli%20conn%20up%20%24old_conn%0A%20%20%20%20exit%20%24e%0A%20%20%7D%0A%20%20trap%20%22handle_exit_error%22%20EXIT%0A%0A%20%20%23%20Update%20connections%20with%20master%20property%20set%20to%20use%20the%20new%20connection%0A%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20replace_connection_master%20%24iface%20%24new_conn%0A%0A%20%20%23%20bring%20down%20old%20iface%0A%20%20nmcli%20device%20disconnect%20%24iface%0A%0A%20%20%23%20bring%20up%20new%20connection%20%0A%20%20nmcli%20conn%20up%20ovs-if-phys0%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20if%20nmcli%20--fields%20ipv4.method%2Cipv6.method%20conn%20show%20%24old_conn%20%7C%20grep%20manual%3B%20then%0A%20%20%20%20%20%20echo%20%22Static%20IP%20addressing%20detected%20on%20default%20gateway%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20%23%20find%20and%20copy%20the%20old%20connection%20to%20get%20the%20address%20settings%0A%20%20%20%20%20%20if%20egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*%3B%20then%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24(egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*)%0A%20%20%20%20%20%20%20%20cloned%3Dfalse%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20unable%20to%20find%20NM%20configuration%20file%20for%20conn%3A%20%24%7Bold_conn%7D.%20Attempting%20to%20clone%20conn%22%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24%7BNM_CONN_PATH%7D%2F%24%7Bold_conn%7D-clone.nmconnection%0A%20%20%20%20%20%20%20%20nmcli%20conn%20clone%20%24%7Bold_conn%7D%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20cloned%3Dtrue%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24old_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20locate%20cloned%20conn%20file%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20%20%20%20%20exit%201%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20%20%20echo%20%22Successfully%20cloned%20conn%20to%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20echo%20%22old%20connection%20file%20found%20at%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20new_conn_file%3D%24%7BNM_CONN_PATH%7D%2Fovs-if-br-ex.nmconnection%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24new_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20existing%20br-ex%20interface%20file%20found%3A%20%24new_conn_file%2C%20which%20is%20not%20loaded%20in%20NetworkManager...overwriting%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cp%20-f%20%24%7Bold_conn_file%7D%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20restorecon%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20%24cloned%3B%20then%0A%20%20%20%20%20%20%20%20nmcli%20conn%20delete%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20rm%20-f%20%24%7Bold_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20ovs_port_conn%3D%24(nmcli%20--fields%20connection.uuid%20conn%20show%20ovs-port-br-ex%20%7C%20awk%20'%7Bprint%20%242%7D')%0A%20%20%20%20%20%20br_iface_uuid%3D%24(cat%20%2Fproc%2Fsys%2Fkernel%2Frandom%2Fuuid)%0A%20%20%20%20%20%20%23%20modify%20file%20to%20work%20with%20OVS%20and%20have%20unique%20settings%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Euuid%3D.*%24%2Fuuid%3D'%22%24br_iface_uuid%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5Emulti-connect%3D.*%24%2Fd'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Etype%3D.*%24%2Ftype%3Dovs-interface%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Eid%3D.*%24%2Fid%3Dovs-if-br-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20slave-type%3Dovs-port'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20master%3D'%22%24ovs_port_conn%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20grep%20'interface-name%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Einterface-name%3D.*%24%2Finterface-name%3Dbr-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20interface-name%3Dbr-ex'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20!%20grep%20'cloned-mac-address%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20cloned-mac-address%3D'%22%24iface_mac%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Ecloned-mac-address%3D.*%24%2Fcloned-mac-address%3D'%22%24iface_mac%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20grep%20'mtu%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Emtu%3D.*%24%2Fmtu%3D'%22%24iface_mtu%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20mtu%3D'%22%24iface_mtu%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cat%20%3C%3CEOF%20%3E%3E%20%24%7Bnew_conn_file%7D%0A%5Bovs-interface%5D%0Atype%3Dinternal%0AEOF%0A%20%20%20%20%20%20nmcli%20c%20load%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20echo%20%22Loaded%20new%20ovs-if-br-ex%20connection%20file%3A%20%24%7Bnew_conn_file%7D%22%0A%20%20%20%20else%0A%20%20%20%20%20%20nmcli%20c%20add%20type%20ovs-interface%20slave-type%20ovs-port%20conn.interface%20br-ex%20master%20ovs-port-br-ex%20con-name%20%5C%0A%20%20%20%20%20%20%20%20ovs-if-br-ex%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20802-3-ethernet.cloned-mac-address%20%24%7Biface_mac%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20ipv6.route-metric%20100%0A%20%20%20%20fi%0A%20%20fi%0A%0A%20%20%23%20wait%20for%20DHCP%20to%20finish%2C%20verify%20connection%20is%20up%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20sleep%205%0A%20%20%20%20%23%20check%20if%20connection%20is%20active%0A%20%20%20%20if%20nmcli%20--fields%20GENERAL.STATE%20conn%20show%20ovs-if-br-ex%20%7C%20grep%20-i%20%22activated%22%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22WARN%3A%20OVS%20did%20not%20succesfully%20activate%20NM%20connection.%20Attempting%20to%20bring%20up%20connections%22%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20if%20nmcli%20conn%20up%20ovs-if-br-ex%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20sleep%205%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22ERROR%3A%20Failed%20to%20activate%20ovs-if-br-ex%20NM%20connection%22%0A%20%20exit%201%0Aelif%20%5B%20%22%241%22%20%3D%3D%20%22OpenShiftSDN%22%20%5D%3B%20then%0A%20%20%23%20Revert%20changes%20made%20by%20%2Fusr%2Flocal%2Fbin%2Fconfigure-ovs.sh.%0A%20%20%23%20Remove%20OVS%20bridge%20%22br-ex%22.%20Use%20the%20default%20NIC%20for%20cluster%20network.%0A%20%20iface%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20iface%3D%24(nmcli%20--get-values%20connection.interface-name%20connection%20show%20ovs-port-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-port-phys0%20%0A%20%20fi%0A%0A%20%20old_conn%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20old_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-if-phys0%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-if-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20br-ex%0A%20%20fi%0A%0A%20%20rm%20-f%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection%0A%20%20%23%20remove%20bridges%20created%20by%20ovn-kubernetes%2C%20try%20to%20delete%20br-ex%20again%20in%20case%20NM%20fail%20to%20talk%20to%20ovsdb%0A%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br-int%20--%20--if-exists%20del-br%20br-local%20--%20--if-exists%20del-br%20br-ex%0A%0A%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20nmcli%20device%20connect%20%24iface%0A%20%20%20%20if%20%5B%20-n%20%22%24old_conn%22%20%5D%3B%20then%0A%20%20%20%20%20%20new_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%20%20%20%20%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20%20%20%20%20%23%20re-activate%20the%20profile%20so%20that%20it%20picks%20the%20master%20changes%0A%20%20%20%20%20%20nmcli%20c%20up%20%24new_conn%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20fi%0A%20%20fi%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/bin/configure-ovs.sh
- contents:
source: data:,%23%20This%20file%20is%20generated%20by%20the%20Machine%20Config%20Operator's%20containerruntimeconfig%20controller.%0A%23%0A%23%20storage.conf%20is%20the%20configuration%20file%20for%20all%20tools%0A%23%20that%20share%20the%20containers%2Fstorage%20libraries%0A%23%20See%20man%205%20containers-storage.conf%20for%20more%20information%0A%23%20The%20%22container%20storage%22%20table%20contains%20all%20of%20the%20server%20options.%0A%5Bstorage%5D%0A%0A%23%20Default%20Storage%20Driver%0Adriver%20%3D%20%22overlay%22%0A%0A%23%20Temporary%20storage%20location%0Arunroot%20%3D%20%22%2Fvar%2Frun%2Fcontainers%2Fstorage%22%0A%0A%23%20Primary%20Read%2FWrite%20location%20of%20container%20storage%0Agraphroot%20%3D%20%22%2Fvar%2Flib%2Fcontainers%2Fstorage%22%0A%0A%5Bstorage.options%5D%0A%23%20Storage%20options%20to%20be%20passed%20to%20underlying%20storage%20drivers%0A%0A%23%20AdditionalImageStores%20is%20used%20to%20pass%20paths%20to%20additional%20Read%2FOnly%20image%20stores%0A%23%20Must%20be%20comma%20separated%20list.%0Aadditionalimagestores%20%3D%20%5B%0A%5D%0A%0A%23%20Size%20is%20used%20to%20set%20a%20maximum%20size%20of%20the%20container%20image.%20%20Only%20supported%20by%0A%23%20certain%20container%20storage%20drivers.%0Asize%20%3D%20%22%22%0A%0A%23%20OverrideKernelCheck%20tells%20the%20driver%20to%20ignore%20kernel%20checks%20based%20on%20kernel%20version%0Aoverride_kernel_check%20%3D%20%22true%22%0A%0A%23%20Remap-UIDs%2FGIDs%20is%20the%20mapping%20from%20UIDs%2FGIDs%20as%20they%20should%20appear%20inside%20of%0A%23%20a%20container%2C%20to%20UIDs%2FGIDs%20as%20they%20should%20appear%20outside%20of%20the%20container%2C%20and%0A%23%20the%20length%20of%20the%20range%20of%20UIDs%2FGIDs.%20%20Additional%20mapped%20sets%20can%20be%20listed%0A%23%20and%20will%20be%20heeded%20by%20libraries%2C%20but%20there%20are%20limits%20to%20the%20number%20of%0A%23%20mappings%20which%20the%20kernel%20will%20allow%20when%20you%20later%20attempt%20to%20run%20a%0A%23%20container.%0A%23%0A%23%20remap-uids%20%3D%200%3A1668442479%3A65536%0A%23%20remap-gids%20%3D%200%3A1668442479%3A65536%0A%0A%23%20Remap-User%2FGroup%20is%20a%20name%20which%20can%20be%20used%20to%20look%20up%20one%20or%20more%20UID%2FGID%0A%23%20ranges%20in%20the%20%2Fetc%2Fsubuid%20or%20%2Fetc%2Fsubgid%20file.%20%20Mappings%20are%20set%20up%20starting%0A%23%20with%20an%20in-container%20ID%20of%200%20and%20the%20a%20host-level%20ID%20taken%20from%20the%20lowest%0A%23%20range%20that%20matches%20the%20specified%20name%2C%20and%20using%20the%20length%20of%20that%20range.%0A%23%20Additional%20ranges%20are%20then%20assigned%2C%20using%20the%20ranges%20which%20specify%20the%0A%23%20lowest%20host-level%20IDs%20first%2C%20to%20the%20lowest%20not-yet-mapped%20container-level%20ID%2C%0A%23%20until%20all%20of%20the%20entries%20have%20been%20used%20for%20maps.%0A%23%0A%23%20remap-user%20%3D%20%22storage%22%0A%23%20remap-group%20%3D%20%22storage%22%0A%0A%5Bstorage.options.thinpool%5D%0A%23%20Storage%20Options%20for%20thinpool%0A%0A%23%20autoextend_percent%20determines%20the%20amount%20by%20which%20pool%20needs%20to%20be%0A%23%20grown.%20This%20is%20specified%20in%20terms%20of%20%25%20of%20pool%20size.%20So%20a%20value%20of%2020%20means%0A%23%20that%20when%20threshold%20is%20hit%2C%20pool%20will%20be%20grown%20by%2020%25%20of%20existing%0A%23%20pool%20size.%0A%23%20autoextend_percent%20%3D%20%2220%22%0A%0A%23%20autoextend_threshold%20determines%20the%20pool%20extension%20threshold%20in%20terms%0A%23%20of%20percentage%20of%20pool%20size.%20For%20example%2C%20if%20threshold%20is%2060%2C%20that%20means%20when%0A%23%20pool%20is%2060%25%20full%2C%20threshold%20has%20been%20hit.%0A%23%20autoextend_threshold%20%3D%20%2280%22%0A%0A%23%20basesize%20specifies%20the%20size%20to%20use%20when%20creating%20the%20base%20device%2C%20which%0A%23%20limits%20the%20size%20of%20images%20and%20containers.%0A%23%20basesize%20%3D%20%2210G%22%0A%0A%23%20blocksize%20specifies%20a%20custom%20blocksize%20to%20use%20for%20the%20thin%20pool.%0A%23%20blocksize%3D%2264k%22%0A%0A%23%20directlvm_device%20specifies%20a%20custom%20block%20storage%20device%20to%20use%20for%20the%0A%23%20thin%20pool.%20Required%20if%20you%20setup%20devicemapper%0A%23%20directlvm_device%20%3D%20%22%22%0A%0A%23%20directlvm_device_force%20wipes%20device%20even%20if%20device%20already%20has%20a%20filesystem%0A%23%20directlvm_device_force%20%3D%20%22True%22%0A%0A%23%20fs%20specifies%20the%20filesystem%20type%20to%20use%20for%20the%20base%20device.%0A%23%20fs%3D%22xfs%22%0A%0A%23%20log_level%20sets%20the%20log%20level%20of%20devicemapper.%0A%23%200%3A%20LogLevelSuppress%200%20(Default)%0A%23%202%3A%20LogLevelFatal%0A%23%203%3A%20LogLevelErr%0A%23%204%3A%20LogLevelWarn%0A%23%205%3A%20LogLevelNotice%0A%23%206%3A%20LogLevelInfo%0A%23%207%3A%20LogLevelDebug%0A%23%20log_level%20%3D%20%227%22%0A%0A%23%20min_free_space%20specifies%20the%20min%20free%20space%20percent%20in%20a%20thin%20pool%20require%20for%0A%23%20new%20device%20creation%20to%20succeed.%20Valid%20values%20are%20from%200%25%20-%2099%25.%0A%23%20Value%200%25%20disables%0A%23%20min_free_space%20%3D%20%2210%25%22%0A%0A%23%20mkfsarg%20specifies%20extra%20mkfs%20arguments%20to%20be%20used%20when%20creating%20the%20base%0A%23%20device.%0A%23%20mkfsarg%20%3D%20%22%22%0A%0A%23%20mountopt%20specifies%20extra%20mount%20options%20used%20when%20mounting%20the%20thin%20devices.%0A%23%20mountopt%20%3D%20%22%22%0A%0A%23%20use_deferred_removal%20Marking%20device%20for%20deferred%20removal%0A%23%20use_deferred_removal%20%3D%20%22True%22%0A%0A%23%20use_deferred_deletion%20Marking%20device%20for%20deferred%20deletion%0A%23%20use_deferred_deletion%20%3D%20%22True%22%0A%0A%23%20xfs_nospace_max_retries%20specifies%20the%20maximum%20number%20of%20retries%20XFS%20should%0A%23%20attempt%20to%20complete%20IO%20when%20ENOSPC%20(no%20space)%20error%20is%20returned%20by%0A%23%20underlying%20storage%20device.%0A%23%20xfs_nospace_max_retries%20%3D%20%220%22%0A
mode: 420
overwrite: true
path: /etc/containers/storage.conf
- contents:
source: data:,%23%20Proxy%20environment%20variables%20will%20be%20populated%20in%20this%20file.%20Properly%0A%23%20url%20encoded%20passwords%20with%20special%20characters%20will%20use%20'%25%3CHEX%3E%3CHEX%3E'.%0A%23%20Systemd%20requires%20that%20any%20%25%20used%20in%20a%20password%20be%20represented%20as%0A%23%20%25%25%20in%20a%20unit%20file%20since%20%25%20is%20a%20prefix%20for%20macros%3B%20this%20restriction%20does%20not%0A%23%20apply%20for%20environment%20files.%20Templates%20that%20need%20the%20proxy%20set%20should%20use%0A%23%20'EnvironmentFile%3D%2Fetc%2Fmco%2Fproxy.env'.%0A
mode: 420
overwrite: true
path: /etc/mco/proxy.env
- contents:
source: data:,%5BManager%5D%0ADefaultEnvironment%3DGODEBUG%3Dx509ignoreCN%3D0%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/10-default-env-godebug.conf
- contents:
source: data:,%23%20Force-load%20legacy%20iptables%20so%20it%20is%20usable%20from%20pod%20network%20namespaces%0Aip_tables%0A
mode: 420
overwrite: true
path: /etc/modules-load.d/iptables.conf
- contents:
source: data:text/plain,NODE_SIZING_ENABLED%3Dfalse%0ASYSTEM_RESERVED_MEMORY%3D500Mi%0ASYSTEM_RESERVED_CPU%3D1000m%0A
mode: 420
overwrite: true
path: /etc/node-sizing-enabled.env
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-e%0ANODE_SIZES_ENV%3D%24%7BNODE_SIZES_ENV%3A-%2Fetc%2Fnode-sizing.env%7D%0Afunction%20dynamic_memory_sizing%20%7B%0A%20%20%20%20total_memory%3D%24(free%20-g%7Cawk%20'%2F%5EMem%3A%2F%7Bprint%20%242%7D')%0A%20%20%20%20%23%20total_memory%3D8%20test%20the%20recommended%20values%20by%20modifying%20this%20value%0A%20%20%20%20recommended_systemreserved_memory%3D0%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2025%25%20of%20the%20first%204GB%20of%20memory%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24total_memory%200.25%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D1%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2020%25%20of%20the%20next%204GB%20of%20memory%20(up%20to%208GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.20%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%208))%3B%20then%20%23%2010%25%20of%20the%20next%208GB%20of%20memory%20(up%20to%2016GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.10%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-8))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%20112))%3B%20then%20%23%206%25%20of%20the%20next%20112GB%20of%20memory%20(up%20to%20128GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%206.72%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-112))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3E%3D%200))%3B%20then%20%23%202%25%20of%20any%20memory%20above%20128GB%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.02%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%24%7Brecommended_systemreserved_memory%7DGi%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_cpu_sizing%20%7B%0A%20%20%20%20total_cpu%3D%24(getconf%20_NPROCESSORS_ONLN)%0A%20%20%20%20recommended_systemreserved_cpu%3D0%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%206%25%20of%20the%20first%20core%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24total_cpu%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D0.06%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%201%25%20of%20the%20next%20core%20(up%20to%202%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%202))%3B%20then%20%23%200.5%25%20of%20the%20next%202%20cores%20(up%20to%204%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.005%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-2))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3E%3D%200))%3B%20then%20%23%200.25%25%20of%20any%20cores%20above%204%20cores%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.0025%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%24%7Brecommended_systemreserved_cpu%7D%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_ephemeral_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_pid_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20dynamic_memory_sizing%0A%20%20%20%20dynamic_cpu_sizing%0A%20%20%20%20%23dynamic_ephemeral_sizing%0A%20%20%20%20%23dynamic_pid_sizing%0A%7D%0Afunction%20static_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%241%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%242%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0A%0Aif%20%5B%20%241%20%3D%3D%20%22true%22%20%5D%3B%20then%0A%20%20%20%20dynamic_node_sizing%0Aelif%20%5B%20%241%20%3D%3D%20%22false%22%20%5D%3B%20then%0A%20%20%20%20static_node_sizing%20%242%20%243%0Aelse%0A%20%20%20%20echo%20%22Unrecongnized%20command%20line%20option.%20Valid%20options%20are%20%5C%22true%5C%22%20or%20%5C%22false%5C%22%22%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/sbin/dynamic-system-reserved-calc.sh
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AKUBE%20API%20SERVER%20SERVING%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet-ca.crt
- contents:
source: data:,%23%20Turning%20on%20Accounting%20helps%20track%20down%20performance%20issues.%0A%5BManager%5D%0ADefaultCPUAccounting%3Dyes%0ADefaultMemoryAccounting%3Dyes%0ADefaultBlockIOAccounting%3Dyes%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/kubelet-cgroups.conf
- contents:
source: data:,%5BService%5D%0AEnvironment%3D%22KUBELET_LOG_LEVEL%3D2%22%0A
mode: 420
overwrite: true
path: /etc/systemd/system/kubelet.service.d/20-logging.conf
- contents:
source: data:,%23%20ignore%20known%20SDN-managed%20devices%0A%5Bdevice%5D%0Amatch-device%3Dinterface-name%3Abr-int%3Binterface-name%3Abr-local%3Binterface-name%3Abr-nexthop%2Cinterface-name%3Aovn-k8s-*%2Cinterface-name%3Ak8s-*%3Binterface-name%3Atun0%3Binterface-name%3Abr0%3Bdriver%3Aveth%0Amanaged%3D0%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/sdn.conf
- contents:
source: data:,D%20%2Frun%2Fnm-system-connections%200755%20root%20root%20-%20-%0AD%20%2Frun%2Fnm-system-connections-work%200755%20root%20root%20-%20-%0Ad%20%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/nm.conf
- contents:
source: data:,%7B%22auths%22%3A%7B%22example.com%22%3A%7B%22auth%22%3A%22MCC-PULL-SECRET%22%7D%7D%7D%0A
mode: 384
overwrite: true
path: /var/lib/kubelet/config.json
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AROOT%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/ca.crt
- contents:
source: data:,%23%20disable%20key%20lookup%20from%20~%2F.ssh%2Fauthorized_keys.d%2F%20on%20FCOS%0AAuthorizedKeysCommand%20none%0A
mode: 420
overwrite: true
path: /etc/ssh/sshd_config.d/10-disable-ssh-key-dir.conf
- contents:
source: data:,net.ipv4.ip_forward%20%3D%201%0Anet.ipv6.conf.all.forwarding%20%3D%201%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/forward.conf
- contents:
source: data:,%0Afs.inotify.max_user_watches%20%3D%2065536%0Afs.inotify.max_user_instances%20%3D%208192%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/inotify.conf
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20First%2C%20we%20need%20to%20wait%20until%20DHCP%20finishes%20and%20the%20node%20has%20a%20non-%60localhost%60%0A%23%20hostname%20before%20%60kubelet.service%60%20starts.%0A%23%20That's%20the%20%60--wait%60%20argument%20as%20used%20by%20%60node-valid-hostname.service%60.%0A%23%0A%23%20Second%2C%20on%20GCP%20specifically%20we%20truncate%20the%20hostname%20if%20it's%20%3E63%20characters.%0A%23%20That's%20%60gcp-hostname.service%60.%0A%0A%23%20Block%20indefinitely%20until%20the%20host%20gets%20a%20non-localhost%20name.%0A%23%20Note%20node-valid-hostname.service%20uses%20systemd%20to%20abort%20if%20this%20takes%20too%20long.%0Await_localhost()%20%7B%0A%20%20%20%20echo%20%22waiting%20for%20non-localhost%20hostname%20to%20be%20assigned%22%0A%20%20%20%20while%20%5B%5B%20%22%24(%3C%20%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%20%3D~%20(localhost%7Clocalhost.localdomain)%20%5D%5D%3B%0A%20%20%20%20do%0A%20%20%20%20%20%20%20%20sleep%201%0A%20%20%20%20done%0A%20%20%20%20echo%20%22node%20identified%20as%20%24(%3C%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_aws_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20aws%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%0A%20%20%20%20echo%20%22setting%20transient%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20--transient%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_gcp_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20gcp%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%20%20%20%20local%20type_arg%3D%22transient%22%0A%0A%20%20%20%20%23%20%2Fetc%2Fhostname%20is%20used%20for%20static%20hostnames%20and%20is%20authoritative.%0A%20%20%20%20%23%20This%20will%20check%20to%20make%20sure%20that%20the%20static%20hostname%20is%20the%0A%20%20%20%20%23%20less%20than%20or%20equal%20to%2063%20characters%20in%20length.%0A%20%20%20%20if%20%5B%20-f%20%2Fetc%2Fhostname%20%5D%20%26%26%20%5B%20%22%24(cat%20%2Fetc%2Fhostname%20%7C%20wc%20-m)%22%20-gt%200%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20etc_name%3D%22%24(%3C%20%2Fetc%2Fhostname)%22%0A%20%20%20%20%20%20%20%20type_arg%3D%22static%22%0A%20%20%20%20%20%20%20%20if%20%5B%20%22%24%7Betc_name%7D%22%20!%3D%20%22%24%7Bhost_name%7D%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22%2Fetc%2Fhostname%20is%20set%20to%20%24%7Betc_name%7D%20but%20does%20not%20match%20%24%7Bhost_name%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22using%20%2Fetc%2Fhostname%20as%20the%20authoritative%20name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20host_name%3D%22%24%7Betc_name%7D%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20fi%0A%0A%20%20%20%20%23%20Only%20mutate%20the%20hostname%20if%20the%20length%20is%20longer%20than%2063%20characters.%20The%0A%20%20%20%20%23%20hostname%20will%20be%20the%20lesser%20of%2063%20characters%20after%20the%20first%20dot%20in%20the%0A%20%20%20%20%23%20FQDN.%20%20This%20algorithm%20is%20only%20known%20to%20work%20in%20GCP%2C%20and%20hence%20is%20only%0A%20%20%20%20%23%20executed%20in%20GCP.%0A%20%20%20%20if%20%5B%20%22%24%7B%23host_name%7D%22%20-gt%2063%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20alt_name%3D%24(printf%20%22%24%7Bhost_name%7D%22%20%7C%20cut%20-f1%20-d'.'%20%7C%20cut%20-c%20-63)%0A%20%20%20%20%20%20%20%20echo%20%22%24%7Bhost_name%7D%20is%20longer%20than%2063%20characters%2C%20using%20truncated%20hostname%22%0A%20%20%20%20%20%20%20%20host_name%3D%22%24%7Balt_name%7D%22%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22setting%20%24%7Btype_arg%7D%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20%22--%24%7Btype_arg%7D%22%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aarg%3D%24%7B1%7D%3B%20shift%3B%0Acase%20%22%24%7Barg%7D%22%20in%0A%20%20%20%20--wait)%20wait_localhost%3B%3B%0A%20%20%20%20--gcp)%20set_gcp_hostname%3B%3B%0A%20%20%20%20--aws)%20set_aws_hostname%3B%3B%0A%20%20%20%20*)%20echo%20%22Unhandled%20arg%20%24arg%22%3B%20exit%201%0Aesac%0A
mode: 493
overwrite: true
path: /usr/local/bin/mco-hostname
- contents:
source: data:,
mode: 493
overwrite: true
path: /etc/kubernetes/kubelet-plugins/volume/exec/.dummy
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20Workaround%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1941714%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1935539%0A%0Adriver%3D%24(nmcli%20-t%20-m%20tabular%20-f%20general.driver%20dev%20show%20%22%24%7BDEVICE_IFACE%7D%22)%0A%0Aif%20%5B%5B%20%22%242%22%20%3D%3D%20%22up%22%20%26%26%20%22%24%7Bdriver%7D%22%20%3D%3D%20%22vmxnet3%22%20%5D%5D%3B%20then%0A%20%20logger%20-s%20%2299-vsphere-disable-tx-udp-tnl%20triggered%20by%20%24%7B2%7D%20on%20device%20%24%7BDEVICE_IFACE%7D.%22%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-segmentation%20off%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-csum-segmentation%20off%0Afi%0A
mode: 484
overwrite: true
path: /etc/NetworkManager/dispatcher.d/99-vsphere-disable-tx-udp-tnl
- contents:
source: data:text/plain,unqualified-search-registries%20%3D%20%5B%22registry.access.redhat.com%22%2C%20%22docker.io%22%5D%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2Frelease%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-1.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-2.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22blocked-reg.io%22%0A%20%20blocked%20%3D%20true%0A
mode: 420
overwrite: true
path: /etc/containers/registries.conf
- contents:
source: data:,%5Bcrio%5D%0Ainternal_wipe%20%3D%20true%0A%0A%5Bcrio.api%5D%0Astream_address%20%3D%20%22%22%0Astream_port%20%3D%20%2210010%22%0A%0A%5Bcrio.runtime%5D%0Aconmon%20%3D%20%22%2Fusr%2Flibexec%2Fcrio%2Fconmon%22%0Aconmon_cgroup%20%3D%20%22pod%22%0Adefault_env%20%3D%20%5B%0A%20%20%20%20%22NSS_SDB_USE_CACHE%3Dno%22%2C%0A%5D%0Alog_level%20%3D%20%22info%22%0Acgroup_manager%20%3D%20%22systemd%22%0Adefault_sysctls%20%3D%20%5B%0A%20%20%20%20%22net.ipv4.ping_group_range%3D0%202147483647%22%2C%0A%5D%0Ahooks_dir%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%20%20%20%20%22%2Frun%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%5D%0Amanage_ns_lifecycle%20%3D%20true%0Aabsent_mount_sources_to_reject%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fhostname%22%2C%0A%5D%0A%0A%5Bcrio.image%5D%0Aglobal_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_image%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%40sha256%3Abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%22%0Apause_image_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_command%20%3D%20%22%2Fusr%2Fbin%2Fpod%22%0A%0A%5Bcrio.network%5D%0Anetwork_dir%20%3D%20%22%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F%22%0Aplugin_dirs%20%3D%20%5B%0A%20%20%20%20%22%2Fvar%2Flib%2Fcni%2Fbin%22%2C%0A%20%20%20%20%22%2Fusr%2Flibexec%2Fcni%22%2C%0A%5D%0A%0A%5Bcrio.metrics%5D%0Aenable_metrics%20%3D%20true%0Ametrics_port%20%3D%209537%0A
mode: 420
overwrite: true
path: /etc/crio/crio.conf.d/00-default
- contents:
source: data:text/plain,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22atomic%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
mode: 420
overwrite: true
path: /etc/containers/policy.json
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/cloud.conf
- contents:
source: data:text/plain,%7B%0A%20%20%22kind%22%3A%20%22KubeletConfiguration%22%2C%0A%20%20%22apiVersion%22%3A%20%22kubelet.config.k8s.io%2Fv1beta1%22%2C%0A%20%20%22staticPodPath%22%3A%20%22%2Fetc%2Fkubernetes%2Fmanifests%22%2C%0A%20%20%22syncFrequency%22%3A%20%220s%22%2C%0A%20%20%22fileCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22httpCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22tlsCipherSuites%22%3A%20%5B%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256%22%0A%20%20%5D%2C%0A%20%20%22tlsMinVersion%22%3A%20%22VersionTLS12%22%2C%0A%20%20%22rotateCertificates%22%3A%20true%2C%0A%20%20%22serverTLSBootstrap%22%3A%20true%2C%0A%20%20%22authentication%22%3A%20%7B%0A%20%20%20%20%22x509%22%3A%20%7B%0A%20%20%20%20%20%20%22clientCAFile%22%3A%20%22%2Fetc%2Fkubernetes%2Fkubelet-ca.crt%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22anonymous%22%3A%20%7B%0A%20%20%20%20%20%20%22enabled%22%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22authorization%22%3A%20%7B%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheAuthorizedTTL%22%3A%20%220s%22%2C%0A%20%20%20%20%20%20%22cacheUnauthorizedTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22clusterDomain%22%3A%20%22cluster.local%22%2C%0A%20%20%22clusterDNS%22%3A%20%5B%0A%20%20%20%20%22172.30.0.10%22%0A%20%20%5D%2C%0A%20%20%22streamingConnectionIdleTimeout%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusUpdateFrequency%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusReportFrequency%22%3A%20%220s%22%2C%0A%20%20%22imageMinimumGCAge%22%3A%20%220s%22%2C%0A%20%20%22volumeStatsAggPeriod%22%3A%20%220s%22%2C%0A%20%20%22systemCgroups%22%3A%20%22%2Fsystem.slice%22%2C%0A%20%20%22cgroupRoot%22%3A%20%22%2F%22%2C%0A%20%20%22cgroupDriver%22%3A%20%22systemd%22%2C%0A%20%20%22cpuManagerReconcilePeriod%22%3A%20%220s%22%2C%0A%20%20%22runtimeRequestTimeout%22%3A%20%220s%22%2C%0A%20%20%22maxPods%22%3A%20250%2C%0A%20%20%22kubeAPIQPS%22%3A%2050%2C%0A%20%20%22kubeAPIBurst%22%3A%20100%2C%0A%20%20%22serializeImagePulls%22%3A%20false%2C%0A%20%20%22evictionPressureTransitionPeriod%22%3A%20%220s%22%2C%0A%20%20%22podsPerCore%22%3A%2010%2C%0A%20%20%22featureGates%22%3A%20%7B%0A%20%20%20%20%22APIPriorityAndFairness%22%3A%20true%2C%0A%20%20%20%20%22CSIDriverAzureDisk%22%3A%20true%2C%0A%20%20%20%20%22CSIDriverVSphere%22%3A%20true%2C%0A%20%20%20%20%22CSIMigrationAWS%22%3A%20true%2C%0A%20%20%20%20%22CSIMigrationOpenStack%22%3A%20true%2C%0A%20%20%20%20%22DownwardAPIHugePages%22%3A%20true%2C%0A%20%20%20%20%22LegacyNodeRoleBehavior%22%3A%20false%2C%0A%20%20%20%20%22NodeDisruptionExclusion%22%3A%20true%2C%0A%20%20%20%20%22RotateKubeletServerCertificate%22%3A%20true%2C%0A%20%20%20%20%22ServiceNodeExclusion%22%3A%20true%2C%0A%20%20%20%20%22SupportPodPidsLimit%22%3A%20true%0A%20%20%7D%2C%0A%20%20%22containerLogMaxSize%22%3A%20%2250Mi%22%2C%0A%20%20%22systemReserved%22%3A%20%7B%0A%20%20%20%20%22ephemeral-storage%22%3A%20%221Gi%22%0A%20%20%7D%2C%0A%20%20%22kubeReserved%22%3A%20%7B%0A%20%20%20%20%22cpu%22%3A%20%221000m%22%2C%0A%20%20%20%20%22memory%22%3A%20%22500Mi%22%0A%20%20%7D%2C%0A%20%20%22logging%22%3A%20%7B%7D%2C%0A%20%20%22shutdownGracePeriod%22%3A%20%220s%22%2C%0A%20%20%22shutdownGracePeriodCriticalPods%22%3A%20%220s%22%0A%7D%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet.conf
systemd:
units:
- dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="ENABLE_PROFILE_UNIX_SOCKET=true"
name: 10-mco-profile-unix-socket.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
name: crio.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: docker.socket
- contents: |
[Unit]
Description=Dynamically sets the system reserved for the kubelet
Wants=network-online.target
After=network-online.target ignition-firstboot-complete.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/node-sizing-enabled.env
ExecStart=/bin/bash /usr/local/sbin/dynamic-system-reserved-calc.sh ${NODE_SIZING_ENABLED} ${SYSTEM_RESERVED_MEMORY} ${SYSTEM_RESERVED_CPU}
[Install]
RequiredBy=kubelet.service
enabled: true
name: kubelet-auto-node-size.service
- contents: |
[Unit]
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target
Requires=crio.service kubelet-auto-node-size.service
After=network-online.target crio.service kubelet-auto-node-size.service
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
EnvironmentFile=/etc/node-sizing.env
ExecStart=/usr/bin/hyperkube \
kubelet \
--config=/etc/kubernetes/kubelet.conf \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=${ID} \
--node-ip=${KUBELET_NODE_IP} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--cloud-provider= \
\
--pod-infra-container-image=registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \
--system-reserved=cpu=${SYSTEM_RESERVED_CPU},memory=${SYSTEM_RESERVED_MEMORY} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
enabled: true
name: kubelet.service
- contents: |
[Unit]
Description=Machine Config Daemon Firstboot
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# Removal of this file signals firstboot completion
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
After=machine-config-daemon-pull.service
Before=crio.service kubelet.service
[Service]
Type=oneshot
RemainAfterExit=yes
# Disable existing repos (if any) so that OS extensions would use embedded RPMs only
ExecStartPre=-/usr/bin/sh -c "sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/*.repo"
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
enabled: true
name: machine-config-daemon-firstboot.service
- contents: |
[Unit]
Description=Machine Config Daemon Pull
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# This "stamp file" is unlinked when we complete
# machine-config-daemon-firstboot.service
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
# Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown
Wants=network-online.target crio-wipe.service
After=network-online.target crio-wipe.service
[Service]
Type=oneshot
RemainAfterExit=yes
# See https://github.com/coreos/fedora-coreos-tracker/issues/354
ExecStart=/bin/sh -c '/bin/mkdir -p /run/bin && chcon --reference=/usr/bin /run/bin'
ExecStart=/bin/sh -c "while ! /usr/bin/podman pull --authfile=/var/lib/kubelet/config.json --quiet '<no value>'; do sleep 1; done"
ExecStart=/bin/sh -c "/usr/bin/podman run --rm --quiet --net=host --entrypoint=cat '<no value>' /usr/bin/machine-config-daemon > /run/bin/machine-config-daemon.tmp"
ExecStart=/bin/sh -c '/usr/bin/chmod a+x /run/bin/machine-config-daemon.tmp && mv /run/bin/machine-config-daemon.tmp /run/bin/machine-config-daemon'
[Install]
RequiredBy=machine-config-daemon-firstboot.service
enabled: true
name: machine-config-daemon-pull.service
- contents: |
[Unit]
Before=NetworkManager.service
After=systemd-tmpfiles-setup.service
[Mount]
Where=/etc/NetworkManager/systemConnectionsMerged
What=overlay
Type=overlay
Options=lowerdir=/etc/NetworkManager/system-connections,upperdir=/run/nm-system-connections,workdir=/run/nm-system-connections-work
[Install]
WantedBy=multi-user.target
enabled: true
name: etc-NetworkManager-systemConnectionsMerged.mount
- contents: |
[Unit]
Description=Wait for a non-localhost hostname
Before=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/local/bin/mco-hostname --wait
# Wait up to 5min for the node to get a non-localhost name
TimeoutSec=300
[Install]
WantedBy=multi-user.target
# Ensure that network-online.target will not complete until the node has a non-localhost hostname.
RequiredBy=network-online.target
enabled: true
name: node-valid-hostname.service
- contents: |
[Unit]
Description=Writes IP address configuration so that kubelet and crio services select a valid node IP
Wants=network-online.target crio-wipe.service
After=network-online.target ignition-firstboot-complete.service crio-wipe.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
# Would prefer to do Restart=on-failure instead of this bash retry loop, but
# the version of systemd we have right now doesn't support it. It should be
# available in systemd v244 and higher.
ExecStart=/bin/bash -c " \
until \
/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
--volume /etc/systemd/system:/etc/systemd/system:z \
\
node-ip \
set \
--retry-on-failure; \
do \
sleep 5; \
done"
ExecStart=/bin/systemctl daemon-reload
[Install]
RequiredBy=kubelet.service
enabled: true
name: nodeip-configuration.service
- enabled: false
name: openvswitch.service
- contents: "[Unit]\nDescription=Configures OVS with proper host networking
configuration\n# Removal of this file signals firstboot completion\nConditionPathExists=!/etc/ignition-machine-config-encapsulated.json\n#
This service is used to move a physical NIC into OVS and reconfigure OVS
to use the host IP\nRequires=openvswitch.service\nWants=NetworkManager-wait-online.service\nAfter=NetworkManager-wait-online.service
openvswitch.service network.service\nBefore=network-online.target kubelet.service
crio.service node-valid-hostname.service\n\n[Service]\n# Need oneshot to
delay kubelet\nType=oneshot\nExecStart=/usr/local/bin/configure-ovs.sh \nStandardOutput=journal+console\nStandardError=journal+console\n\n[Install]\nWantedBy=network-online.target\n"
enabled: false
name: ovs-configuration.service
- dropins:
- contents: |
[Service]
Restart=always
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'
name: 10-ovs-vswitchd-restart.conf
name: ovs-vswitchd.service
- dropins:
- contents: |
[Service]
Restart=always
name: 10-ovsdb-restart.conf
enabled: false
name: ovsdb-server.service
- dropins:
- contents: ""
name: 10-mco-default-env.conf
name: pivot.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: zincati.service
extensions: []
fips: false
kernelArguments: []
kernelType: default
osImageURL: registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
=== RUN TestE2EBootstrap/With_a_worker_kubelet_config_manifest
E0722 12:50:21.756954 6206 template_controller.go:189] couldn't get ControllerConfig on dependency callback &errors.StatusError{ErrStatus:v1.Status{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ListMeta:v1.ListMeta{SelfLink:"", ResourceVersion:"", Continue:"", RemainingItemCount:(*int64)(nil)}, Status:"Failure", Message:"controllerconfig.machineconfiguration.openshift.io \"machine-config-controller\" not found", Reason:"NotFound", Details:(*v1.StatusDetails)(0xc0014d8540), Code:404}}
utils.go:87: Pool master has rendered configs [99-master-ssh 99-master-generated-registries] with rendered-master-127c2506beeb90afd1fb54b299182d69 (waited 6.007963835s)
bootstrap_test.go:192: Controller rendered master config as "rendered-master-127c2506beeb90afd1fb54b299182d69"
utils.go:87: Pool worker has rendered configs [99-worker-ssh 99-worker-generated-registries 99-worker-generated-kubelet] with rendered-worker-92669da3617db49bd2b2a1cc8fa22302 (waited 6.009016701s)
bootstrap_test.go:196: Controller rendered worker config as "rendered-worker-92669da3617db49bd2b2a1cc8fa22302"
bootstrap_test.go:238: Bootstrap rendered master config as "rendered-master-7d528458dc77d0b408db5242fb357e44"
bootstrap_test.go:241: Expected rendered master configurations to match: got bootstrap config "rendered-master-7d528458dc77d0b408db5242fb357e44", got controller config "rendered-master-127c2506beeb90afd1fb54b299182d69"
bootstrap_test.go:247: Controller rendered "rendered-master-127c2506beeb90afd1fb54b299182d69":
metadata:
annotations:
machineconfiguration.openshift.io/generated-by-controller-version: was-not-built-properly
creationTimestamp: "2021-07-22T11:50:26Z"
generation: 1
managedFields:
- apiVersion: machineconfiguration.openshift.io/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:machineconfiguration.openshift.io/generated-by-controller-version: {}
f:ownerReferences:
.: {}
k:{"uid":"fdde0698-cb51-4682-b6fe-d8ffde7f550a"}:
.: {}
f:apiVersion: {}
f:blockOwnerDeletion: {}
f:controller: {}
f:kind: {}
f:name: {}
f:uid: {}
f:spec:
.: {}
f:config:
.: {}
f:ignition:
.: {}
f:version: {}
f:passwd:
.: {}
f:users: {}
f:storage:
.: {}
f:files: {}
f:systemd:
.: {}
f:units: {}
f:extensions: {}
f:fips: {}
f:kernelArguments: {}
f:kernelType: {}
f:osImageURL: {}
manager: e2e-bootstrap.test
operation: Update
time: "2021-07-22T11:50:26Z"
name: rendered-master-127c2506beeb90afd1fb54b299182d69
ownerReferences:
- apiVersion: machineconfiguration.openshift.io/v1
blockOwnerDeletion: true
controller: true
kind: MachineConfigPool
name: master
uid: fdde0698-cb51-4682-b6fe-d8ffde7f550a
resourceVersion: "430"
selfLink: /apis/machineconfiguration.openshift.io/v1/machineconfigs/rendered-master-127c2506beeb90afd1fb54b299182d69
uid: 8563cac8-2828-44bb-b71f-6012a1e018a5
spec:
config:
ignition:
version: 3.2.0
passwd:
users:
- name: core
sshAuthorizedKeys:
- ssh-rsa SSH-AUTHORIZED-KEY
storage:
files:
- contents:
source: data:,%5Bmain%5D%0Aplugins%3Dkeyfile%2Cifcfg-rh%0A%5Bkeyfile%5D%0Apath%3D%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/99-keyfiles.conf
- contents:
source: data:,
mode: 384
overwrite: true
path: /etc/pki/ca-trust/source/anchors/openshift-config-user-ca-bundle.crt
- contents:
source: data:,KUBERNETES_SERVICE_HOST%3D'api-int.domain.example.com'%0AKUBERNETES_SERVICE_PORT%3D'6443'%0A
mode: 420
overwrite: true
path: /etc/kubernetes/apiserver-url.env
- contents:
source: data:,%23%20This%20file%20is%20managed%20by%20machine-config-operator.%0A%23%20Suppress%20audit%20rules%20which%20always%20trigger%20for%20container%0A%23%20workloads%2C%20as%20they%20spam%20the%20audit%20log.%20%20Workloads%20are%20expected%0A%23%20to%20be%20dynamic%2C%20and%20the%20networking%20stack%20uses%20iptables.%0A-a%20exclude%2Calways%20-F%20msgtype%3DNETFILTER_CFG%0A%23%20The%20default%20bridged%20networking%20enables%20promiscuous%20on%20the%20veth%0A%23%20device.%20%20Ideally%2C%20we'd%20teach%20audit%20to%20ignore%20only%20veth%20devices%2C%0A%23%20since%20one%20might%20legitimately%20care%20about%20promiscuous%20on%20real%20physical%0A%23%20devices.%20%20But%20we%20can't%20currently%20differentiate.%0A-a%20exclude%2Calways%20-F%20msgtype%3DANOM_PROMISCUOUS%0A
mode: 420
overwrite: true
path: /etc/audit/rules.d/mco-audit-quiet-containers.rules
- contents:
source: data:,r%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F80-openshift-network.conf%0Ar%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F10-ovn-kubernetes.conf%0Ad%20%2Frun%2Fmultus%2Fcni%2Fnet.d%2F%200755%20root%20root%20-%20-%0AD%20%2Fvar%2Flib%2Fcni%2Fnetworks%2Fopenshift-sdn%2F%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/cleanup-cni.conf
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/static-pod-resources/configmaps/cloud-config/ca-bundle.pem
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-eux%0A%0A%23%20This%20file%20is%20not%20needed%20anymore%20in%204.7%2B%2C%20but%20when%20rolling%20back%20to%204.6%0A%23%20the%20ovs%20pod%20needs%20it%20to%20know%20ovs%20is%20running%20on%20the%20host.%0Atouch%20%2Fvar%2Frun%2Fovs-config-executed%0A%0Aif%20%5B%20-d%20%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%20%5D%3B%20then%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0Aelse%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0Afi%0A%0A%23%20In%20RHEL7%20files%20in%20%2F%7Betc%2Crun%7D%2FNetworkManager%2Fsystem-connections%20end%20without%20the%20suffix%20'.nmconnection'%2C%20whereas%20in%20RHCOS%20they%20end%20with%20the%20suffix.%0Amanaged_nm_conn_files%3D(%24(echo%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection))%0A%0A%23%20Workaround%20to%20ensure%20OVS%20is%20installed%20due%20to%20bug%20in%20systemd%20Requires%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1888017%0Acopy_nm_conn_files()%20%7B%0A%20%20src_path%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0A%20%20dst_path%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0A%20%20if%20%5B%20-d%20%22%24src_path%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22%24src_path%20exists%22%0A%20%20%20%20for%20file%20in%20%22%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%22%3B%20do%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24src_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24dst_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20new%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20elif%20!%20cmp%20--silent%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20updated%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22Skipping%20%24file%20since%20its%20status%20is%20current%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20done%0A%20%20fi%0A%7D%0A%0A%23%20Used%20to%20replace%20an%20old%20master%20connection%20uuid%20with%20a%20new%20one%20on%20all%20connections%0Areplace_connection_master()%20%7B%0A%20%20local%20old%3D%22%241%22%0A%20%20local%20new%3D%22%242%22%0A%20%20for%20conn_uuid%20in%20%24(nmcli%20-g%20UUID%20connection%20show)%20%3B%20do%0A%20%20%20%20if%20%5B%20%22%24(nmcli%20-g%20connection.master%20connection%20show%20uuid%20%22%24conn_uuid%22)%22%20!%3D%20%22%24old%22%20%5D%3B%20then%0A%20%20%20%20%20%20continue%0A%20%20%20%20fi%0A%0A%20%20%20%20nmcli%20conn%20mod%20uuid%20%24conn_uuid%20connection.master%20%22%24new%22%0A%20%20%20%20%23%20make%20sure%20we%20persist%20this%20modification%0A%20%20%20%20conn_file%3D%22%24(egrep%20-l%20uuid%3D%24conn_uuid%20%24%7BNM_CONN_PATH%7D%2F*%20%7C%20xargs%20basename)%22%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24conn_file%22%20%26%26%20!%20%22%20%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%20%22%20%3D~%20%22%20%24%7Bconn_file%7D%20%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20managed_nm_conn_files%2B%3D(%24conn_file)%0A%20%20%20%20fi%0A%20%20done%0A%7D%0A%0Aif%20!%20rpm%20-qa%20%7C%20grep%20-q%20openvswitch%3B%20then%0A%20%20echo%20%22Warning%3A%20Openvswitch%20package%20is%20not%20installed!%22%0A%20%20exit%201%0Afi%0A%0Aif%20%5B%20%22%241%22%20%3D%3D%20%22OVNKubernetes%22%20%5D%3B%20then%0A%20%20%23%20Configures%20NICs%20onto%20OVS%20bridge%20%22br-ex%22%0A%20%20%23%20Configuration%20is%20either%20auto-detected%20or%20provided%20through%20a%20config%20file%20written%20already%20in%20Network%20Manager%0A%20%20%23%20key%20files%20under%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%0A%20%20%23%20Managing%20key%20files%20is%20outside%20of%20the%20scope%20of%20this%20script%0A%0A%20%20%23%20if%20the%20interface%20is%20of%20type%20vmxnet3%20add%20multicast%20capability%20for%20that%20driver%0A%20%20%23%20REMOVEME%3A%20Once%20BZ%3A1854355%20is%20fixed%2C%20this%20needs%20to%20get%20removed.%0A%20%20function%20configure_driver_options%20%7B%0A%20%20%20%20intf%3D%241%0A%20%20%20%20driver%3D%24(cat%20%22%2Fsys%2Fclass%2Fnet%2F%24%7Bintf%7D%2Fdevice%2Fuevent%22%20%7C%20grep%20DRIVER%20%7C%20awk%20-F%20%22%3D%22%20'%7Bprint%20%242%7D')%0A%20%20%20%20echo%20%22Driver%20name%20is%22%20%24driver%0A%20%20%20%20if%20%5B%20%22%24driver%22%20%3D%20%22vmxnet3%22%20%5D%3B%20then%0A%20%20%20%20%20%20ifconfig%20%22%24intf%22%20allmulti%0A%20%20%20%20fi%0A%20%20%7D%0A%0A%20%20iface%3D%22%22%0A%20%20counter%3D0%0A%20%20%23%20find%20default%20interface%0A%20%20while%20%5B%20%24counter%20-lt%2012%20%5D%3B%20do%0A%20%20%20%20%23%20check%20ipv4%0A%20%20%20%20iface%3D%24(ip%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv4%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20%23%20check%20ipv6%0A%20%20%20%20iface%3D%24(ip%20-6%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv6%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20%20%20echo%20%22No%20default%20route%20found%20on%20attempt%3A%20%24%7Bcounter%7D%22%0A%20%20%20%20sleep%205%0A%20%20done%0A%0A%20%20if%20%5B%20%22%24iface%22%20%3D%20%22br-ex%22%20%5D%3B%20then%0A%20%20%20%20%23%20handle%20vlans%20and%20bonds%20etc%20if%20they%20have%20already%20been%0A%20%20%20%20%23%20configured%20via%20nm%20key%20files%20and%20br-ex%20is%20already%20up%0A%20%20%20%20ifaces%3D%24(ovs-vsctl%20list-ifaces%20%24%7Biface%7D)%0A%20%20%20%20for%20intf%20in%20%24ifaces%3B%20do%20configure_driver_options%20%24intf%3B%20done%0A%20%20%20%20echo%20%22Networking%20already%20configured%20and%20up%20for%20br-ex!%22%0A%20%20%20%20%23%20remove%20bridges%20created%20by%20openshift-sdn%0A%20%20%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br0%0A%20%20%20%20exit%200%0A%20%20fi%0A%0A%20%20if%20%5B%20-z%20%22%24iface%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22ERROR%3A%20Unable%20to%20find%20default%20gateway%20interface%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20%23%20find%20the%20MAC%20from%20OVS%20config%20or%20the%20default%20interface%20to%20use%20for%20OVS%20internal%20port%0A%20%20%23%20this%20prevents%20us%20from%20getting%20a%20different%20DHCP%20lease%20and%20dropping%20connection%0A%20%20if%20!%20iface_mac%3D%24(%3C%22%2Fsys%2Fclass%2Fnet%2F%24%7Biface%7D%2Faddress%22)%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MAC%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20echo%20%22MAC%20address%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mac%7D%22%0A%0A%20%20%23%20find%20MTU%20from%20original%20iface%0A%20%20iface_mtu%3D%24(ip%20link%20show%20%22%24iface%22%20%7C%20awk%20'%7Bprint%20%245%3B%20exit%7D')%0A%20%20if%20%5B%5B%20-z%20%22%24iface_mtu%22%20%5D%5D%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MTU%2C%20defaulting%20to%201500%22%0A%20%20%20%20iface_mtu%3D1500%0A%20%20else%0A%20%20%20%20echo%20%22MTU%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mtu%7D%22%0A%20%20fi%0A%0A%20%20%23%20store%20old%20conn%20for%20later%0A%20%20old_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%0A%20%20extra_brex_args%3D%22%22%0A%20%20%23%20check%20for%20dhcp%20client%20ids%0A%20%20dhcp_client_id%3D%24(nmcli%20--get-values%20ipv4.dhcp-client-id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv4.dhcp-client-id%20%24%7Bdhcp_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20dhcp6_client_id%3D%24(nmcli%20--get-values%20ipv6.dhcp-duid%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp6_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv6.dhcp-duid%20%24%7Bdhcp6_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20%23%20create%20bridge%3B%20use%20NM's%20ethernet%20device%20default%20route%20metric%20(100)%0A%20%20if%20!%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-bridge%20%5C%0A%20%20%20%20%20%20%20%20con-name%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20conn.interface%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20ipv6.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20%24%7Bextra_brex_args%7D%0A%20%20fi%0A%0A%20%20%23%20find%20default%20port%20to%20add%20to%20bridge%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20%24%7Biface%7D%20master%20br-ex%20con-name%20ovs-port-phys0%0A%20%20fi%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20br-ex%20master%20br-ex%20con-name%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20extra_phys_args%3D()%0A%20%20%23%20check%20if%20this%20interface%20is%20a%20vlan%2C%20bond%2C%20team%2C%20or%20ethernet%20type%0A%20%20if%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22vlan%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dvlan%0A%20%20%20%20vlan_id%3D%24(nmcli%20--get-values%20vlan.id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_id%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_id%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20vlan_parent%3D%24(nmcli%20--get-values%20vlan.parent%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_parent%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_parent%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20extra_phys_args%3D(%20dev%20%22%24%7Bvlan_parent%7D%22%20id%20%22%24%7Bvlan_id%7D%22%20)%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22bond%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dbond%0A%20%20%20%20%23%20check%20bond%20options%0A%20%20%20%20bond_opts%3D%24(nmcli%20--get-values%20bond.options%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24bond_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20bond.options%20%22%24%7Bbond_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22team%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dteam%0A%20%20%20%20%23%20check%20team%20config%20options%0A%20%20%20%20team_config_opts%3D%24(nmcli%20--get-values%20team.config%20-e%20no%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24team_config_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20team.config%20%22%24%7Bteam_config_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20else%0A%20%20%20%20iface_type%3D802-3-ethernet%0A%20%20fi%0A%0A%20%20%23%20use%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%20instead%20of%20%24%7Bextra_phys_args%5B%40%5D%7D%20to%20be%20compatible%20with%20bash%204.2%20in%20RHEL7.9%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20%24%7Biface_type%7D%20conn.interface%20%24%7Biface%7D%20master%20ovs-port-phys0%20con-name%20ovs-if-phys0%20%5C%0A%20%20%20%20connection.autoconnect-priority%20100%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%0A%20%20fi%0A%0A%20%20%23%20Get%20the%20new%20connection%20uuid%0A%20%20new_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%0A%20%20%23%20Setup%20an%20exit%20trap%20to%20restore%20any%20modifications%20going%20further%0A%20%20handle_exit_error()%20%7B%0A%20%20%20%20e%3D%24%3F%0A%20%20%20%20%5B%20%24e%20-eq%200%20%5D%20%26%26%20exit%200%0A%20%20%20%20%23%20if%20there%20was%20a%20problem%20network%20isn't%20coming%20up%2C%20revert%20for%20debugging%0A%20%20%20%20set%20%2Be%0A%20%20%20%20replace_connection_master%20%24new_conn%20%24old_conn%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-br-ex%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-phys0%0A%20%20%20%20nmcli%20conn%20up%20%24old_conn%0A%20%20%20%20exit%20%24e%0A%20%20%7D%0A%20%20trap%20%22handle_exit_error%22%20EXIT%0A%0A%20%20%23%20Update%20connections%20with%20master%20property%20set%20to%20use%20the%20new%20connection%0A%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20replace_connection_master%20%24iface%20%24new_conn%0A%0A%20%20%23%20bring%20down%20old%20iface%0A%20%20nmcli%20device%20disconnect%20%24iface%0A%0A%20%20%23%20bring%20up%20new%20connection%20%0A%20%20nmcli%20conn%20up%20ovs-if-phys0%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20if%20nmcli%20--fields%20ipv4.method%2Cipv6.method%20conn%20show%20%24old_conn%20%7C%20grep%20manual%3B%20then%0A%20%20%20%20%20%20echo%20%22Static%20IP%20addressing%20detected%20on%20default%20gateway%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20%23%20find%20and%20copy%20the%20old%20connection%20to%20get%20the%20address%20settings%0A%20%20%20%20%20%20if%20egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*%3B%20then%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24(egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*)%0A%20%20%20%20%20%20%20%20cloned%3Dfalse%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20unable%20to%20find%20NM%20configuration%20file%20for%20conn%3A%20%24%7Bold_conn%7D.%20Attempting%20to%20clone%20conn%22%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24%7BNM_CONN_PATH%7D%2F%24%7Bold_conn%7D-clone.nmconnection%0A%20%20%20%20%20%20%20%20nmcli%20conn%20clone%20%24%7Bold_conn%7D%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20cloned%3Dtrue%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24old_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20locate%20cloned%20conn%20file%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20%20%20%20%20exit%201%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20%20%20echo%20%22Successfully%20cloned%20conn%20to%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20echo%20%22old%20connection%20file%20found%20at%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20new_conn_file%3D%24%7BNM_CONN_PATH%7D%2Fovs-if-br-ex.nmconnection%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24new_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20existing%20br-ex%20interface%20file%20found%3A%20%24new_conn_file%2C%20which%20is%20not%20loaded%20in%20NetworkManager...overwriting%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cp%20-f%20%24%7Bold_conn_file%7D%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20restorecon%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20%24cloned%3B%20then%0A%20%20%20%20%20%20%20%20nmcli%20conn%20delete%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20rm%20-f%20%24%7Bold_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20ovs_port_conn%3D%24(nmcli%20--fields%20connection.uuid%20conn%20show%20ovs-port-br-ex%20%7C%20awk%20'%7Bprint%20%242%7D')%0A%20%20%20%20%20%20br_iface_uuid%3D%24(cat%20%2Fproc%2Fsys%2Fkernel%2Frandom%2Fuuid)%0A%20%20%20%20%20%20%23%20modify%20file%20to%20work%20with%20OVS%20and%20have%20unique%20settings%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Euuid%3D.*%24%2Fuuid%3D'%22%24br_iface_uuid%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5Emulti-connect%3D.*%24%2Fd'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Etype%3D.*%24%2Ftype%3Dovs-interface%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Eid%3D.*%24%2Fid%3Dovs-if-br-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20slave-type%3Dovs-port'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20master%3D'%22%24ovs_port_conn%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20grep%20'interface-name%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Einterface-name%3D.*%24%2Finterface-name%3Dbr-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20interface-name%3Dbr-ex'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20!%20grep%20'cloned-mac-address%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20cloned-mac-address%3D'%22%24iface_mac%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Ecloned-mac-address%3D.*%24%2Fcloned-mac-address%3D'%22%24iface_mac%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20grep%20'mtu%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Emtu%3D.*%24%2Fmtu%3D'%22%24iface_mtu%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20mtu%3D'%22%24iface_mtu%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cat%20%3C%3CEOF%20%3E%3E%20%24%7Bnew_conn_file%7D%0A%5Bovs-interface%5D%0Atype%3Dinternal%0AEOF%0A%20%20%20%20%20%20nmcli%20c%20load%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20echo%20%22Loaded%20new%20ovs-if-br-ex%20connection%20file%3A%20%24%7Bnew_conn_file%7D%22%0A%20%20%20%20else%0A%20%20%20%20%20%20nmcli%20c%20add%20type%20ovs-interface%20slave-type%20ovs-port%20conn.interface%20br-ex%20master%20ovs-port-br-ex%20con-name%20%5C%0A%20%20%20%20%20%20%20%20ovs-if-br-ex%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20802-3-ethernet.cloned-mac-address%20%24%7Biface_mac%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20ipv6.route-metric%20100%0A%20%20%20%20fi%0A%20%20fi%0A%0A%20%20%23%20wait%20for%20DHCP%20to%20finish%2C%20verify%20connection%20is%20up%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20sleep%205%0A%20%20%20%20%23%20check%20if%20connection%20is%20active%0A%20%20%20%20if%20nmcli%20--fields%20GENERAL.STATE%20conn%20show%20ovs-if-br-ex%20%7C%20grep%20-i%20%22activated%22%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22WARN%3A%20OVS%20did%20not%20succesfully%20activate%20NM%20connection.%20Attempting%20to%20bring%20up%20connections%22%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20if%20nmcli%20conn%20up%20ovs-if-br-ex%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20sleep%205%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22ERROR%3A%20Failed%20to%20activate%20ovs-if-br-ex%20NM%20connection%22%0A%20%20exit%201%0Aelif%20%5B%20%22%241%22%20%3D%3D%20%22OpenShiftSDN%22%20%5D%3B%20then%0A%20%20%23%20Revert%20changes%20made%20by%20%2Fusr%2Flocal%2Fbin%2Fconfigure-ovs.sh.%0A%20%20%23%20Remove%20OVS%20bridge%20%22br-ex%22.%20Use%20the%20default%20NIC%20for%20cluster%20network.%0A%20%20iface%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20iface%3D%24(nmcli%20--get-values%20connection.interface-name%20connection%20show%20ovs-port-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-port-phys0%20%0A%20%20fi%0A%0A%20%20old_conn%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20old_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-if-phys0%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-if-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20br-ex%0A%20%20fi%0A%0A%20%20rm%20-f%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection%0A%20%20%23%20remove%20bridges%20created%20by%20ovn-kubernetes%2C%20try%20to%20delete%20br-ex%20again%20in%20case%20NM%20fail%20to%20talk%20to%20ovsdb%0A%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br-int%20--%20--if-exists%20del-br%20br-local%20--%20--if-exists%20del-br%20br-ex%0A%0A%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20nmcli%20device%20connect%20%24iface%0A%20%20%20%20if%20%5B%20-n%20%22%24old_conn%22%20%5D%3B%20then%0A%20%20%20%20%20%20new_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%20%20%20%20%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20%20%20%20%20%23%20re-activate%20the%20profile%20so%20that%20it%20picks%20the%20master%20changes%0A%20%20%20%20%20%20nmcli%20c%20up%20%24new_conn%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20fi%0A%20%20fi%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/bin/configure-ovs.sh
- contents:
source: data:,%23%20This%20file%20is%20generated%20by%20the%20Machine%20Config%20Operator's%20containerruntimeconfig%20controller.%0A%23%0A%23%20storage.conf%20is%20the%20configuration%20file%20for%20all%20tools%0A%23%20that%20share%20the%20containers%2Fstorage%20libraries%0A%23%20See%20man%205%20containers-storage.conf%20for%20more%20information%0A%23%20The%20%22container%20storage%22%20table%20contains%20all%20of%20the%20server%20options.%0A%5Bstorage%5D%0A%0A%23%20Default%20Storage%20Driver%0Adriver%20%3D%20%22overlay%22%0A%0A%23%20Temporary%20storage%20location%0Arunroot%20%3D%20%22%2Fvar%2Frun%2Fcontainers%2Fstorage%22%0A%0A%23%20Primary%20Read%2FWrite%20location%20of%20container%20storage%0Agraphroot%20%3D%20%22%2Fvar%2Flib%2Fcontainers%2Fstorage%22%0A%0A%5Bstorage.options%5D%0A%23%20Storage%20options%20to%20be%20passed%20to%20underlying%20storage%20drivers%0A%0A%23%20AdditionalImageStores%20is%20used%20to%20pass%20paths%20to%20additional%20Read%2FOnly%20image%20stores%0A%23%20Must%20be%20comma%20separated%20list.%0Aadditionalimagestores%20%3D%20%5B%0A%5D%0A%0A%23%20Size%20is%20used%20to%20set%20a%20maximum%20size%20of%20the%20container%20image.%20%20Only%20supported%20by%0A%23%20certain%20container%20storage%20drivers.%0Asize%20%3D%20%22%22%0A%0A%23%20OverrideKernelCheck%20tells%20the%20driver%20to%20ignore%20kernel%20checks%20based%20on%20kernel%20version%0Aoverride_kernel_check%20%3D%20%22true%22%0A%0A%23%20Remap-UIDs%2FGIDs%20is%20the%20mapping%20from%20UIDs%2FGIDs%20as%20they%20should%20appear%20inside%20of%0A%23%20a%20container%2C%20to%20UIDs%2FGIDs%20as%20they%20should%20appear%20outside%20of%20the%20container%2C%20and%0A%23%20the%20length%20of%20the%20range%20of%20UIDs%2FGIDs.%20%20Additional%20mapped%20sets%20can%20be%20listed%0A%23%20and%20will%20be%20heeded%20by%20libraries%2C%20but%20there%20are%20limits%20to%20the%20number%20of%0A%23%20mappings%20which%20the%20kernel%20will%20allow%20when%20you%20later%20attempt%20to%20run%20a%0A%23%20container.%0A%23%0A%23%20remap-uids%20%3D%200%3A1668442479%3A65536%0A%23%20remap-gids%20%3D%200%3A1668442479%3A65536%0A%0A%23%20Remap-User%2FGroup%20is%20a%20name%20which%20can%20be%20used%20to%20look%20up%20one%20or%20more%20UID%2FGID%0A%23%20ranges%20in%20the%20%2Fetc%2Fsubuid%20or%20%2Fetc%2Fsubgid%20file.%20%20Mappings%20are%20set%20up%20starting%0A%23%20with%20an%20in-container%20ID%20of%200%20and%20the%20a%20host-level%20ID%20taken%20from%20the%20lowest%0A%23%20range%20that%20matches%20the%20specified%20name%2C%20and%20using%20the%20length%20of%20that%20range.%0A%23%20Additional%20ranges%20are%20then%20assigned%2C%20using%20the%20ranges%20which%20specify%20the%0A%23%20lowest%20host-level%20IDs%20first%2C%20to%20the%20lowest%20not-yet-mapped%20container-level%20ID%2C%0A%23%20until%20all%20of%20the%20entries%20have%20been%20used%20for%20maps.%0A%23%0A%23%20remap-user%20%3D%20%22storage%22%0A%23%20remap-group%20%3D%20%22storage%22%0A%0A%5Bstorage.options.thinpool%5D%0A%23%20Storage%20Options%20for%20thinpool%0A%0A%23%20autoextend_percent%20determines%20the%20amount%20by%20which%20pool%20needs%20to%20be%0A%23%20grown.%20This%20is%20specified%20in%20terms%20of%20%25%20of%20pool%20size.%20So%20a%20value%20of%2020%20means%0A%23%20that%20when%20threshold%20is%20hit%2C%20pool%20will%20be%20grown%20by%2020%25%20of%20existing%0A%23%20pool%20size.%0A%23%20autoextend_percent%20%3D%20%2220%22%0A%0A%23%20autoextend_threshold%20determines%20the%20pool%20extension%20threshold%20in%20terms%0A%23%20of%20percentage%20of%20pool%20size.%20For%20example%2C%20if%20threshold%20is%2060%2C%20that%20means%20when%0A%23%20pool%20is%2060%25%20full%2C%20threshold%20has%20been%20hit.%0A%23%20autoextend_threshold%20%3D%20%2280%22%0A%0A%23%20basesize%20specifies%20the%20size%20to%20use%20when%20creating%20the%20base%20device%2C%20which%0A%23%20limits%20the%20size%20of%20images%20and%20containers.%0A%23%20basesize%20%3D%20%2210G%22%0A%0A%23%20blocksize%20specifies%20a%20custom%20blocksize%20to%20use%20for%20the%20thin%20pool.%0A%23%20blocksize%3D%2264k%22%0A%0A%23%20directlvm_device%20specifies%20a%20custom%20block%20storage%20device%20to%20use%20for%20the%0A%23%20thin%20pool.%20Required%20if%20you%20setup%20devicemapper%0A%23%20directlvm_device%20%3D%20%22%22%0A%0A%23%20directlvm_device_force%20wipes%20device%20even%20if%20device%20already%20has%20a%20filesystem%0A%23%20directlvm_device_force%20%3D%20%22True%22%0A%0A%23%20fs%20specifies%20the%20filesystem%20type%20to%20use%20for%20the%20base%20device.%0A%23%20fs%3D%22xfs%22%0A%0A%23%20log_level%20sets%20the%20log%20level%20of%20devicemapper.%0A%23%200%3A%20LogLevelSuppress%200%20(Default)%0A%23%202%3A%20LogLevelFatal%0A%23%203%3A%20LogLevelErr%0A%23%204%3A%20LogLevelWarn%0A%23%205%3A%20LogLevelNotice%0A%23%206%3A%20LogLevelInfo%0A%23%207%3A%20LogLevelDebug%0A%23%20log_level%20%3D%20%227%22%0A%0A%23%20min_free_space%20specifies%20the%20min%20free%20space%20percent%20in%20a%20thin%20pool%20require%20for%0A%23%20new%20device%20creation%20to%20succeed.%20Valid%20values%20are%20from%200%25%20-%2099%25.%0A%23%20Value%200%25%20disables%0A%23%20min_free_space%20%3D%20%2210%25%22%0A%0A%23%20mkfsarg%20specifies%20extra%20mkfs%20arguments%20to%20be%20used%20when%20creating%20the%20base%0A%23%20device.%0A%23%20mkfsarg%20%3D%20%22%22%0A%0A%23%20mountopt%20specifies%20extra%20mount%20options%20used%20when%20mounting%20the%20thin%20devices.%0A%23%20mountopt%20%3D%20%22%22%0A%0A%23%20use_deferred_removal%20Marking%20device%20for%20deferred%20removal%0A%23%20use_deferred_removal%20%3D%20%22True%22%0A%0A%23%20use_deferred_deletion%20Marking%20device%20for%20deferred%20deletion%0A%23%20use_deferred_deletion%20%3D%20%22True%22%0A%0A%23%20xfs_nospace_max_retries%20specifies%20the%20maximum%20number%20of%20retries%20XFS%20should%0A%23%20attempt%20to%20complete%20IO%20when%20ENOSPC%20(no%20space)%20error%20is%20returned%20by%0A%23%20underlying%20storage%20device.%0A%23%20xfs_nospace_max_retries%20%3D%20%220%22%0A
mode: 420
overwrite: true
path: /etc/containers/storage.conf
- contents:
source: data:,%23%20Proxy%20environment%20variables%20will%20be%20populated%20in%20this%20file.%20Properly%0A%23%20url%20encoded%20passwords%20with%20special%20characters%20will%20use%20'%25%3CHEX%3E%3CHEX%3E'.%0A%23%20Systemd%20requires%20that%20any%20%25%20used%20in%20a%20password%20be%20represented%20as%0A%23%20%25%25%20in%20a%20unit%20file%20since%20%25%20is%20a%20prefix%20for%20macros%3B%20this%20restriction%20does%20not%0A%23%20apply%20for%20environment%20files.%20Templates%20that%20need%20the%20proxy%20set%20should%20use%0A%23%20'EnvironmentFile%3D%2Fetc%2Fmco%2Fproxy.env'.%0A
mode: 420
overwrite: true
path: /etc/mco/proxy.env
- contents:
source: data:,%5BManager%5D%0ADefaultEnvironment%3DGODEBUG%3Dx509ignoreCN%3D0%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/10-default-env-godebug.conf
- contents:
source: data:,%23%20Force-load%20legacy%20iptables%20so%20it%20is%20usable%20from%20pod%20network%20namespaces%0Aip_tables%0A
mode: 420
overwrite: true
path: /etc/modules-load.d/iptables.conf
- contents:
source: data:,NODE_SIZING_ENABLED%3Dfalse%0ASYSTEM_RESERVED_MEMORY%3D1Gi%0ASYSTEM_RESERVED_CPU%3D500m
mode: 420
overwrite: true
path: /etc/node-sizing-enabled.env
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-e%0ANODE_SIZES_ENV%3D%24%7BNODE_SIZES_ENV%3A-%2Fetc%2Fnode-sizing.env%7D%0Afunction%20dynamic_memory_sizing%20%7B%0A%20%20%20%20total_memory%3D%24(free%20-g%7Cawk%20'%2F%5EMem%3A%2F%7Bprint%20%242%7D')%0A%20%20%20%20%23%20total_memory%3D8%20test%20the%20recommended%20values%20by%20modifying%20this%20value%0A%20%20%20%20recommended_systemreserved_memory%3D0%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2025%25%20of%20the%20first%204GB%20of%20memory%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24total_memory%200.25%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D1%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2020%25%20of%20the%20next%204GB%20of%20memory%20(up%20to%208GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.20%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%208))%3B%20then%20%23%2010%25%20of%20the%20next%208GB%20of%20memory%20(up%20to%2016GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.10%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-8))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%20112))%3B%20then%20%23%206%25%20of%20the%20next%20112GB%20of%20memory%20(up%20to%20128GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%206.72%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-112))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3E%3D%200))%3B%20then%20%23%202%25%20of%20any%20memory%20above%20128GB%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.02%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%24%7Brecommended_systemreserved_memory%7DGi%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_cpu_sizing%20%7B%0A%20%20%20%20total_cpu%3D%24(getconf%20_NPROCESSORS_ONLN)%0A%20%20%20%20recommended_systemreserved_cpu%3D0%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%206%25%20of%20the%20first%20core%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24total_cpu%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D0.06%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%201%25%20of%20the%20next%20core%20(up%20to%202%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%202))%3B%20then%20%23%200.5%25%20of%20the%20next%202%20cores%20(up%20to%204%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.005%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-2))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3E%3D%200))%3B%20then%20%23%200.25%25%20of%20any%20cores%20above%204%20cores%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.0025%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%24%7Brecommended_systemreserved_cpu%7D%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_ephemeral_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_pid_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20dynamic_memory_sizing%0A%20%20%20%20dynamic_cpu_sizing%0A%20%20%20%20%23dynamic_ephemeral_sizing%0A%20%20%20%20%23dynamic_pid_sizing%0A%7D%0Afunction%20static_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%241%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%242%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0A%0Aif%20%5B%20%241%20%3D%3D%20%22true%22%20%5D%3B%20then%0A%20%20%20%20dynamic_node_sizing%0Aelif%20%5B%20%241%20%3D%3D%20%22false%22%20%5D%3B%20then%0A%20%20%20%20static_node_sizing%20%242%20%243%0Aelse%0A%20%20%20%20echo%20%22Unrecongnized%20command%20line%20option.%20Valid%20options%20are%20%5C%22true%5C%22%20or%20%5C%22false%5C%22%22%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/sbin/dynamic-system-reserved-calc.sh
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AKUBE%20API%20SERVER%20SERVING%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet-ca.crt
- contents:
source: data:,%23%20Turning%20on%20Accounting%20helps%20track%20down%20performance%20issues.%0A%5BManager%5D%0ADefaultCPUAccounting%3Dyes%0ADefaultMemoryAccounting%3Dyes%0ADefaultBlockIOAccounting%3Dyes%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/kubelet-cgroups.conf
- contents:
source: data:,%5BService%5D%0AEnvironment%3D%22KUBELET_LOG_LEVEL%3D2%22%0A
mode: 420
overwrite: true
path: /etc/systemd/system/kubelet.service.d/20-logging.conf
- contents:
source: data:,%23%20ignore%20known%20SDN-managed%20devices%0A%5Bdevice%5D%0Amatch-device%3Dinterface-name%3Abr-int%3Binterface-name%3Abr-local%3Binterface-name%3Abr-nexthop%2Cinterface-name%3Aovn-k8s-*%2Cinterface-name%3Ak8s-*%3Binterface-name%3Atun0%3Binterface-name%3Abr0%3Bdriver%3Aveth%0Amanaged%3D0%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/sdn.conf
- contents:
source: data:,D%20%2Frun%2Fnm-system-connections%200755%20root%20root%20-%20-%0AD%20%2Frun%2Fnm-system-connections-work%200755%20root%20root%20-%20-%0Ad%20%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/nm.conf
- contents:
source: data:,%7B%22auths%22%3A%7B%22example.com%22%3A%7B%22auth%22%3A%22MCC-PULL-SECRET%22%7D%7D%7D%0A
mode: 384
overwrite: true
path: /var/lib/kubelet/config.json
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AROOT%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/ca.crt
- contents:
source: data:,%23%20disable%20key%20lookup%20from%20~%2F.ssh%2Fauthorized_keys.d%2F%20on%20FCOS%0AAuthorizedKeysCommand%20none%0A
mode: 420
overwrite: true
path: /etc/ssh/sshd_config.d/10-disable-ssh-key-dir.conf
- contents:
source: data:,net.ipv4.ip_forward%20%3D%201%0Anet.ipv6.conf.all.forwarding%20%3D%201%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/forward.conf
- contents:
source: data:,%0Afs.inotify.max_user_watches%20%3D%2065536%0Afs.inotify.max_user_instances%20%3D%208192%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/inotify.conf
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20First%2C%20we%20need%20to%20wait%20until%20DHCP%20finishes%20and%20the%20node%20has%20a%20non-%60localhost%60%0A%23%20hostname%20before%20%60kubelet.service%60%20starts.%0A%23%20That's%20the%20%60--wait%60%20argument%20as%20used%20by%20%60node-valid-hostname.service%60.%0A%23%0A%23%20Second%2C%20on%20GCP%20specifically%20we%20truncate%20the%20hostname%20if%20it's%20%3E63%20characters.%0A%23%20That's%20%60gcp-hostname.service%60.%0A%0A%23%20Block%20indefinitely%20until%20the%20host%20gets%20a%20non-localhost%20name.%0A%23%20Note%20node-valid-hostname.service%20uses%20systemd%20to%20abort%20if%20this%20takes%20too%20long.%0Await_localhost()%20%7B%0A%20%20%20%20echo%20%22waiting%20for%20non-localhost%20hostname%20to%20be%20assigned%22%0A%20%20%20%20while%20%5B%5B%20%22%24(%3C%20%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%20%3D~%20(localhost%7Clocalhost.localdomain)%20%5D%5D%3B%0A%20%20%20%20do%0A%20%20%20%20%20%20%20%20sleep%201%0A%20%20%20%20done%0A%20%20%20%20echo%20%22node%20identified%20as%20%24(%3C%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_aws_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20aws%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%0A%20%20%20%20echo%20%22setting%20transient%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20--transient%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_gcp_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20gcp%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%20%20%20%20local%20type_arg%3D%22transient%22%0A%0A%20%20%20%20%23%20%2Fetc%2Fhostname%20is%20used%20for%20static%20hostnames%20and%20is%20authoritative.%0A%20%20%20%20%23%20This%20will%20check%20to%20make%20sure%20that%20the%20static%20hostname%20is%20the%0A%20%20%20%20%23%20less%20than%20or%20equal%20to%2063%20characters%20in%20length.%0A%20%20%20%20if%20%5B%20-f%20%2Fetc%2Fhostname%20%5D%20%26%26%20%5B%20%22%24(cat%20%2Fetc%2Fhostname%20%7C%20wc%20-m)%22%20-gt%200%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20etc_name%3D%22%24(%3C%20%2Fetc%2Fhostname)%22%0A%20%20%20%20%20%20%20%20type_arg%3D%22static%22%0A%20%20%20%20%20%20%20%20if%20%5B%20%22%24%7Betc_name%7D%22%20!%3D%20%22%24%7Bhost_name%7D%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22%2Fetc%2Fhostname%20is%20set%20to%20%24%7Betc_name%7D%20but%20does%20not%20match%20%24%7Bhost_name%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22using%20%2Fetc%2Fhostname%20as%20the%20authoritative%20name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20host_name%3D%22%24%7Betc_name%7D%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20fi%0A%0A%20%20%20%20%23%20Only%20mutate%20the%20hostname%20if%20the%20length%20is%20longer%20than%2063%20characters.%20The%0A%20%20%20%20%23%20hostname%20will%20be%20the%20lesser%20of%2063%20characters%20after%20the%20first%20dot%20in%20the%0A%20%20%20%20%23%20FQDN.%20%20This%20algorithm%20is%20only%20known%20to%20work%20in%20GCP%2C%20and%20hence%20is%20only%0A%20%20%20%20%23%20executed%20in%20GCP.%0A%20%20%20%20if%20%5B%20%22%24%7B%23host_name%7D%22%20-gt%2063%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20alt_name%3D%24(printf%20%22%24%7Bhost_name%7D%22%20%7C%20cut%20-f1%20-d'.'%20%7C%20cut%20-c%20-63)%0A%20%20%20%20%20%20%20%20echo%20%22%24%7Bhost_name%7D%20is%20longer%20than%2063%20characters%2C%20using%20truncated%20hostname%22%0A%20%20%20%20%20%20%20%20host_name%3D%22%24%7Balt_name%7D%22%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22setting%20%24%7Btype_arg%7D%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20%22--%24%7Btype_arg%7D%22%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aarg%3D%24%7B1%7D%3B%20shift%3B%0Acase%20%22%24%7Barg%7D%22%20in%0A%20%20%20%20--wait)%20wait_localhost%3B%3B%0A%20%20%20%20--gcp)%20set_gcp_hostname%3B%3B%0A%20%20%20%20--aws)%20set_aws_hostname%3B%3B%0A%20%20%20%20*)%20echo%20%22Unhandled%20arg%20%24arg%22%3B%20exit%201%0Aesac%0A
mode: 493
overwrite: true
path: /usr/local/bin/mco-hostname
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%0Aset%20-eou%20pipefail%0A%0A%23%20context%0Aintapi%3D%24(oc%20get%20infrastructures.config.openshift.io%20cluster%20-o%20%22jsonpath%3D%7B.status.apiServerInternalURI%7D%22)%0Acontext%3D%22%24(oc%20config%20current-context)%22%0A%23%20cluster%0Acluster%3D%22%24(oc%20config%20view%20-o%20%22jsonpath%3D%7B.contexts%5B%3F(%40.name%3D%3D%5C%22%24context%5C%22)%5D.context.cluster%7D%22)%22%0Aserver%3D%22%24(oc%20config%20view%20-o%20%22jsonpath%3D%7B.clusters%5B%3F(%40.name%3D%3D%5C%22%24cluster%5C%22)%5D.cluster.server%7D%22)%22%0A%23%20token%0Aca_crt_data%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20-o%20%22jsonpath%3D%7B.data.ca%5C.crt%7D%22%20%7C%20base64%20--decode)%22%0Anamespace%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20%20-o%20%22jsonpath%3D%7B.data.namespace%7D%22%20%7C%20base64%20--decode)%22%0Atoken%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20-o%20%22jsonpath%3D%7B.data.token%7D%22%20%7C%20base64%20--decode)%22%0A%0Aexport%20KUBECONFIG%3D%22%24(mktemp)%22%0Akubectl%20config%20set-credentials%20%22kubelet%22%20--token%3D%22%24token%22%20%3E%2Fdev%2Fnull%0Aca_crt%3D%22%24(mktemp)%22%3B%20echo%20%22%24ca_crt_data%22%20%3E%20%24ca_crt%0Akubectl%20config%20set-cluster%20%24cluster%20--server%3D%22%24intapi%22%20--certificate-authority%3D%22%24ca_crt%22%20--embed-certs%20%3E%2Fdev%2Fnull%0Akubectl%20config%20set-context%20kubelet%20--cluster%3D%22%24cluster%22%20--user%3D%22kubelet%22%20%3E%2Fdev%2Fnull%0Akubectl%20config%20use-context%20kubelet%20%3E%2Fdev%2Fnull%0Acat%20%22%24KUBECONFIG%22%0A
mode: 493
overwrite: true
path: /usr/local/bin/recover-kubeconfig.sh
- contents:
source: data:,
mode: 493
overwrite: true
path: /etc/kubernetes/kubelet-plugins/volume/exec/.dummy
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20Workaround%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1941714%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1935539%0A%0Adriver%3D%24(nmcli%20-t%20-m%20tabular%20-f%20general.driver%20dev%20show%20%22%24%7BDEVICE_IFACE%7D%22)%0A%0Aif%20%5B%5B%20%22%242%22%20%3D%3D%20%22up%22%20%26%26%20%22%24%7Bdriver%7D%22%20%3D%3D%20%22vmxnet3%22%20%5D%5D%3B%20then%0A%20%20logger%20-s%20%2299-vsphere-disable-tx-udp-tnl%20triggered%20by%20%24%7B2%7D%20on%20device%20%24%7BDEVICE_IFACE%7D.%22%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-segmentation%20off%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-csum-segmentation%20off%0Afi%0A
mode: 484
overwrite: true
path: /etc/NetworkManager/dispatcher.d/99-vsphere-disable-tx-udp-tnl
- contents:
source: data:text/plain,unqualified-search-registries%20%3D%20%5B%22registry.access.redhat.com%22%2C%20%22docker.io%22%5D%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2Frelease%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-1.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-2.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22blocked-reg.io%22%0A%20%20blocked%20%3D%20true%0A
mode: 420
overwrite: true
path: /etc/containers/registries.conf
- contents:
source: data:,%5Bcrio%5D%0Ainternal_wipe%20%3D%20true%0A%0A%5Bcrio.api%5D%0Astream_address%20%3D%20%22%22%0Astream_port%20%3D%20%2210010%22%0A%0A%5Bcrio.runtime%5D%0Aconmon%20%3D%20%22%2Fusr%2Flibexec%2Fcrio%2Fconmon%22%0Aconmon_cgroup%20%3D%20%22pod%22%0Adefault_env%20%3D%20%5B%0A%20%20%20%20%22NSS_SDB_USE_CACHE%3Dno%22%2C%0A%5D%0Alog_level%20%3D%20%22info%22%0Acgroup_manager%20%3D%20%22systemd%22%0Adefault_sysctls%20%3D%20%5B%0A%20%20%20%20%22net.ipv4.ping_group_range%3D0%202147483647%22%2C%0A%5D%0Ahooks_dir%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%20%20%20%20%22%2Frun%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%5D%0Amanage_ns_lifecycle%20%3D%20true%0Aabsent_mount_sources_to_reject%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fhostname%22%2C%0A%5D%0A%0A%5Bcrio.image%5D%0Aglobal_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_image%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%40sha256%3Abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%22%0Apause_image_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_command%20%3D%20%22%2Fusr%2Fbin%2Fpod%22%0A%0A%5Bcrio.network%5D%0Anetwork_dir%20%3D%20%22%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F%22%0Aplugin_dirs%20%3D%20%5B%0A%20%20%20%20%22%2Fvar%2Flib%2Fcni%2Fbin%22%2C%0A%20%20%20%20%22%2Fusr%2Flibexec%2Fcni%22%2C%0A%5D%0A%0A%5Bcrio.metrics%5D%0Aenable_metrics%20%3D%20true%0Ametrics_port%20%3D%209537%0A
mode: 420
overwrite: true
path: /etc/crio/crio.conf.d/00-default
- contents:
source: data:text/plain,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22atomic%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
mode: 420
overwrite: true
path: /etc/containers/policy.json
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/cloud.conf
- contents:
source: data:,kind%3A%20KubeletConfiguration%0AapiVersion%3A%20kubelet.config.k8s.io%2Fv1beta1%0Aauthentication%3A%0A%20%20x509%3A%0A%20%20%20%20clientCAFile%3A%20%2Fetc%2Fkubernetes%2Fkubelet-ca.crt%0A%20%20anonymous%3A%0A%20%20%20%20enabled%3A%20false%0AcgroupDriver%3A%20systemd%0AcgroupRoot%3A%20%2F%0AclusterDNS%3A%0A%20%20-%20172.30.0.10%0AclusterDomain%3A%20cluster.local%0AcontainerLogMaxSize%3A%2050Mi%0AmaxPods%3A%20250%0AkubeAPIQPS%3A%2050%0AkubeAPIBurst%3A%20100%0ArotateCertificates%3A%20true%0AserializeImagePulls%3A%20false%0AstaticPodPath%3A%20%2Fetc%2Fkubernetes%2Fmanifests%0AsystemCgroups%3A%20%2Fsystem.slice%0AsystemReserved%3A%0A%20%20ephemeral-storage%3A%201Gi%0AfeatureGates%3A%0A%20%20APIPriorityAndFairness%3A%20true%0A%20%20LegacyNodeRoleBehavior%3A%20false%0A%20%20NodeDisruptionExclusion%3A%20true%0A%20%20RotateKubeletServerCertificate%3A%20true%0A%20%20ServiceNodeExclusion%3A%20true%0A%20%20SupportPodPidsLimit%3A%20true%0A%20%20DownwardAPIHugePages%3A%20true%0AserverTLSBootstrap%3A%20true%0AtlsMinVersion%3A%20VersionTLS12%0AtlsCipherSuites%3A%0A%20%20-%20TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256%0A%20%20-%20TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256%0A%20%20-%20TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384%0A%20%20-%20TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384%0A%20%20-%20TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256%0A%20%20-%20TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet.conf
systemd:
units:
- dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="ENABLE_PROFILE_UNIX_SOCKET=true"
name: 10-mco-profile-unix-socket.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
name: crio.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: docker.socket
- contents: |
[Unit]
Description=Dynamically sets the system reserved for the kubelet
Wants=network-online.target
After=network-online.target ignition-firstboot-complete.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/node-sizing-enabled.env
ExecStart=/bin/bash /usr/local/sbin/dynamic-system-reserved-calc.sh ${NODE_SIZING_ENABLED} ${SYSTEM_RESERVED_MEMORY} ${SYSTEM_RESERVED_CPU}
[Install]
RequiredBy=kubelet.service
enabled: true
name: kubelet-auto-node-size.service
- contents: |
[Unit]
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target
Requires=crio.service kubelet-auto-node-size.service
After=network-online.target crio.service kubelet-auto-node-size.service
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
EnvironmentFile=/etc/node-sizing.env
ExecStart=/usr/bin/hyperkube \
kubelet \
--config=/etc/kubernetes/kubelet.conf \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_id=${ID} \
--node-ip=${KUBELET_NODE_IP} \
--minimum-container-ttl-duration=6m0s \
--cloud-provider= \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
\
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
--pod-infra-container-image=registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \
--system-reserved=cpu=${SYSTEM_RESERVED_CPU},memory=${SYSTEM_RESERVED_MEMORY} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
enabled: true
name: kubelet.service
- contents: |
[Unit]
Description=Machine Config Daemon Firstboot
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# Removal of this file signals firstboot completion
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
After=machine-config-daemon-pull.service
Before=crio.service kubelet.service
[Service]
Type=oneshot
RemainAfterExit=yes
# Disable existing repos (if any) so that OS extensions would use embedded RPMs only
ExecStartPre=-/usr/bin/sh -c "sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/*.repo"
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
enabled: true
name: machine-config-daemon-firstboot.service
- contents: |
[Unit]
Description=Machine Config Daemon Pull
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# This "stamp file" is unlinked when we complete
# machine-config-daemon-firstboot.service
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
# Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown
Wants=network-online.target crio-wipe.service
After=network-online.target crio-wipe.service
[Service]
Type=oneshot
RemainAfterExit=yes
# See https://github.com/coreos/fedora-coreos-tracker/issues/354
ExecStart=/bin/sh -c '/bin/mkdir -p /run/bin && chcon --reference=/usr/bin /run/bin'
ExecStart=/bin/sh -c "while ! /usr/bin/podman pull --authfile=/var/lib/kubelet/config.json --quiet '<no value>'; do sleep 1; done"
ExecStart=/bin/sh -c "/usr/bin/podman run --rm --quiet --net=host --entrypoint=cat '<no value>' /usr/bin/machine-config-daemon > /run/bin/machine-config-daemon.tmp"
ExecStart=/bin/sh -c '/usr/bin/chmod a+x /run/bin/machine-config-daemon.tmp && mv /run/bin/machine-config-daemon.tmp /run/bin/machine-config-daemon'
[Install]
RequiredBy=machine-config-daemon-firstboot.service
enabled: true
name: machine-config-daemon-pull.service
- contents: |
[Unit]
Before=NetworkManager.service
After=systemd-tmpfiles-setup.service
[Mount]
Where=/etc/NetworkManager/systemConnectionsMerged
What=overlay
Type=overlay
Options=lowerdir=/etc/NetworkManager/system-connections,upperdir=/run/nm-system-connections,workdir=/run/nm-system-connections-work
[Install]
WantedBy=multi-user.target
enabled: true
name: etc-NetworkManager-systemConnectionsMerged.mount
- contents: |
[Unit]
Description=Wait for a non-localhost hostname
Before=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/local/bin/mco-hostname --wait
# Wait up to 5min for the node to get a non-localhost name
TimeoutSec=300
[Install]
WantedBy=multi-user.target
# Ensure that network-online.target will not complete until the node has a non-localhost hostname.
RequiredBy=network-online.target
enabled: true
name: node-valid-hostname.service
- contents: |
[Unit]
Description=Writes IP address configuration so that kubelet and crio services select a valid node IP
Wants=network-online.target crio-wipe.service
After=network-online.target ignition-firstboot-complete.service crio-wipe.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
# Would prefer to do Restart=on-failure instead of this bash retry loop, but
# the version of systemd we have right now doesn't support it. It should be
# available in systemd v244 and higher.
ExecStart=/bin/bash -c " \
until \
/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
--volume /etc/systemd/system:/etc/systemd/system:z \
\
node-ip \
set \
--retry-on-failure; \
do \
sleep 5; \
done"
ExecStart=/bin/systemctl daemon-reload
[Install]
RequiredBy=kubelet.service
enabled: true
name: nodeip-configuration.service
- enabled: false
name: openvswitch.service
- contents: "[Unit]\nDescription=Configures OVS with proper host networking
configuration\n# Removal of this file signals firstboot completion\nConditionPathExists=!/etc/ignition-machine-config-encapsulated.json\n#
This service is used to move a physical NIC into OVS and reconfigure OVS
to use the host IP\nRequires=openvswitch.service\nWants=NetworkManager-wait-online.service\nAfter=NetworkManager-wait-online.service
openvswitch.service network.service\nBefore=network-online.target kubelet.service
crio.service node-valid-hostname.service\n\n[Service]\n# Need oneshot to
delay kubelet\nType=oneshot\nExecStart=/usr/local/bin/configure-ovs.sh \nStandardOutput=journal+console\nStandardError=journal+console\n\n[Install]\nWantedBy=network-online.target\n"
enabled: false
name: ovs-configuration.service
- dropins:
- contents: |
[Service]
Restart=always
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'
name: 10-ovs-vswitchd-restart.conf
name: ovs-vswitchd.service
- dropins:
- contents: |
[Service]
Restart=always
name: 10-ovsdb-restart.conf
enabled: false
name: ovsdb-server.service
- dropins:
- contents: ""
name: 10-mco-default-env.conf
name: pivot.service
- dropins:
- contents: |
# See https://github.com/openshift/machine-config-operator/issues/1897
[Service]
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=6
name: mco-controlplane-nice.conf
name: rpm-ostreed.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: zincati.service
extensions: []
fips: false
kernelArguments: []
kernelType: default
osImageURL: registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
bootstrap_test.go:251: Bootstrap rendered "rendered-master-7d528458dc77d0b408db5242fb357e44":
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
annotations:
machineconfiguration.openshift.io/generated-by-controller-version: was-not-built-properly
creationTimestamp: null
name: rendered-master-7d528458dc77d0b408db5242fb357e44
ownerReferences:
- apiVersion: machineconfiguration.openshift.io/v1
blockOwnerDeletion: true
controller: true
kind: MachineConfigPool
name: master
uid: ""
spec:
config:
ignition:
version: 3.2.0
passwd:
users:
- name: core
sshAuthorizedKeys:
- ssh-rsa SSH-AUTHORIZED-KEY
storage:
files:
- contents:
source: data:,%5Bmain%5D%0Aplugins%3Dkeyfile%2Cifcfg-rh%0A%5Bkeyfile%5D%0Apath%3D%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/99-keyfiles.conf
- contents:
source: data:,
mode: 384
overwrite: true
path: /etc/pki/ca-trust/source/anchors/openshift-config-user-ca-bundle.crt
- contents:
source: data:,KUBERNETES_SERVICE_HOST%3D'api-int.domain.example.com'%0AKUBERNETES_SERVICE_PORT%3D'6443'%0A
mode: 420
overwrite: true
path: /etc/kubernetes/apiserver-url.env
- contents:
source: data:,%23%20This%20file%20is%20managed%20by%20machine-config-operator.%0A%23%20Suppress%20audit%20rules%20which%20always%20trigger%20for%20container%0A%23%20workloads%2C%20as%20they%20spam%20the%20audit%20log.%20%20Workloads%20are%20expected%0A%23%20to%20be%20dynamic%2C%20and%20the%20networking%20stack%20uses%20iptables.%0A-a%20exclude%2Calways%20-F%20msgtype%3DNETFILTER_CFG%0A%23%20The%20default%20bridged%20networking%20enables%20promiscuous%20on%20the%20veth%0A%23%20device.%20%20Ideally%2C%20we'd%20teach%20audit%20to%20ignore%20only%20veth%20devices%2C%0A%23%20since%20one%20might%20legitimately%20care%20about%20promiscuous%20on%20real%20physical%0A%23%20devices.%20%20But%20we%20can't%20currently%20differentiate.%0A-a%20exclude%2Calways%20-F%20msgtype%3DANOM_PROMISCUOUS%0A
mode: 420
overwrite: true
path: /etc/audit/rules.d/mco-audit-quiet-containers.rules
- contents:
source: data:,r%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F80-openshift-network.conf%0Ar%20%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F10-ovn-kubernetes.conf%0Ad%20%2Frun%2Fmultus%2Fcni%2Fnet.d%2F%200755%20root%20root%20-%20-%0AD%20%2Fvar%2Flib%2Fcni%2Fnetworks%2Fopenshift-sdn%2F%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/cleanup-cni.conf
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/static-pod-resources/configmaps/cloud-config/ca-bundle.pem
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-eux%0A%0A%23%20This%20file%20is%20not%20needed%20anymore%20in%204.7%2B%2C%20but%20when%20rolling%20back%20to%204.6%0A%23%20the%20ovs%20pod%20needs%20it%20to%20know%20ovs%20is%20running%20on%20the%20host.%0Atouch%20%2Fvar%2Frun%2Fovs-config-executed%0A%0Aif%20%5B%20-d%20%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%20%5D%3B%20then%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0Aelse%0A%20%20NM_CONN_PATH%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0Afi%0A%0A%23%20In%20RHEL7%20files%20in%20%2F%7Betc%2Crun%7D%2FNetworkManager%2Fsystem-connections%20end%20without%20the%20suffix%20'.nmconnection'%2C%20whereas%20in%20RHCOS%20they%20end%20with%20the%20suffix.%0Amanaged_nm_conn_files%3D(%24(echo%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D%20%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection))%0A%0A%23%20Workaround%20to%20ensure%20OVS%20is%20installed%20due%20to%20bug%20in%20systemd%20Requires%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1888017%0Acopy_nm_conn_files()%20%7B%0A%20%20src_path%3D%22%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%22%0A%20%20dst_path%3D%22%2Fetc%2FNetworkManager%2Fsystem-connections%22%0A%20%20if%20%5B%20-d%20%22%24src_path%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22%24src_path%20exists%22%0A%20%20%20%20for%20file%20in%20%22%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%22%3B%20do%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24src_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24dst_path%2F%24file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20new%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20elif%20!%20cmp%20--silent%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22Persisting%20updated%20configuration%20%24file%22%0A%20%20%20%20%20%20%20%20%20%20cp%20%22%24src_path%2F%24file%22%20%22%24dst_path%2F%24file%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22Skipping%20%24file%20since%20its%20status%20is%20current%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20done%0A%20%20fi%0A%7D%0A%0A%23%20Used%20to%20replace%20an%20old%20master%20connection%20uuid%20with%20a%20new%20one%20on%20all%20connections%0Areplace_connection_master()%20%7B%0A%20%20local%20old%3D%22%241%22%0A%20%20local%20new%3D%22%242%22%0A%20%20for%20conn_uuid%20in%20%24(nmcli%20-g%20UUID%20connection%20show)%20%3B%20do%0A%20%20%20%20if%20%5B%20%22%24(nmcli%20-g%20connection.master%20connection%20show%20uuid%20%22%24conn_uuid%22)%22%20!%3D%20%22%24old%22%20%5D%3B%20then%0A%20%20%20%20%20%20continue%0A%20%20%20%20fi%0A%0A%20%20%20%20nmcli%20conn%20mod%20uuid%20%24conn_uuid%20connection.master%20%22%24new%22%0A%20%20%20%20%23%20make%20sure%20we%20persist%20this%20modification%0A%20%20%20%20conn_file%3D%22%24(egrep%20-l%20uuid%3D%24conn_uuid%20%24%7BNM_CONN_PATH%7D%2F*%20%7C%20xargs%20basename)%22%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24conn_file%22%20%26%26%20!%20%22%20%24%7Bmanaged_nm_conn_files%5B%40%5D%7D%20%22%20%3D~%20%22%20%24%7Bconn_file%7D%20%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20managed_nm_conn_files%2B%3D(%24conn_file)%0A%20%20%20%20fi%0A%20%20done%0A%7D%0A%0Aif%20!%20rpm%20-qa%20%7C%20grep%20-q%20openvswitch%3B%20then%0A%20%20echo%20%22Warning%3A%20Openvswitch%20package%20is%20not%20installed!%22%0A%20%20exit%201%0Afi%0A%0Aif%20%5B%20%22%241%22%20%3D%3D%20%22OVNKubernetes%22%20%5D%3B%20then%0A%20%20%23%20Configures%20NICs%20onto%20OVS%20bridge%20%22br-ex%22%0A%20%20%23%20Configuration%20is%20either%20auto-detected%20or%20provided%20through%20a%20config%20file%20written%20already%20in%20Network%20Manager%0A%20%20%23%20key%20files%20under%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%0A%20%20%23%20Managing%20key%20files%20is%20outside%20of%20the%20scope%20of%20this%20script%0A%0A%20%20%23%20if%20the%20interface%20is%20of%20type%20vmxnet3%20add%20multicast%20capability%20for%20that%20driver%0A%20%20%23%20REMOVEME%3A%20Once%20BZ%3A1854355%20is%20fixed%2C%20this%20needs%20to%20get%20removed.%0A%20%20function%20configure_driver_options%20%7B%0A%20%20%20%20intf%3D%241%0A%20%20%20%20driver%3D%24(cat%20%22%2Fsys%2Fclass%2Fnet%2F%24%7Bintf%7D%2Fdevice%2Fuevent%22%20%7C%20grep%20DRIVER%20%7C%20awk%20-F%20%22%3D%22%20'%7Bprint%20%242%7D')%0A%20%20%20%20echo%20%22Driver%20name%20is%22%20%24driver%0A%20%20%20%20if%20%5B%20%22%24driver%22%20%3D%20%22vmxnet3%22%20%5D%3B%20then%0A%20%20%20%20%20%20ifconfig%20%22%24intf%22%20allmulti%0A%20%20%20%20fi%0A%20%20%7D%0A%0A%20%20iface%3D%22%22%0A%20%20counter%3D0%0A%20%20%23%20find%20default%20interface%0A%20%20while%20%5B%20%24counter%20-lt%2012%20%5D%3B%20do%0A%20%20%20%20%23%20check%20ipv4%0A%20%20%20%20iface%3D%24(ip%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv4%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20%23%20check%20ipv6%0A%20%20%20%20iface%3D%24(ip%20-6%20route%20show%20default%20%7C%20awk%20'%7B%20if%20(%244%20%3D%3D%20%22dev%22)%20%7B%20print%20%245%3B%20exit%20%7D%20%7D')%0A%20%20%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22IPv6%20Default%20gateway%20interface%20found%3A%20%24%7Biface%7D%22%0A%20%20%20%20%20%20break%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20%20%20echo%20%22No%20default%20route%20found%20on%20attempt%3A%20%24%7Bcounter%7D%22%0A%20%20%20%20sleep%205%0A%20%20done%0A%0A%20%20if%20%5B%20%22%24iface%22%20%3D%20%22br-ex%22%20%5D%3B%20then%0A%20%20%20%20%23%20handle%20vlans%20and%20bonds%20etc%20if%20they%20have%20already%20been%0A%20%20%20%20%23%20configured%20via%20nm%20key%20files%20and%20br-ex%20is%20already%20up%0A%20%20%20%20ifaces%3D%24(ovs-vsctl%20list-ifaces%20%24%7Biface%7D)%0A%20%20%20%20for%20intf%20in%20%24ifaces%3B%20do%20configure_driver_options%20%24intf%3B%20done%0A%20%20%20%20echo%20%22Networking%20already%20configured%20and%20up%20for%20br-ex!%22%0A%20%20%20%20%23%20remove%20bridges%20created%20by%20openshift-sdn%0A%20%20%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br0%0A%20%20%20%20exit%200%0A%20%20fi%0A%0A%20%20if%20%5B%20-z%20%22%24iface%22%20%5D%3B%20then%0A%20%20%20%20echo%20%22ERROR%3A%20Unable%20to%20find%20default%20gateway%20interface%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20%23%20find%20the%20MAC%20from%20OVS%20config%20or%20the%20default%20interface%20to%20use%20for%20OVS%20internal%20port%0A%20%20%23%20this%20prevents%20us%20from%20getting%20a%20different%20DHCP%20lease%20and%20dropping%20connection%0A%20%20if%20!%20iface_mac%3D%24(%3C%22%2Fsys%2Fclass%2Fnet%2F%24%7Biface%7D%2Faddress%22)%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MAC%22%0A%20%20%20%20exit%201%0A%20%20fi%0A%0A%20%20echo%20%22MAC%20address%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mac%7D%22%0A%0A%20%20%23%20find%20MTU%20from%20original%20iface%0A%20%20iface_mtu%3D%24(ip%20link%20show%20%22%24iface%22%20%7C%20awk%20'%7Bprint%20%245%3B%20exit%7D')%0A%20%20if%20%5B%5B%20-z%20%22%24iface_mtu%22%20%5D%5D%3B%20then%0A%20%20%20%20echo%20%22Unable%20to%20determine%20default%20interface%20MTU%2C%20defaulting%20to%201500%22%0A%20%20%20%20iface_mtu%3D1500%0A%20%20else%0A%20%20%20%20echo%20%22MTU%20found%20for%20iface%3A%20%24%7Biface%7D%3A%20%24%7Biface_mtu%7D%22%0A%20%20fi%0A%0A%20%20%23%20store%20old%20conn%20for%20later%0A%20%20old_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%0A%20%20extra_brex_args%3D%22%22%0A%20%20%23%20check%20for%20dhcp%20client%20ids%0A%20%20dhcp_client_id%3D%24(nmcli%20--get-values%20ipv4.dhcp-client-id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv4.dhcp-client-id%20%24%7Bdhcp_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20dhcp6_client_id%3D%24(nmcli%20--get-values%20ipv6.dhcp-duid%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20if%20%5B%20-n%20%22%24dhcp6_client_id%22%20%5D%3B%20then%0A%20%20%20%20extra_brex_args%2B%3D%22ipv6.dhcp-duid%20%24%7Bdhcp6_client_id%7D%20%22%0A%20%20fi%0A%0A%20%20%23%20create%20bridge%3B%20use%20NM's%20ethernet%20device%20default%20route%20metric%20(100)%0A%20%20if%20!%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-bridge%20%5C%0A%20%20%20%20%20%20%20%20con-name%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20conn.interface%20br-ex%20%5C%0A%20%20%20%20%20%20%20%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20ipv6.route-metric%20100%20%5C%0A%20%20%20%20%20%20%20%20%24%7Bextra_brex_args%7D%0A%20%20fi%0A%0A%20%20%23%20find%20default%20port%20to%20add%20to%20bridge%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20%24%7Biface%7D%20master%20br-ex%20con-name%20ovs-port-phys0%0A%20%20fi%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20ovs-port%20conn.interface%20br-ex%20master%20br-ex%20con-name%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20extra_phys_args%3D()%0A%20%20%23%20check%20if%20this%20interface%20is%20a%20vlan%2C%20bond%2C%20team%2C%20or%20ethernet%20type%0A%20%20if%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22vlan%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dvlan%0A%20%20%20%20vlan_id%3D%24(nmcli%20--get-values%20vlan.id%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_id%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_id%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20vlan_parent%3D%24(nmcli%20--get-values%20vlan.parent%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-z%20%22%24vlan_parent%22%20%5D%3B%20then%0A%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20determine%20vlan_parent%20for%20vlan%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20exit%201%0A%20%20%20%20fi%0A%20%20%20%20extra_phys_args%3D(%20dev%20%22%24%7Bvlan_parent%7D%22%20id%20%22%24%7Bvlan_id%7D%22%20)%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22bond%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dbond%0A%20%20%20%20%23%20check%20bond%20options%0A%20%20%20%20bond_opts%3D%24(nmcli%20--get-values%20bond.options%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24bond_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20bond.options%20%22%24%7Bbond_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20elif%20%5B%20%24(nmcli%20--get-values%20connection.type%20conn%20show%20%24%7Bold_conn%7D)%20%3D%3D%20%22team%22%20%5D%3B%20then%0A%20%20%20%20iface_type%3Dteam%0A%20%20%20%20%23%20check%20team%20config%20options%0A%20%20%20%20team_config_opts%3D%24(nmcli%20--get-values%20team.config%20-e%20no%20conn%20show%20%24%7Bold_conn%7D)%0A%20%20%20%20if%20%5B%20-n%20%22%24team_config_opts%22%20%5D%3B%20then%0A%20%20%20%20%20%20extra_phys_args%2B%3D(%20team.config%20%22%24%7Bteam_config_opts%7D%22%20)%0A%20%20%20%20fi%0A%20%20else%0A%20%20%20%20iface_type%3D802-3-ethernet%0A%20%20fi%0A%0A%20%20%23%20use%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%20instead%20of%20%24%7Bextra_phys_args%5B%40%5D%7D%20to%20be%20compatible%20with%20bash%204.2%20in%20RHEL7.9%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20add%20type%20%24%7Biface_type%7D%20conn.interface%20%24%7Biface%7D%20master%20ovs-port-phys0%20con-name%20ovs-if-phys0%20%5C%0A%20%20%20%20connection.autoconnect-priority%20100%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20%24%7Bextra_phys_args%5B%40%5D%2B%22%24%7Bextra_phys_args%5B%40%5D%7D%22%7D%0A%20%20fi%0A%0A%20%20%23%20Get%20the%20new%20connection%20uuid%0A%20%20new_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%0A%20%20%23%20Setup%20an%20exit%20trap%20to%20restore%20any%20modifications%20going%20further%0A%20%20handle_exit_error()%20%7B%0A%20%20%20%20e%3D%24%3F%0A%20%20%20%20%5B%20%24e%20-eq%200%20%5D%20%26%26%20exit%200%0A%20%20%20%20%23%20if%20there%20was%20a%20problem%20network%20isn't%20coming%20up%2C%20revert%20for%20debugging%0A%20%20%20%20set%20%2Be%0A%20%20%20%20replace_connection_master%20%24new_conn%20%24old_conn%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-br-ex%0A%20%20%20%20nmcli%20conn%20down%20ovs-if-phys0%0A%20%20%20%20nmcli%20conn%20up%20%24old_conn%0A%20%20%20%20exit%20%24e%0A%20%20%7D%0A%20%20trap%20%22handle_exit_error%22%20EXIT%0A%0A%20%20%23%20Update%20connections%20with%20master%20property%20set%20to%20use%20the%20new%20connection%0A%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20replace_connection_master%20%24iface%20%24new_conn%0A%0A%20%20%23%20bring%20down%20old%20iface%0A%20%20nmcli%20device%20disconnect%20%24iface%0A%0A%20%20%23%20bring%20up%20new%20connection%20%0A%20%20nmcli%20conn%20up%20ovs-if-phys0%0A%0A%20%20if%20!%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20if%20nmcli%20--fields%20ipv4.method%2Cipv6.method%20conn%20show%20%24old_conn%20%7C%20grep%20manual%3B%20then%0A%20%20%20%20%20%20echo%20%22Static%20IP%20addressing%20detected%20on%20default%20gateway%20connection%3A%20%24%7Bold_conn%7D%22%0A%20%20%20%20%20%20%23%20find%20and%20copy%20the%20old%20connection%20to%20get%20the%20address%20settings%0A%20%20%20%20%20%20if%20egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*%3B%20then%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24(egrep%20-l%20--include%3D*.nmconnection%20uuid%3D%24old_conn%20%24%7BNM_CONN_PATH%7D%2F*)%0A%20%20%20%20%20%20%20%20cloned%3Dfalse%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20unable%20to%20find%20NM%20configuration%20file%20for%20conn%3A%20%24%7Bold_conn%7D.%20Attempting%20to%20clone%20conn%22%0A%20%20%20%20%20%20%20%20old_conn_file%3D%24%7BNM_CONN_PATH%7D%2F%24%7Bold_conn%7D-clone.nmconnection%0A%20%20%20%20%20%20%20%20nmcli%20conn%20clone%20%24%7Bold_conn%7D%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20cloned%3Dtrue%0A%20%20%20%20%20%20%20%20if%20%5B%20!%20-f%20%22%24old_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20echo%20%22ERROR%3A%20unable%20to%20locate%20cloned%20conn%20file%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20%20%20%20%20exit%201%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20%20%20%20%20echo%20%22Successfully%20cloned%20conn%20to%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20echo%20%22old%20connection%20file%20found%20at%3A%20%24%7Bold_conn_file%7D%22%0A%20%20%20%20%20%20new_conn_file%3D%24%7BNM_CONN_PATH%7D%2Fovs-if-br-ex.nmconnection%0A%20%20%20%20%20%20if%20%5B%20-f%20%22%24new_conn_file%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20echo%20%22WARN%3A%20existing%20br-ex%20interface%20file%20found%3A%20%24new_conn_file%2C%20which%20is%20not%20loaded%20in%20NetworkManager...overwriting%22%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cp%20-f%20%24%7Bold_conn_file%7D%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20restorecon%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20%24cloned%3B%20then%0A%20%20%20%20%20%20%20%20nmcli%20conn%20delete%20%24%7Bold_conn%7D-clone%0A%20%20%20%20%20%20%20%20rm%20-f%20%24%7Bold_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20ovs_port_conn%3D%24(nmcli%20--fields%20connection.uuid%20conn%20show%20ovs-port-br-ex%20%7C%20awk%20'%7Bprint%20%242%7D')%0A%20%20%20%20%20%20br_iface_uuid%3D%24(cat%20%2Fproc%2Fsys%2Fkernel%2Frandom%2Fuuid)%0A%20%20%20%20%20%20%23%20modify%20file%20to%20work%20with%20OVS%20and%20have%20unique%20settings%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Euuid%3D.*%24%2Fuuid%3D'%22%24br_iface_uuid%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5Emulti-connect%3D.*%24%2Fd'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Etype%3D.*%24%2Ftype%3Dovs-interface%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Eid%3D.*%24%2Fid%3Dovs-if-br-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20slave-type%3Dovs-port'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20master%3D'%22%24ovs_port_conn%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20if%20grep%20'interface-name%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Einterface-name%3D.*%24%2Finterface-name%3Dbr-ex%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bconnection%5C%5D%24%2Fa%20interface-name%3Dbr-ex'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20!%20grep%20'cloned-mac-address%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20cloned-mac-address%3D'%22%24iface_mac%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Ecloned-mac-address%3D.*%24%2Fcloned-mac-address%3D'%22%24iface_mac%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20if%20grep%20'mtu%3D'%20%24%7Bnew_conn_file%7D%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2F%2C%2F%5E%5C%5B%2F%20s%2F%5Emtu%3D.*%24%2Fmtu%3D'%22%24iface_mtu%22'%2F'%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20sed%20-i%20'%2F%5E%5C%5Bethernet%5C%5D%24%2Fa%20mtu%3D'%22%24iface_mtu%22%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20fi%0A%20%20%20%20%20%20cat%20%3C%3CEOF%20%3E%3E%20%24%7Bnew_conn_file%7D%0A%5Bovs-interface%5D%0Atype%3Dinternal%0AEOF%0A%20%20%20%20%20%20nmcli%20c%20load%20%24%7Bnew_conn_file%7D%0A%20%20%20%20%20%20echo%20%22Loaded%20new%20ovs-if-br-ex%20connection%20file%3A%20%24%7Bnew_conn_file%7D%22%0A%20%20%20%20else%0A%20%20%20%20%20%20nmcli%20c%20add%20type%20ovs-interface%20slave-type%20ovs-port%20conn.interface%20br-ex%20master%20ovs-port-br-ex%20con-name%20%5C%0A%20%20%20%20%20%20%20%20ovs-if-br-ex%20802-3-ethernet.mtu%20%24%7Biface_mtu%7D%20802-3-ethernet.cloned-mac-address%20%24%7Biface_mac%7D%20%5C%0A%20%20%20%20%20%20%20%20ipv4.route-metric%20100%20ipv6.route-metric%20100%0A%20%20%20%20fi%0A%20%20fi%0A%0A%20%20%23%20wait%20for%20DHCP%20to%20finish%2C%20verify%20connection%20is%20up%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20sleep%205%0A%20%20%20%20%23%20check%20if%20connection%20is%20active%0A%20%20%20%20if%20nmcli%20--fields%20GENERAL.STATE%20conn%20show%20ovs-if-br-ex%20%7C%20grep%20-i%20%22activated%22%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22WARN%3A%20OVS%20did%20not%20succesfully%20activate%20NM%20connection.%20Attempting%20to%20bring%20up%20connections%22%0A%20%20counter%3D0%0A%20%20while%20%5B%20%24counter%20-lt%205%20%5D%3B%20do%0A%20%20%20%20if%20nmcli%20conn%20up%20ovs-if-br-ex%3B%20then%0A%20%20%20%20%20%20echo%20%22OVS%20successfully%20configured%22%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20%20%20ip%20a%20show%20br-ex%0A%20%20%20%20%20%20ip%20route%20show%0A%20%20%20%20%20%20configure_driver_options%20%24%7Biface%7D%0A%20%20%20%20%20%20exit%200%0A%20%20%20%20fi%0A%20%20%20%20sleep%205%0A%20%20%20%20counter%3D%24((counter%2B1))%0A%20%20done%0A%0A%20%20echo%20%22ERROR%3A%20Failed%20to%20activate%20ovs-if-br-ex%20NM%20connection%22%0A%20%20exit%201%0Aelif%20%5B%20%22%241%22%20%3D%3D%20%22OpenShiftSDN%22%20%5D%3B%20then%0A%20%20%23%20Revert%20changes%20made%20by%20%2Fusr%2Flocal%2Fbin%2Fconfigure-ovs.sh.%0A%20%20%23%20Remove%20OVS%20bridge%20%22br-ex%22.%20Use%20the%20default%20NIC%20for%20cluster%20network.%0A%20%20iface%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-port-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20iface%3D%24(nmcli%20--get-values%20connection.interface-name%20connection%20show%20ovs-port-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-port-phys0%20%0A%20%20fi%0A%0A%20%20old_conn%3D%22%22%0A%20%20if%20nmcli%20connection%20show%20ovs-if-phys0%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20old_conn%3D%24(nmcli%20-g%20connection.uuid%20conn%20show%20ovs-if-phys0)%0A%20%20%20%20nmcli%20c%20del%20ovs-if-phys0%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-port-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-port-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20ovs-if-br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20ovs-if-br-ex%0A%20%20fi%0A%0A%20%20if%20nmcli%20connection%20show%20br-ex%20%26%3E%20%2Fdev%2Fnull%3B%20then%0A%20%20%20%20nmcli%20c%20del%20br-ex%0A%20%20fi%0A%0A%20%20rm%20-f%20%2Fetc%2FNetworkManager%2Fsystem-connections%2F%7Bbr-ex%2Covs-if-br-ex%2Covs-port-br-ex%2Covs-if-phys0%2Covs-port-phys0%7D.nmconnection%0A%20%20%23%20remove%20bridges%20created%20by%20ovn-kubernetes%2C%20try%20to%20delete%20br-ex%20again%20in%20case%20NM%20fail%20to%20talk%20to%20ovsdb%0A%20%20ovs-vsctl%20--timeout%3D30%20--if-exists%20del-br%20br-int%20--%20--if-exists%20del-br%20br-local%20--%20--if-exists%20del-br%20br-ex%0A%0A%20%20if%20%5B%5B%20-n%20%22%24iface%22%20%5D%5D%3B%20then%0A%20%20%20%20nmcli%20device%20connect%20%24iface%0A%20%20%20%20if%20%5B%20-n%20%22%24old_conn%22%20%5D%3B%20then%0A%20%20%20%20%20%20new_conn%3D%24(nmcli%20--fields%20UUID%2CDEVICE%20conn%20show%20--active%20%7C%20awk%20%22%2F%5Cs%24%7Biface%7D%5Cs*%5C%24%2F%20%7Bprint%20%5C%241%7D%22)%0A%20%20%20%20%20%20replace_connection_master%20%24old_conn%20%24new_conn%0A%20%20%20%20%20%20%23%20re-activate%20the%20profile%20so%20that%20it%20picks%20the%20master%20changes%0A%20%20%20%20%20%20nmcli%20c%20up%20%24new_conn%0A%20%20%20%20%20%20copy_nm_conn_files%0A%20%20%20%20fi%0A%20%20fi%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/bin/configure-ovs.sh
- contents:
source: data:,%23%20This%20file%20is%20generated%20by%20the%20Machine%20Config%20Operator's%20containerruntimeconfig%20controller.%0A%23%0A%23%20storage.conf%20is%20the%20configuration%20file%20for%20all%20tools%0A%23%20that%20share%20the%20containers%2Fstorage%20libraries%0A%23%20See%20man%205%20containers-storage.conf%20for%20more%20information%0A%23%20The%20%22container%20storage%22%20table%20contains%20all%20of%20the%20server%20options.%0A%5Bstorage%5D%0A%0A%23%20Default%20Storage%20Driver%0Adriver%20%3D%20%22overlay%22%0A%0A%23%20Temporary%20storage%20location%0Arunroot%20%3D%20%22%2Fvar%2Frun%2Fcontainers%2Fstorage%22%0A%0A%23%20Primary%20Read%2FWrite%20location%20of%20container%20storage%0Agraphroot%20%3D%20%22%2Fvar%2Flib%2Fcontainers%2Fstorage%22%0A%0A%5Bstorage.options%5D%0A%23%20Storage%20options%20to%20be%20passed%20to%20underlying%20storage%20drivers%0A%0A%23%20AdditionalImageStores%20is%20used%20to%20pass%20paths%20to%20additional%20Read%2FOnly%20image%20stores%0A%23%20Must%20be%20comma%20separated%20list.%0Aadditionalimagestores%20%3D%20%5B%0A%5D%0A%0A%23%20Size%20is%20used%20to%20set%20a%20maximum%20size%20of%20the%20container%20image.%20%20Only%20supported%20by%0A%23%20certain%20container%20storage%20drivers.%0Asize%20%3D%20%22%22%0A%0A%23%20OverrideKernelCheck%20tells%20the%20driver%20to%20ignore%20kernel%20checks%20based%20on%20kernel%20version%0Aoverride_kernel_check%20%3D%20%22true%22%0A%0A%23%20Remap-UIDs%2FGIDs%20is%20the%20mapping%20from%20UIDs%2FGIDs%20as%20they%20should%20appear%20inside%20of%0A%23%20a%20container%2C%20to%20UIDs%2FGIDs%20as%20they%20should%20appear%20outside%20of%20the%20container%2C%20and%0A%23%20the%20length%20of%20the%20range%20of%20UIDs%2FGIDs.%20%20Additional%20mapped%20sets%20can%20be%20listed%0A%23%20and%20will%20be%20heeded%20by%20libraries%2C%20but%20there%20are%20limits%20to%20the%20number%20of%0A%23%20mappings%20which%20the%20kernel%20will%20allow%20when%20you%20later%20attempt%20to%20run%20a%0A%23%20container.%0A%23%0A%23%20remap-uids%20%3D%200%3A1668442479%3A65536%0A%23%20remap-gids%20%3D%200%3A1668442479%3A65536%0A%0A%23%20Remap-User%2FGroup%20is%20a%20name%20which%20can%20be%20used%20to%20look%20up%20one%20or%20more%20UID%2FGID%0A%23%20ranges%20in%20the%20%2Fetc%2Fsubuid%20or%20%2Fetc%2Fsubgid%20file.%20%20Mappings%20are%20set%20up%20starting%0A%23%20with%20an%20in-container%20ID%20of%200%20and%20the%20a%20host-level%20ID%20taken%20from%20the%20lowest%0A%23%20range%20that%20matches%20the%20specified%20name%2C%20and%20using%20the%20length%20of%20that%20range.%0A%23%20Additional%20ranges%20are%20then%20assigned%2C%20using%20the%20ranges%20which%20specify%20the%0A%23%20lowest%20host-level%20IDs%20first%2C%20to%20the%20lowest%20not-yet-mapped%20container-level%20ID%2C%0A%23%20until%20all%20of%20the%20entries%20have%20been%20used%20for%20maps.%0A%23%0A%23%20remap-user%20%3D%20%22storage%22%0A%23%20remap-group%20%3D%20%22storage%22%0A%0A%5Bstorage.options.thinpool%5D%0A%23%20Storage%20Options%20for%20thinpool%0A%0A%23%20autoextend_percent%20determines%20the%20amount%20by%20which%20pool%20needs%20to%20be%0A%23%20grown.%20This%20is%20specified%20in%20terms%20of%20%25%20of%20pool%20size.%20So%20a%20value%20of%2020%20means%0A%23%20that%20when%20threshold%20is%20hit%2C%20pool%20will%20be%20grown%20by%2020%25%20of%20existing%0A%23%20pool%20size.%0A%23%20autoextend_percent%20%3D%20%2220%22%0A%0A%23%20autoextend_threshold%20determines%20the%20pool%20extension%20threshold%20in%20terms%0A%23%20of%20percentage%20of%20pool%20size.%20For%20example%2C%20if%20threshold%20is%2060%2C%20that%20means%20when%0A%23%20pool%20is%2060%25%20full%2C%20threshold%20has%20been%20hit.%0A%23%20autoextend_threshold%20%3D%20%2280%22%0A%0A%23%20basesize%20specifies%20the%20size%20to%20use%20when%20creating%20the%20base%20device%2C%20which%0A%23%20limits%20the%20size%20of%20images%20and%20containers.%0A%23%20basesize%20%3D%20%2210G%22%0A%0A%23%20blocksize%20specifies%20a%20custom%20blocksize%20to%20use%20for%20the%20thin%20pool.%0A%23%20blocksize%3D%2264k%22%0A%0A%23%20directlvm_device%20specifies%20a%20custom%20block%20storage%20device%20to%20use%20for%20the%0A%23%20thin%20pool.%20Required%20if%20you%20setup%20devicemapper%0A%23%20directlvm_device%20%3D%20%22%22%0A%0A%23%20directlvm_device_force%20wipes%20device%20even%20if%20device%20already%20has%20a%20filesystem%0A%23%20directlvm_device_force%20%3D%20%22True%22%0A%0A%23%20fs%20specifies%20the%20filesystem%20type%20to%20use%20for%20the%20base%20device.%0A%23%20fs%3D%22xfs%22%0A%0A%23%20log_level%20sets%20the%20log%20level%20of%20devicemapper.%0A%23%200%3A%20LogLevelSuppress%200%20(Default)%0A%23%202%3A%20LogLevelFatal%0A%23%203%3A%20LogLevelErr%0A%23%204%3A%20LogLevelWarn%0A%23%205%3A%20LogLevelNotice%0A%23%206%3A%20LogLevelInfo%0A%23%207%3A%20LogLevelDebug%0A%23%20log_level%20%3D%20%227%22%0A%0A%23%20min_free_space%20specifies%20the%20min%20free%20space%20percent%20in%20a%20thin%20pool%20require%20for%0A%23%20new%20device%20creation%20to%20succeed.%20Valid%20values%20are%20from%200%25%20-%2099%25.%0A%23%20Value%200%25%20disables%0A%23%20min_free_space%20%3D%20%2210%25%22%0A%0A%23%20mkfsarg%20specifies%20extra%20mkfs%20arguments%20to%20be%20used%20when%20creating%20the%20base%0A%23%20device.%0A%23%20mkfsarg%20%3D%20%22%22%0A%0A%23%20mountopt%20specifies%20extra%20mount%20options%20used%20when%20mounting%20the%20thin%20devices.%0A%23%20mountopt%20%3D%20%22%22%0A%0A%23%20use_deferred_removal%20Marking%20device%20for%20deferred%20removal%0A%23%20use_deferred_removal%20%3D%20%22True%22%0A%0A%23%20use_deferred_deletion%20Marking%20device%20for%20deferred%20deletion%0A%23%20use_deferred_deletion%20%3D%20%22True%22%0A%0A%23%20xfs_nospace_max_retries%20specifies%20the%20maximum%20number%20of%20retries%20XFS%20should%0A%23%20attempt%20to%20complete%20IO%20when%20ENOSPC%20(no%20space)%20error%20is%20returned%20by%0A%23%20underlying%20storage%20device.%0A%23%20xfs_nospace_max_retries%20%3D%20%220%22%0A
mode: 420
overwrite: true
path: /etc/containers/storage.conf
- contents:
source: data:,%23%20Proxy%20environment%20variables%20will%20be%20populated%20in%20this%20file.%20Properly%0A%23%20url%20encoded%20passwords%20with%20special%20characters%20will%20use%20'%25%3CHEX%3E%3CHEX%3E'.%0A%23%20Systemd%20requires%20that%20any%20%25%20used%20in%20a%20password%20be%20represented%20as%0A%23%20%25%25%20in%20a%20unit%20file%20since%20%25%20is%20a%20prefix%20for%20macros%3B%20this%20restriction%20does%20not%0A%23%20apply%20for%20environment%20files.%20Templates%20that%20need%20the%20proxy%20set%20should%20use%0A%23%20'EnvironmentFile%3D%2Fetc%2Fmco%2Fproxy.env'.%0A
mode: 420
overwrite: true
path: /etc/mco/proxy.env
- contents:
source: data:,%5BManager%5D%0ADefaultEnvironment%3DGODEBUG%3Dx509ignoreCN%3D0%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/10-default-env-godebug.conf
- contents:
source: data:,%23%20Force-load%20legacy%20iptables%20so%20it%20is%20usable%20from%20pod%20network%20namespaces%0Aip_tables%0A
mode: 420
overwrite: true
path: /etc/modules-load.d/iptables.conf
- contents:
source: data:text/plain,NODE_SIZING_ENABLED%3Dfalse%0ASYSTEM_RESERVED_MEMORY%3D500Mi%0ASYSTEM_RESERVED_CPU%3D1000m%0A
mode: 420
overwrite: true
path: /etc/node-sizing-enabled.env
- contents:
source: data:,%23!%2Fbin%2Fbash%0Aset%20-e%0ANODE_SIZES_ENV%3D%24%7BNODE_SIZES_ENV%3A-%2Fetc%2Fnode-sizing.env%7D%0Afunction%20dynamic_memory_sizing%20%7B%0A%20%20%20%20total_memory%3D%24(free%20-g%7Cawk%20'%2F%5EMem%3A%2F%7Bprint%20%242%7D')%0A%20%20%20%20%23%20total_memory%3D8%20test%20the%20recommended%20values%20by%20modifying%20this%20value%0A%20%20%20%20recommended_systemreserved_memory%3D0%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2025%25%20of%20the%20first%204GB%20of%20memory%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24total_memory%200.25%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D1%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%204))%3B%20then%20%23%2020%25%20of%20the%20next%204GB%20of%20memory%20(up%20to%208GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.20%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-4))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%208))%3B%20then%20%23%2010%25%20of%20the%20next%208GB%20of%20memory%20(up%20to%2016GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.10%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%200.80%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-8))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3C%3D%20112))%3B%20then%20%23%206%25%20of%20the%20next%20112GB%20of%20memory%20(up%20to%20128GB)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%206.72%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_memory%3D%24((total_memory-112))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_memory%20%3E%3D%200))%3B%20then%20%23%202%25%20of%20any%20memory%20above%20128GB%0A%20%20%20%20%20%20%20%20recommended_systemreserved_memory%3D%24(echo%20%24recommended_systemreserved_memory%20%24(echo%20%24total_memory%200.02%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%24%7Brecommended_systemreserved_memory%7DGi%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_cpu_sizing%20%7B%0A%20%20%20%20total_cpu%3D%24(getconf%20_NPROCESSORS_ONLN)%0A%20%20%20%20recommended_systemreserved_cpu%3D0%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%206%25%20of%20the%20first%20core%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24total_cpu%200.06%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D0.06%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%201))%3B%20then%20%23%201%25%20of%20the%20next%20core%20(up%20to%202%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-1))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3C%3D%202))%3B%20then%20%23%200.5%25%20of%20the%20next%202%20cores%20(up%20to%204%20cores)%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.005%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D0%0A%20%20%20%20else%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%200.01%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20%20%20%20%20total_cpu%3D%24((total_cpu-2))%0A%20%20%20%20fi%0A%20%20%20%20if%20((%24total_cpu%20%3E%3D%200))%3B%20then%20%23%200.25%25%20of%20any%20cores%20above%204%20cores%0A%20%20%20%20%20%20%20%20recommended_systemreserved_cpu%3D%24(echo%20%24recommended_systemreserved_cpu%20%24(echo%20%24total_cpu%200.0025%20%7C%20awk%20'%7Bprint%20%241%20*%20%242%7D')%20%7C%20awk%20'%7Bprint%20%241%20%2B%20%242%7D')%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%24%7Brecommended_systemreserved_cpu%7D%22%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0Afunction%20dynamic_ephemeral_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_pid_sizing%20%7B%0A%20%20%20%20echo%20%22Not%20implemented%20yet%22%0A%7D%0Afunction%20dynamic_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20dynamic_memory_sizing%0A%20%20%20%20dynamic_cpu_sizing%0A%20%20%20%20%23dynamic_ephemeral_sizing%0A%20%20%20%20%23dynamic_pid_sizing%0A%7D%0Afunction%20static_node_sizing%20%7B%0A%20%20%20%20rm%20-f%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_MEMORY%3D%241%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%20%20%20%20echo%20%22SYSTEM_RESERVED_CPU%3D%242%22%20%3E%3E%20%24%7BNODE_SIZES_ENV%7D%0A%7D%0A%0Aif%20%5B%20%241%20%3D%3D%20%22true%22%20%5D%3B%20then%0A%20%20%20%20dynamic_node_sizing%0Aelif%20%5B%20%241%20%3D%3D%20%22false%22%20%5D%3B%20then%0A%20%20%20%20static_node_sizing%20%242%20%243%0Aelse%0A%20%20%20%20echo%20%22Unrecongnized%20command%20line%20option.%20Valid%20options%20are%20%5C%22true%5C%22%20or%20%5C%22false%5C%22%22%0Afi%0A
mode: 493
overwrite: true
path: /usr/local/sbin/dynamic-system-reserved-calc.sh
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AKUBE%20API%20SERVER%20SERVING%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet-ca.crt
- contents:
source: data:,%23%20Turning%20on%20Accounting%20helps%20track%20down%20performance%20issues.%0A%5BManager%5D%0ADefaultCPUAccounting%3Dyes%0ADefaultMemoryAccounting%3Dyes%0ADefaultBlockIOAccounting%3Dyes%0A
mode: 420
overwrite: true
path: /etc/systemd/system.conf.d/kubelet-cgroups.conf
- contents:
source: data:,%5BService%5D%0AEnvironment%3D%22KUBELET_LOG_LEVEL%3D2%22%0A
mode: 420
overwrite: true
path: /etc/systemd/system/kubelet.service.d/20-logging.conf
- contents:
source: data:,%23%20ignore%20known%20SDN-managed%20devices%0A%5Bdevice%5D%0Amatch-device%3Dinterface-name%3Abr-int%3Binterface-name%3Abr-local%3Binterface-name%3Abr-nexthop%2Cinterface-name%3Aovn-k8s-*%2Cinterface-name%3Ak8s-*%3Binterface-name%3Atun0%3Binterface-name%3Abr0%3Bdriver%3Aveth%0Amanaged%3D0%0A
mode: 420
overwrite: true
path: /etc/NetworkManager/conf.d/sdn.conf
- contents:
source: data:,D%20%2Frun%2Fnm-system-connections%200755%20root%20root%20-%20-%0AD%20%2Frun%2Fnm-system-connections-work%200755%20root%20root%20-%20-%0Ad%20%2Fetc%2FNetworkManager%2FsystemConnectionsMerged%200755%20root%20root%20-%20-%0A
mode: 420
overwrite: true
path: /etc/tmpfiles.d/nm.conf
- contents:
source: data:,%7B%22auths%22%3A%7B%22example.com%22%3A%7B%22auth%22%3A%22MCC-PULL-SECRET%22%7D%7D%7D%0A
mode: 384
overwrite: true
path: /var/lib/kubelet/config.json
- contents:
source: data:,-----BEGIN%20CERTIFICATE-----%0AROOT%20CA%20DATA%0A-----END%20CERTIFICATE-----%0A
mode: 420
overwrite: true
path: /etc/kubernetes/ca.crt
- contents:
source: data:,%23%20disable%20key%20lookup%20from%20~%2F.ssh%2Fauthorized_keys.d%2F%20on%20FCOS%0AAuthorizedKeysCommand%20none%0A
mode: 420
overwrite: true
path: /etc/ssh/sshd_config.d/10-disable-ssh-key-dir.conf
- contents:
source: data:,net.ipv4.ip_forward%20%3D%201%0Anet.ipv6.conf.all.forwarding%20%3D%201%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/forward.conf
- contents:
source: data:,%0Afs.inotify.max_user_watches%20%3D%2065536%0Afs.inotify.max_user_instances%20%3D%208192%0A
mode: 420
overwrite: true
path: /etc/sysctl.d/inotify.conf
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20First%2C%20we%20need%20to%20wait%20until%20DHCP%20finishes%20and%20the%20node%20has%20a%20non-%60localhost%60%0A%23%20hostname%20before%20%60kubelet.service%60%20starts.%0A%23%20That's%20the%20%60--wait%60%20argument%20as%20used%20by%20%60node-valid-hostname.service%60.%0A%23%0A%23%20Second%2C%20on%20GCP%20specifically%20we%20truncate%20the%20hostname%20if%20it's%20%3E63%20characters.%0A%23%20That's%20%60gcp-hostname.service%60.%0A%0A%23%20Block%20indefinitely%20until%20the%20host%20gets%20a%20non-localhost%20name.%0A%23%20Note%20node-valid-hostname.service%20uses%20systemd%20to%20abort%20if%20this%20takes%20too%20long.%0Await_localhost()%20%7B%0A%20%20%20%20echo%20%22waiting%20for%20non-localhost%20hostname%20to%20be%20assigned%22%0A%20%20%20%20while%20%5B%5B%20%22%24(%3C%20%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%20%3D~%20(localhost%7Clocalhost.localdomain)%20%5D%5D%3B%0A%20%20%20%20do%0A%20%20%20%20%20%20%20%20sleep%201%0A%20%20%20%20done%0A%20%20%20%20echo%20%22node%20identified%20as%20%24(%3C%2Fproc%2Fsys%2Fkernel%2Fhostname)%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_aws_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20aws%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%0A%20%20%20%20echo%20%22setting%20transient%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20--transient%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aset_gcp_hostname()%20%7B%0A%20%20%20%20%2Fusr%2Fbin%2Fafterburn%20--provider%20gcp%20--hostname%3D%2Frun%2Fafterburn.hostname%0A%0A%20%20%20%20local%20host_name%3D%24(cat%20%2Frun%2Fafterburn.hostname)%0A%20%20%20%20local%20type_arg%3D%22transient%22%0A%0A%20%20%20%20%23%20%2Fetc%2Fhostname%20is%20used%20for%20static%20hostnames%20and%20is%20authoritative.%0A%20%20%20%20%23%20This%20will%20check%20to%20make%20sure%20that%20the%20static%20hostname%20is%20the%0A%20%20%20%20%23%20less%20than%20or%20equal%20to%2063%20characters%20in%20length.%0A%20%20%20%20if%20%5B%20-f%20%2Fetc%2Fhostname%20%5D%20%26%26%20%5B%20%22%24(cat%20%2Fetc%2Fhostname%20%7C%20wc%20-m)%22%20-gt%200%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20etc_name%3D%22%24(%3C%20%2Fetc%2Fhostname)%22%0A%20%20%20%20%20%20%20%20type_arg%3D%22static%22%0A%20%20%20%20%20%20%20%20if%20%5B%20%22%24%7Betc_name%7D%22%20!%3D%20%22%24%7Bhost_name%7D%22%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22%2Fetc%2Fhostname%20is%20set%20to%20%24%7Betc_name%7D%20but%20does%20not%20match%20%24%7Bhost_name%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20echo%20%22using%20%2Fetc%2Fhostname%20as%20the%20authoritative%20name%22%0A%20%20%20%20%20%20%20%20%20%20%20%20host_name%3D%22%24%7Betc_name%7D%22%0A%20%20%20%20%20%20%20%20fi%0A%20%20%20%20fi%0A%0A%20%20%20%20%23%20Only%20mutate%20the%20hostname%20if%20the%20length%20is%20longer%20than%2063%20characters.%20The%0A%20%20%20%20%23%20hostname%20will%20be%20the%20lesser%20of%2063%20characters%20after%20the%20first%20dot%20in%20the%0A%20%20%20%20%23%20FQDN.%20%20This%20algorithm%20is%20only%20known%20to%20work%20in%20GCP%2C%20and%20hence%20is%20only%0A%20%20%20%20%23%20executed%20in%20GCP.%0A%20%20%20%20if%20%5B%20%22%24%7B%23host_name%7D%22%20-gt%2063%20%5D%3B%20then%0A%20%20%20%20%20%20%20%20alt_name%3D%24(printf%20%22%24%7Bhost_name%7D%22%20%7C%20cut%20-f1%20-d'.'%20%7C%20cut%20-c%20-63)%0A%20%20%20%20%20%20%20%20echo%20%22%24%7Bhost_name%7D%20is%20longer%20than%2063%20characters%2C%20using%20truncated%20hostname%22%0A%20%20%20%20%20%20%20%20host_name%3D%22%24%7Balt_name%7D%22%0A%20%20%20%20fi%0A%20%20%20%20echo%20%22setting%20%24%7Btype_arg%7D%20hostname%20to%20%24%7Bhost_name%7D%22%0A%20%20%20%20%2Fbin%2Fhostnamectl%20%22--%24%7Btype_arg%7D%22%20set-hostname%20%22%24%7Bhost_name%7D%22%0A%20%20%20%20exit%200%0A%7D%0A%0Aarg%3D%24%7B1%7D%3B%20shift%3B%0Acase%20%22%24%7Barg%7D%22%20in%0A%20%20%20%20--wait)%20wait_localhost%3B%3B%0A%20%20%20%20--gcp)%20set_gcp_hostname%3B%3B%0A%20%20%20%20--aws)%20set_aws_hostname%3B%3B%0A%20%20%20%20*)%20echo%20%22Unhandled%20arg%20%24arg%22%3B%20exit%201%0Aesac%0A
mode: 493
overwrite: true
path: /usr/local/bin/mco-hostname
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%0Aset%20-eou%20pipefail%0A%0A%23%20context%0Aintapi%3D%24(oc%20get%20infrastructures.config.openshift.io%20cluster%20-o%20%22jsonpath%3D%7B.status.apiServerInternalURI%7D%22)%0Acontext%3D%22%24(oc%20config%20current-context)%22%0A%23%20cluster%0Acluster%3D%22%24(oc%20config%20view%20-o%20%22jsonpath%3D%7B.contexts%5B%3F(%40.name%3D%3D%5C%22%24context%5C%22)%5D.context.cluster%7D%22)%22%0Aserver%3D%22%24(oc%20config%20view%20-o%20%22jsonpath%3D%7B.clusters%5B%3F(%40.name%3D%3D%5C%22%24cluster%5C%22)%5D.cluster.server%7D%22)%22%0A%23%20token%0Aca_crt_data%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20-o%20%22jsonpath%3D%7B.data.ca%5C.crt%7D%22%20%7C%20base64%20--decode)%22%0Anamespace%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20%20-o%20%22jsonpath%3D%7B.data.namespace%7D%22%20%7C%20base64%20--decode)%22%0Atoken%3D%22%24(oc%20get%20secret%20-n%20openshift-machine-config-operator%20node-bootstrapper-token%20-o%20%22jsonpath%3D%7B.data.token%7D%22%20%7C%20base64%20--decode)%22%0A%0Aexport%20KUBECONFIG%3D%22%24(mktemp)%22%0Akubectl%20config%20set-credentials%20%22kubelet%22%20--token%3D%22%24token%22%20%3E%2Fdev%2Fnull%0Aca_crt%3D%22%24(mktemp)%22%3B%20echo%20%22%24ca_crt_data%22%20%3E%20%24ca_crt%0Akubectl%20config%20set-cluster%20%24cluster%20--server%3D%22%24intapi%22%20--certificate-authority%3D%22%24ca_crt%22%20--embed-certs%20%3E%2Fdev%2Fnull%0Akubectl%20config%20set-context%20kubelet%20--cluster%3D%22%24cluster%22%20--user%3D%22kubelet%22%20%3E%2Fdev%2Fnull%0Akubectl%20config%20use-context%20kubelet%20%3E%2Fdev%2Fnull%0Acat%20%22%24KUBECONFIG%22%0A
mode: 493
overwrite: true
path: /usr/local/bin/recover-kubeconfig.sh
- contents:
source: data:,
mode: 493
overwrite: true
path: /etc/kubernetes/kubelet-plugins/volume/exec/.dummy
- contents:
source: data:,%23!%2Fbin%2Fbash%0A%23%20Workaround%3A%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1941714%0A%23%20https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1935539%0A%0Adriver%3D%24(nmcli%20-t%20-m%20tabular%20-f%20general.driver%20dev%20show%20%22%24%7BDEVICE_IFACE%7D%22)%0A%0Aif%20%5B%5B%20%22%242%22%20%3D%3D%20%22up%22%20%26%26%20%22%24%7Bdriver%7D%22%20%3D%3D%20%22vmxnet3%22%20%5D%5D%3B%20then%0A%20%20logger%20-s%20%2299-vsphere-disable-tx-udp-tnl%20triggered%20by%20%24%7B2%7D%20on%20device%20%24%7BDEVICE_IFACE%7D.%22%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-segmentation%20off%0A%20%20ethtool%20-K%20%24%7BDEVICE_IFACE%7D%20tx-udp_tnl-csum-segmentation%20off%0Afi%0A
mode: 484
overwrite: true
path: /etc/NetworkManager/dispatcher.d/99-vsphere-disable-tx-udp-tnl
- contents:
source: data:text/plain,unqualified-search-registries%20%3D%20%5B%22registry.access.redhat.com%22%2C%20%22docker.io%22%5D%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22registry.product.example.org%2Focp%2Frelease%22%0A%20%20mirror-by-digest-only%20%3D%20true%0A%0A%20%20%5B%5Bregistry.mirror%5D%5D%0A%20%20%20%20location%20%3D%20%22registry.mirror.example.com%2Focp%22%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-1.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22insecure-reg-2.io%22%0A%20%20insecure%20%3D%20true%0A%0A%5B%5Bregistry%5D%5D%0A%20%20prefix%20%3D%20%22%22%0A%20%20location%20%3D%20%22blocked-reg.io%22%0A%20%20blocked%20%3D%20true%0A
mode: 420
overwrite: true
path: /etc/containers/registries.conf
- contents:
source: data:,%5Bcrio%5D%0Ainternal_wipe%20%3D%20true%0A%0A%5Bcrio.api%5D%0Astream_address%20%3D%20%22%22%0Astream_port%20%3D%20%2210010%22%0A%0A%5Bcrio.runtime%5D%0Aconmon%20%3D%20%22%2Fusr%2Flibexec%2Fcrio%2Fconmon%22%0Aconmon_cgroup%20%3D%20%22pod%22%0Adefault_env%20%3D%20%5B%0A%20%20%20%20%22NSS_SDB_USE_CACHE%3Dno%22%2C%0A%5D%0Alog_level%20%3D%20%22info%22%0Acgroup_manager%20%3D%20%22systemd%22%0Adefault_sysctls%20%3D%20%5B%0A%20%20%20%20%22net.ipv4.ping_group_range%3D0%202147483647%22%2C%0A%5D%0Ahooks_dir%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%20%20%20%20%22%2Frun%2Fcontainers%2Foci%2Fhooks.d%22%2C%0A%5D%0Amanage_ns_lifecycle%20%3D%20true%0Aabsent_mount_sources_to_reject%20%3D%20%5B%0A%20%20%20%20%22%2Fetc%2Fhostname%22%2C%0A%5D%0A%0A%5Bcrio.image%5D%0Aglobal_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_image%20%3D%20%22registry.product.example.org%2Focp%2F4.2-DATE-VERSION%40sha256%3Abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%22%0Apause_image_auth_file%20%3D%20%22%2Fvar%2Flib%2Fkubelet%2Fconfig.json%22%0Apause_command%20%3D%20%22%2Fusr%2Fbin%2Fpod%22%0A%0A%5Bcrio.network%5D%0Anetwork_dir%20%3D%20%22%2Fetc%2Fkubernetes%2Fcni%2Fnet.d%2F%22%0Aplugin_dirs%20%3D%20%5B%0A%20%20%20%20%22%2Fvar%2Flib%2Fcni%2Fbin%22%2C%0A%20%20%20%20%22%2Fusr%2Flibexec%2Fcni%22%2C%0A%5D%0A%0A%5Bcrio.metrics%5D%0Aenable_metrics%20%3D%20true%0Ametrics_port%20%3D%209537%0A
mode: 420
overwrite: true
path: /etc/crio/crio.conf.d/00-default
- contents:
source: data:text/plain,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22atomic%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker%22%3A%7B%22blocked-reg.io%22%3A%5B%7B%22type%22%3A%22reject%22%7D%5D%7D%2C%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
mode: 420
overwrite: true
path: /etc/containers/policy.json
- contents:
source: data:,
mode: 420
overwrite: true
path: /etc/kubernetes/cloud.conf
- contents:
source: data:text/plain,%7B%0A%20%20%22kind%22%3A%20%22KubeletConfiguration%22%2C%0A%20%20%22apiVersion%22%3A%20%22kubelet.config.k8s.io%2Fv1beta1%22%2C%0A%20%20%22staticPodPath%22%3A%20%22%2Fetc%2Fkubernetes%2Fmanifests%22%2C%0A%20%20%22syncFrequency%22%3A%20%220s%22%2C%0A%20%20%22fileCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22httpCheckFrequency%22%3A%20%220s%22%2C%0A%20%20%22tlsCipherSuites%22%3A%20%5B%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384%22%2C%0A%20%20%20%20%22TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256%22%2C%0A%20%20%20%20%22TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256%22%0A%20%20%5D%2C%0A%20%20%22tlsMinVersion%22%3A%20%22VersionTLS12%22%2C%0A%20%20%22rotateCertificates%22%3A%20true%2C%0A%20%20%22serverTLSBootstrap%22%3A%20true%2C%0A%20%20%22authentication%22%3A%20%7B%0A%20%20%20%20%22x509%22%3A%20%7B%0A%20%20%20%20%20%20%22clientCAFile%22%3A%20%22%2Fetc%2Fkubernetes%2Fkubelet-ca.crt%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22anonymous%22%3A%20%7B%0A%20%20%20%20%20%20%22enabled%22%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22authorization%22%3A%20%7B%0A%20%20%20%20%22webhook%22%3A%20%7B%0A%20%20%20%20%20%20%22cacheAuthorizedTTL%22%3A%20%220s%22%2C%0A%20%20%20%20%20%20%22cacheUnauthorizedTTL%22%3A%20%220s%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22clusterDomain%22%3A%20%22cluster.local%22%2C%0A%20%20%22clusterDNS%22%3A%20%5B%0A%20%20%20%20%22172.30.0.10%22%0A%20%20%5D%2C%0A%20%20%22streamingConnectionIdleTimeout%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusUpdateFrequency%22%3A%20%220s%22%2C%0A%20%20%22nodeStatusReportFrequency%22%3A%20%220s%22%2C%0A%20%20%22imageMinimumGCAge%22%3A%20%220s%22%2C%0A%20%20%22volumeStatsAggPeriod%22%3A%20%220s%22%2C%0A%20%20%22systemCgroups%22%3A%20%22%2Fsystem.slice%22%2C%0A%20%20%22cgroupRoot%22%3A%20%22%2F%22%2C%0A%20%20%22cgroupDriver%22%3A%20%22systemd%22%2C%0A%20%20%22cpuManagerReconcilePeriod%22%3A%20%220s%22%2C%0A%20%20%22runtimeRequestTimeout%22%3A%20%220s%22%2C%0A%20%20%22maxPods%22%3A%20250%2C%0A%20%20%22kubeAPIQPS%22%3A%2050%2C%0A%20%20%22kubeAPIBurst%22%3A%20100%2C%0A%20%20%22serializeImagePulls%22%3A%20false%2C%0A%20%20%22evictionPressureTransitionPeriod%22%3A%20%220s%22%2C%0A%20%20%22podsPerCore%22%3A%2010%2C%0A%20%20%22featureGates%22%3A%20%7B%0A%20%20%20%20%22APIPriorityAndFairness%22%3A%20true%2C%0A%20%20%20%20%22DownwardAPIHugePages%22%3A%20true%2C%0A%20%20%20%20%22LegacyNodeRoleBehavior%22%3A%20false%2C%0A%20%20%20%20%22NodeDisruptionExclusion%22%3A%20true%2C%0A%20%20%20%20%22RotateKubeletServerCertificate%22%3A%20true%2C%0A%20%20%20%20%22ServiceNodeExclusion%22%3A%20true%2C%0A%20%20%20%20%22SupportPodPidsLimit%22%3A%20true%0A%20%20%7D%2C%0A%20%20%22containerLogMaxSize%22%3A%20%2250Mi%22%2C%0A%20%20%22systemReserved%22%3A%20%7B%0A%20%20%20%20%22ephemeral-storage%22%3A%20%221Gi%22%0A%20%20%7D%2C%0A%20%20%22kubeReserved%22%3A%20%7B%0A%20%20%20%20%22cpu%22%3A%20%221000m%22%2C%0A%20%20%20%20%22memory%22%3A%20%22500Mi%22%0A%20%20%7D%2C%0A%20%20%22logging%22%3A%20%7B%7D%2C%0A%20%20%22shutdownGracePeriod%22%3A%20%220s%22%2C%0A%20%20%22shutdownGracePeriodCriticalPods%22%3A%20%220s%22%0A%7D%0A
mode: 420
overwrite: true
path: /etc/kubernetes/kubelet.conf
systemd:
units:
- dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="ENABLE_PROFILE_UNIX_SOCKET=true"
name: 10-mco-profile-unix-socket.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
name: crio.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: docker.socket
- contents: |
[Unit]
Description=Dynamically sets the system reserved for the kubelet
Wants=network-online.target
After=network-online.target ignition-firstboot-complete.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/node-sizing-enabled.env
ExecStart=/bin/bash /usr/local/sbin/dynamic-system-reserved-calc.sh ${NODE_SIZING_ENABLED} ${SYSTEM_RESERVED_MEMORY} ${SYSTEM_RESERVED_CPU}
[Install]
RequiredBy=kubelet.service
enabled: true
name: kubelet-auto-node-size.service
- contents: |
[Unit]
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target
Requires=crio.service kubelet-auto-node-size.service
After=network-online.target crio.service kubelet-auto-node-size.service
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
EnvironmentFile=/etc/node-sizing.env
ExecStart=/usr/bin/hyperkube \
kubelet \
--config=/etc/kubernetes/kubelet.conf \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_id=${ID} \
--node-ip=${KUBELET_NODE_IP} \
--minimum-container-ttl-duration=6m0s \
--cloud-provider= \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
\
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
--pod-infra-container-image=registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \
--system-reserved=cpu=${SYSTEM_RESERVED_CPU},memory=${SYSTEM_RESERVED_MEMORY} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
dropins:
- contents: ""
name: 10-mco-default-env.conf
- contents: |
[Service]
Environment="GODEBUG=x509ignoreCN=0,madvdontneed=1"
name: 10-mco-default-madv.conf
enabled: true
name: kubelet.service
- contents: |
[Unit]
Description=Machine Config Daemon Firstboot
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# Removal of this file signals firstboot completion
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
After=machine-config-daemon-pull.service
Before=crio.service kubelet.service
[Service]
Type=oneshot
RemainAfterExit=yes
# Disable existing repos (if any) so that OS extensions would use embedded RPMs only
ExecStartPre=-/usr/bin/sh -c "sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/*.repo"
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
enabled: true
name: machine-config-daemon-firstboot.service
- contents: |
[Unit]
Description=Machine Config Daemon Pull
# Make sure it runs only on OSTree booted system
ConditionPathExists=/run/ostree-booted
# This "stamp file" is unlinked when we complete
# machine-config-daemon-firstboot.service
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
# Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown
Wants=network-online.target crio-wipe.service
After=network-online.target crio-wipe.service
[Service]
Type=oneshot
RemainAfterExit=yes
# See https://github.com/coreos/fedora-coreos-tracker/issues/354
ExecStart=/bin/sh -c '/bin/mkdir -p /run/bin && chcon --reference=/usr/bin /run/bin'
ExecStart=/bin/sh -c "while ! /usr/bin/podman pull --authfile=/var/lib/kubelet/config.json --quiet '<no value>'; do sleep 1; done"
ExecStart=/bin/sh -c "/usr/bin/podman run --rm --quiet --net=host --entrypoint=cat '<no value>' /usr/bin/machine-config-daemon > /run/bin/machine-config-daemon.tmp"
ExecStart=/bin/sh -c '/usr/bin/chmod a+x /run/bin/machine-config-daemon.tmp && mv /run/bin/machine-config-daemon.tmp /run/bin/machine-config-daemon'
[Install]
RequiredBy=machine-config-daemon-firstboot.service
enabled: true
name: machine-config-daemon-pull.service
- contents: |
[Unit]
Before=NetworkManager.service
After=systemd-tmpfiles-setup.service
[Mount]
Where=/etc/NetworkManager/systemConnectionsMerged
What=overlay
Type=overlay
Options=lowerdir=/etc/NetworkManager/system-connections,upperdir=/run/nm-system-connections,workdir=/run/nm-system-connections-work
[Install]
WantedBy=multi-user.target
enabled: true
name: etc-NetworkManager-systemConnectionsMerged.mount
- contents: |
[Unit]
Description=Wait for a non-localhost hostname
Before=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
User=root
ExecStart=/usr/local/bin/mco-hostname --wait
# Wait up to 5min for the node to get a non-localhost name
TimeoutSec=300
[Install]
WantedBy=multi-user.target
# Ensure that network-online.target will not complete until the node has a non-localhost hostname.
pick 118ad16c Add feature gate exclusion list to kubelet config
RequiredBy=network-online.target
enabled: true
name: node-valid-hostname.service
- contents: |
[Unit]
Description=Writes IP address configuration so that kubelet and crio services select a valid node IP
Wants=network-online.target crio-wipe.service
After=network-online.target ignition-firstboot-complete.service crio-wipe.service
Before=kubelet.service crio.service
[Service]
# Need oneshot to delay kubelet
Type=oneshot
# Would prefer to do Restart=on-failure instead of this bash retry loop, but
# the version of systemd we have right now doesn't support it. It should be
# available in systemd v244 and higher.
ExecStart=/bin/bash -c " \
until \
/usr/bin/podman run --rm \
--authfile /var/lib/kubelet/config.json \
--net=host \
--volume /etc/systemd/system:/etc/systemd/system:z \
\
node-ip \
set \
--retry-on-failure; \
do \
sleep 5; \
done"
ExecStart=/bin/systemctl daemon-reload
[Install]
RequiredBy=kubelet.service
enabled: true
name: nodeip-configuration.service
- enabled: false
name: openvswitch.service
- contents: "[Unit]\nDescription=Configures OVS with proper host networking
configuration\n# Removal of this file signals firstboot completion\nConditionPathExists=!/etc/ignition-machine-config-encapsulated.json\n#
This service is used to move a physical NIC into OVS and reconfigure OVS
to use the host IP\nRequires=openvswitch.service\nWants=NetworkManager-wait-online.service\nAfter=NetworkManager-wait-online.service
openvswitch.service network.service\nBefore=network-online.target kubelet.service
crio.service node-valid-hostname.service\n\n[Service]\n# Need oneshot to
delay kubelet\nType=oneshot\nExecStart=/usr/local/bin/configure-ovs.sh \nStandardOutput=journal+console\nStandardError=journal+console\n\n[Install]\nWantedBy=network-online.target\n"
enabled: false
name: ovs-configuration.service
- dropins:
Add controller runtime to vendor directory
- contents: |
[Service]
Restart=always
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'
name: 10-ovs-vswitchd-restart.conf
name: ovs-vswitchd.service
- dropins:
- contents: |
[Service]
Restart=always
name: 10-ovsdb-restart.conf
enabled: false
name: ovsdb-server.service
- dropins:
- contents: ""
name: 10-mco-default-env.conf
name: pivot.service
- dropins:
- contents: |
# See https://github.com/openshift/machine-config-operator/issues/1897
[Service]
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=6
name: mco-controlplane-nice.conf
name: rpm-ostreed.service
- dropins:
- contents: |
[Unit]
ConditionPathExists=/enoent
name: mco-disabled.conf
name: zincati.service
extensions: []
fips: false
kernelArguments: []
kernelType: default
osImageURL: registry.product.example.org/ocp/4.2-DATE-VERSION@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
bootstrap_test.go:238: Bootstrap rendered worker config as "rendered-worker-92669da3617db49bd2b2a1cc8fa22302"
--- FAIL: TestE2EBootstrap (57.73s)
--- PASS: TestE2EBootstrap/With_no_additional_manifests (7.76s)
--- PASS: TestE2EBootstrap/With_a_featuregate_manifest (7.71s)
--- FAIL: TestE2EBootstrap/With_a_featuregate_manifest_and_master_kubelet_config_manifest (14.11s)
--- FAIL: TestE2EBootstrap/With_a_worker_kubelet_config_manifest (13.93s)
FAIL
FAIL github.com/openshift/machine-config-operator/test/e2e-bootstrap 58.379s
FAIL
make: *** [bootstrap-e2e-local] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment