Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-19303: Changed OKD/FCOS workaround to also support Agent-based Installer #7484

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

JM1
Copy link
Contributor

@JM1 JM1 commented Sep 13, 2023

OKD/FCOS uses FCOS as its bootimage, i.e. when booting cluster nodes the first time during installation. FCOS does not provide tools such as OpenShift Client (oc) or crio.service which Agent-based Installer uses at the rendezvous host, e.g. to launch the bootstrap control plane.

RHCOS and SCOS include these tools, but FCOS has to pivot the root fs to okd-machine-os first in order to make those tools available.

Pivoting uses 'rpm-ostree rebase' but the rendezvous host is booted the first time the node boots from a FCOS Live ISO where the root fs and /sysroot are mounted read-only. Thus 'rpm-ostree rebase' fails and necessary tools will not be available, causing the setup to stall.

Until rpm-ostree has implemented support for rebasing Live ISOs, this patch adapts the workaround for SNO installations to also support Agent-based Installer.

In particular, the Go conditional {{- if .BootstrapInPlace }} which is used to mark a SNO install has been replaced with a shell if-else which checks at runtime whether the system is launched from are on a Live ISO. Most code in the OpenShift ecosystem is written with RHCOS in mind and often assumes that tools like oc or crio.service are available. These assumptions can be satisfied by applying this workaround to all Live ISO boots. It will not remove functionality or overwrite configuration files in /etc and thus side effects should be minimal.

The Go conditional {{- if .BootstrapInPlace }} in the release-image-pivot.service has been dropped completely. This service is only used in OKD only, so OCP will not be impacted at all. The 'Before=' option will not cause systemd to fail if a service does not exist. So, in case bootkube.service or kubelet.service do not exist, the option will have no effect. When bootkube.service or kubelet.service do exist, it must always be ensured that release-image-pivot.service is started first because it might reboot the system or change /usr in the Live ISO use case. So it is safe to drop the Go conditional and ask systemd to always launch release-image-pivot.service before bootkube.service and kubelet.service.

@JM1
Copy link
Contributor Author

JM1 commented Sep 13, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 13, 2023

/test okd-e2e-agent-sno-ipv6

1 similar comment
@JM1
Copy link
Contributor Author

JM1 commented Sep 14, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 14, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 14, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 14, 2023

/test okd-e2e-agent-sno-ipv6

@@ -41,26 +42,28 @@ if [ ! -f /opt/openshift/.pivot-done ]; then

record_service_stage_start "rebase-to-okd-os-image"
{{if .IsFCOS -}}
# get more space because 7.8gb is not enough
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this due openshift-metal3/dev-scripts#1542? Sometimes ago we were affected by https://issues.redhat.com/browse/OCPBUGS-8036, but then it was fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The increased space is required because container images could not be pulled due to insufficient storage and because i copy (rsync) all files from the machine os image to a podman volume (which had to do because the podman image would be "unmounted" at one point, quasi-erasing /usr)

@JM1
Copy link
Contributor Author

JM1 commented Sep 15, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 15, 2023

/test okd-e2e-agent-sno-ipv6

2 similar comments
@JM1
Copy link
Contributor Author

JM1 commented Sep 15, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 16, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 16, 2023

/test okd-e2e-agent-sno-ipv6

@JM1 JM1 force-pushed the okd-skip-gatewayd branch 2 times, most recently from e9e1887 to f7e27e5 Compare September 17, 2023 08:34
@JM1
Copy link
Contributor Author

JM1 commented Sep 17, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 17, 2023

/test okd-e2e-agent-compact-ipv4

@JM1
Copy link
Contributor Author

JM1 commented Sep 17, 2023

/test okd-e2e-agent-sno-ipv6

@JM1
Copy link
Contributor Author

JM1 commented Sep 17, 2023

/test okd-e2e-agent-sno-ipv6

@JM1 JM1 changed the title [DNM][DRAFT] Agent-based Installer test for OKD/FCOS [DNM][DRAFT] OCPBUGS-19303: Agent-based Installer test for OKD/FCOS Sep 18, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 18, 2023
@andfasano
Copy link
Contributor

/test okd-e2e-agent-compact-ipv4
/test okd-e2e-agent-sno-ipv6
/test okd-e2e-agent-ha-dualstack

@aleskandro
Copy link
Member

/test okd-e2e-agent-compact-ipv4

@andfasano
Copy link
Contributor

/test okd-e2e-agent-compact-ipv4
/test okd-e2e-agent-sno-ipv6

@andfasano
Copy link
Contributor

Retrying, since openshift/okd-machine-os#706 landed

/test okd-e2e-agent-compact-ipv4
/test okd-e2e-agent-sno-ipv6
/test okd-e2e-agent-ha-dualstack

@LorbusChris
Copy link
Member

We'll have to fix the Samples Operator first: openshift/cluster-samples-operator#525

@andfasano
Copy link
Contributor

/test okd-e2e-agent-compact-ipv4
/test okd-e2e-agent-sno-ipv6
/test okd-e2e-agent-ha-dualstack

@JM1
Copy link
Contributor Author

JM1 commented Dec 6, 2023

Do you believe that? okd-e2e-agent-compact-ipv4 and okd-e2e-agent-ha-dualstack have passed 😱

@LorbusChris
Copy link
Member

/test okd-e2e-aws-ovn
/test okd-scos-e2e-aws-ovn

@andfasano
Copy link
Contributor

/test okd-e2e-agent-sno-ipv6

1 similar comment
@andfasano
Copy link
Contributor

/test okd-e2e-agent-sno-ipv6

@LorbusChris
Copy link
Member

/test okd-e2e-aws-ovn
/test okd-scos-e2e-aws-ovn
/test okd-e2e-agent-sno-ipv6
/test okd-e2e-aws-ovn-upgrade

@LorbusChris
Copy link
Member

/test e2e-aws-ovn

@JM1
Copy link
Contributor Author

JM1 commented Dec 8, 2023

Both jobs okd-e2e-aws-ovn-upgrade and okd-e2e-aws-ovn complete deployment successfully, then run and pass e2e tests. Still they fail because some step is running into a timeout, but which one?!?

Job okd-e2e-agent-sno-ipv6 still fails for unknown reasons. It lacks logs to debug it properly.

@LorbusChris
Copy link
Member

/test okd-e2e-aws-ovn

@JM1
Copy link
Contributor Author

JM1 commented Dec 11, 2023

/test okd-e2e-agent-sno-ipv6

1 similar comment
@JM1
Copy link
Contributor Author

JM1 commented Dec 11, 2023

/test okd-e2e-agent-sno-ipv6

@andfasano
Copy link
Contributor

/test okd-e2e-agent-compact-ipv4
/test okd-e2e-agent-sno-ipv6
/test okd-e2e-agent-ha-dualstack

@andfasano
Copy link
Contributor

/test okd-e2e-agent-sno-ipv6

1 similar comment
@andfasano
Copy link
Contributor

/test okd-e2e-agent-sno-ipv6

Copy link
Contributor

openshift-ci bot commented Dec 12, 2023

@JM1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-sdn-swapped-hosts 01434e9 link false /test e2e-metal-ipi-sdn-swapped-hosts
ci/prow/e2e-metal-ipi-sdn-virtualmedia 01434e9 link false /test e2e-metal-ipi-sdn-virtualmedia
ci/prow/e2e-metal-ipi-sdn 01434e9 link false /test e2e-metal-ipi-sdn
ci/prow/e2e-metal-assisted 01434e9 link false /test e2e-metal-assisted
ci/prow/e2e-metal-single-node-live-iso 01434e9 link false /test e2e-metal-single-node-live-iso
ci/prow/e2e-metal-ipi-ovn-dualstack 01434e9 link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/okd-e2e-aws-ovn b2bbc85 link false /test okd-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@andfasano
Copy link
Contributor

Looks like we got a pretty solid green runs also on agent okd sno jobs!

/lgtm

@andfasano
Copy link
Contributor

/retest-required

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 656ceea into openshift:master Dec 12, 2023
25 checks passed
@openshift-ci-robot
Copy link
Contributor

@JM1: Jira Issue OCPBUGS-19303: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-19303 has been moved to the MODIFIED state.

In response to this:

OKD/FCOS uses FCOS as its bootimage, i.e. when booting cluster nodes the first time during installation. FCOS does not provide tools such as OpenShift Client (oc) or crio.service which Agent-based Installer uses at the rendezvous host, e.g. to launch the bootstrap control plane.

RHCOS and SCOS include these tools, but FCOS has to pivot the root fs to okd-machine-os first in order to make those tools available.

Pivoting uses 'rpm-ostree rebase' but the rendezvous host is booted the first time the node boots from a FCOS Live ISO where the root fs and /sysroot are mounted read-only. Thus 'rpm-ostree rebase' fails and necessary tools will not be available, causing the setup to stall.

Until rpm-ostree has implemented support for rebasing Live ISOs, this patch adapts the workaround for SNO installations to also support Agent-based Installer.

In particular, the Go conditional {{- if .BootstrapInPlace }} which is used to mark a SNO install has been replaced with a shell if-else which checks at runtime whether the system is launched from are on a Live ISO. Most code in the OpenShift ecosystem is written with RHCOS in mind and often assumes that tools like oc or crio.service are available. These assumptions can be satisfied by applying this workaround to all Live ISO boots. It will not remove functionality or overwrite configuration files in /etc and thus side effects should be minimal.

The Go conditional {{- if .BootstrapInPlace }} in the release-image-pivot.service has been dropped completely. This service is only used in OKD only, so OCP will not be impacted at all. The 'Before=' option will not cause systemd to fail if a service does not exist. So, in case bootkube.service or kubelet.service do not exist, the option will have no effect. When bootkube.service or kubelet.service do exist, it must always be ensured that release-image-pivot.service is started first because it might reboot the system or change /usr in the Live ISO use case. So it is safe to drop the Go conditional and ask systemd to always launch release-image-pivot.service before bootkube.service and kubelet.service.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@LorbusChris
Copy link
Member

/cherrypick release-4.15

@openshift-cherrypick-robot

@LorbusChris: new pull request created: #7830

In response to this:

/cherrypick release-4.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants