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

Don't hardcode device image file in unit template #1704

Merged
merged 1 commit into from
May 15, 2024

Conversation

cescgina
Copy link
Contributor

@cescgina cescgina commented May 15, 2024

The cifmw_block_device role creatas a systemd unit that harcodes the
device image file to user for ceph-osd-losetup. Instead it should use
the cifmw_block_device_image_file var, since that var will always point
to correct path for the file (as it has a default).

As a pull request owner and reviewers, I checked that:

  • Appropriate testing is done and actually running

The cifmw_block_device role creatas a systemd unit that harcodes the
device image file to user for ceph-osd-losetup. Instead it should use
the cifmw_block_device_image_file var, since that var will always point
to correct path for the file (as it has a default).
Copy link
Contributor

openshift-ci bot commented May 15, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cescgina cescgina marked this pull request as ready for review May 15, 2024 13:02
@cescgina cescgina requested a review from fultonj May 15, 2024 13:03
Copy link
Contributor

@fultonj fultonj left a comment

Choose a reason for hiding this comment

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

+2 Thank you for fixing this bug.

@@ -9,7 +9,7 @@ After=syslog.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/sbin/losetup {{ cifmw_block_device_loop }} || \
/sbin/losetup {{ cifmw_block_device_loop }} /var/lib/ceph-osd.img ; partprobe {{ cifmw_block_device_loop }}'
/sbin/losetup {{ cifmw_block_device_loop }} {{ cifmw_block_device_image_file }} ; partprobe {{ cifmw_block_device_loop }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we have the same default for this value and should use the variable in case someone overrides it.

https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/cifmw_block_device/defaults/main.yml#L21

@cjeanner
Copy link
Contributor

/approve

Copy link
Contributor

openshift-ci bot commented May 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cjeanner

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit 8c6a87e into main May 15, 2024
7 of 8 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the fix_block_device_unit_template branch May 15, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants