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-41829: openstack: dynamically mount the config-drive #1004

Closed
wants to merge 1 commit into from

Conversation

EmilienM
Copy link
Member

When we want to use config-drive in immutable systems, very often the
config-drive is only used at boot and then umounted (e.g. ignition does
this).

Later when we want to fetch Metadata from the config drive, we actually
have to mount it.

In this PR, I'm adding similar code than coreos/ignition where we
dynamically mount the config-drive is the device was found with the
right label (config-2 or CONFIG-2 as documented in OpenStack). If the
device is found, we mount it, fetch the data and umount it.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 12, 2024
@openshift-ci-robot
Copy link
Contributor

@EmilienM: This pull request references Jira Issue OCPBUGS-41829, which is invalid:

  • expected the bug to target the "4.18.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

When we want to use config-drive in immutable systems, very often the
config-drive is only used at boot and then umounted (e.g. ignition does
this).

Later when we want to fetch Metadata from the config drive, we actually
have to mount it.

In this PR, I'm adding similar code than coreos/ignition where we
dynamically mount the config-drive is the device was found with the
right label (config-2 or CONFIG-2 as documented in OpenStack). If the
device is found, we mount it, fetch the data and umount it.

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 openshift-eng/jira-lifecycle-plugin repository.

@EmilienM
Copy link
Member Author

EmilienM commented Sep 12, 2024

/hold
the upstream PR hasn't merged yet. I'm using that manual backport to run our CI job.

I want to see the outcome for e2e-openstack-nfv-config-drive.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 12, 2024
Copy link
Contributor

openshift-ci bot commented Sep 12, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: EmilienM
Once this PR has been reviewed and has the lgtm label, please assign zshi-redhat for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@EmilienM
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 12, 2024
@openshift-ci-robot
Copy link
Contributor

@EmilienM: This pull request references Jira Issue OCPBUGS-41829, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@EmilienM
Copy link
Member Author

It looks like it didn't work as expected:

2024-09-12T14:46:44.698567851Z	INFO	daemon/writer.go:59	getCheckPointNodeState()
2024-09-12T14:46:44.698600431Z	INFO	daemon/writer.go:65	CreateOpenstackDevicesInfo()
2024-09-12T14:46:44.698609192Z	INFO	openstack/openstack.go:114	reading OpenStack meta_data from config-drive
2024-09-12T14:46:44.701726268Z	INFO	openstack/openstack.go:116	getting OpenStack meta_data from metadata server
2024/09/12 14:46:44 [DEBUG] GET http://169.254.169.254/openstack/2018-08-27/meta_data.json
2024-09-12T14:46:44.860127011Z	INFO	openstack/openstack.go:116	getting OpenStack network_data from metadata server
2024/09/12 14:46:44 [DEBUG] GET http://169.254.169.254/openstack/2018-08-27/network_data.json

https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_sriov-network-operator/1004/pull-ci-openshift-sriov-network-operator-master-e2e-openstack-nfv-config-drive/1834211009112313856/artifacts/e2e-openstack-nfv-config-drive/gather-extra/artifacts/pods/openshift-sriov-network-operator_sriov-network-config-daemon-dwkwl_sriov-network-config-daemon.log

@EmilienM
Copy link
Member Author

This time it read the config drive, but the job failed when creating the SRIOV network policy. I'll retest the job.

2024-09-12T22:31:21.02913626Z	INFO	daemon/writer.go:65	CreateOpenstackDevicesInfo()
2024-09-12T22:31:21.029146361Z	INFO	openstack/openstack.go:118	reading OpenStack meta_data from config-drive
2024-09-12T22:31:21.057448323Z	INFO	openstack/openstack.go:225	found config drive device	{"device": "/dev/sr0"}
2024-09-12T22:31:21.065428364Z	INFO	openstack/openstack.go:229	mounted config drive %s into %s	{"/dev/sr0": "/tmp/sriov-configdrive2821721804"}
2024-09-12T22:31:21.066344839Z	INFO	openstack/openstack.go:118	reading OpenStack network_data from config-drive
2024-09-12T22:31:21.079312593Z	INFO	openstack/openstack.go:234	umounted config drive	{"path": "/tmp/sriov-configdrive2821721804"}

Note that with metadata it worked fine on the other job:

2024-09-12T22:29:03.387109403Z	INFO	daemon/writer.go:65	CreateOpenstackDevicesInfo()
2024-09-12T22:29:03.387118413Z	INFO	openstack/openstack.go:118	reading OpenStack meta_data from config-drive
2024-09-12T22:29:03.406026696Z	ERROR	openstack/openstack.go:340	GetOpenStackData(): non-fatal error getting OpenStack data from config drive	{"error": "error finding config drive device: unable to run blkid: exit status 2"}
2024-09-12T22:29:03.406055927Z	INFO	openstack/openstack.go:121	getting OpenStack meta_data from metadata server
2024/09/12 22:29:03 [DEBUG] GET http://169.254.169.254/openstack/2018-08-27/meta_data.json
2024-09-12T22:29:04.14953728Z	INFO	openstack/openstack.go:121	getting OpenStack network_data from metadata server
2024/09/12 22:29:04 [DEBUG] GET http://169.254.169.254/openstack/2018-08-27/network_data.json

So there is no regression with this PR.

/test e2e-openstack-nfv-config-drive

@EmilienM
Copy link
Member Author

/cc MaysaMacedo MiguelCarpio mandre

When we want to use config-drive in immutable systems, very often the
config-drive is only used at boot and then umounted (e.g. ignition does
this).

Later when we want to fetch Metadata from the config drive, we actually
have to mount it.

In this PR, I'm adding similar code than coreos/ignition where we
dynamically mount the config-drive is the device was found with the
right label (config-2 as documented in OpenStack). If the
device is found, we mount it, fetch the data and umount it.
@EmilienM
Copy link
Member Author

/test e2e-openstack-nfv-config-drive

@EmilienM
Copy link
Member Author

/test e2e-openstack-nfv e2e-openstack-nfv-config-drive

@EmilienM
Copy link
Member Author

/test e2e-openstack-nfv
/test e2e-openstack-nfv-config-drive

Copy link
Contributor

openshift-ci bot commented Sep 16, 2024

@EmilienM: The following test 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-openstack-nfv-hwoffload b9d15c8 link false /test e2e-openstack-nfv-hwoffload

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-sigs/prow repository. I understand the commands that are listed here.

@EmilienM
Copy link
Member Author

/test e2e-openstack-nfv

@EmilienM EmilienM closed this Sep 26, 2024
@openshift-ci-robot
Copy link
Contributor

@EmilienM: This pull request references Jira Issue OCPBUGS-41829. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

In response to this:

When we want to use config-drive in immutable systems, very often the
config-drive is only used at boot and then umounted (e.g. ignition does
this).

Later when we want to fetch Metadata from the config drive, we actually
have to mount it.

In this PR, I'm adding similar code than coreos/ignition where we
dynamically mount the config-drive is the device was found with the
right label (config-2 or CONFIG-2 as documented in OpenStack). If the
device is found, we mount it, fetch the data and umount it.

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 openshift-eng/jira-lifecycle-plugin repository.

@EmilienM
Copy link
Member Author

i'm happy with the tests results, I'll wait for the upstream PR to merge and then wait for a downstream sync from SNO maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants