Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Added a container cache disk option. #149

Merged
merged 2 commits into from
Jul 9, 2021
Merged

Added a container cache disk option. #149

merged 2 commits into from
Jul 9, 2021

Conversation

rmkraus
Copy link
Member

@rmkraus rmkraus commented Jul 2, 2021

To improve performance, the container working directories should be
moved to a different drive than the etcd and os directories. An option
was added to the configuration to specify a drive to use for this
purpose.

This addresses #142.

To improve performance, the container working directories should be
moved to a different drive than the etcd and os directories. An option
was added to the configuration to specify a drive to use for this
purpose.

This addresses #142.
@rmkraus rmkraus requested a review from mulbc July 2, 2021 03:33
@rmkraus
Copy link
Member Author

rmkraus commented Jul 2, 2021

@mulbc Would you mind reviewing this?

Copy link
Member

@mulbc mulbc left a comment

Choose a reason for hiding this comment

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

it's ok to merge, just added some comments for consideration.

@@ -27,12 +27,26 @@
- "{{ openshift_installer_dir }}/install-config.yaml"
- "{{ openshift_installer_dir }}/install-config.yaml.bkp"

- name: create ignition files
- name: cleanup previous install artifacts
shell: >
Copy link
Member

Choose a reason for hiding this comment

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

You could consider doing this with the file module:

- name: my-state
  file:
    state: absent
    path: {item}
  with_items:
    - firstDir
    - secondDir

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 good call

version: 3.1.0
storage:
disks:
- device: /dev/{{ openshift_installer_cache_disk }}
Copy link
Member

Choose a reason for hiding this comment

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

I would intuitively set openshift_installer_cache_disk to /dev/sdb (or whatever disk) rather than sdb - so the full path to the disk...
That's why I wouldn't prepend /dev in this template

Copy link
Member Author

Choose a reason for hiding this comment

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

I almost did that, but there is another config option that asks for the disk to install the OS on. That option doesn't require a /dev prefix because the CoreOS kernel args don't allow the /dev prefix.

So I wanted to stay consistent with that.

- device: /dev/{{ openshift_installer_cache_disk }}
wipeTable: True
partitions:
- sizeMiB: 50000
Copy link
Member

Choose a reason for hiding this comment

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

Idea: use 50% of the disk size (gathered by ansible facts in ansible_devices) rather than 50GB statically?
What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ansible doesn't have any facts about the host at this time. This file is created before the host is created or powered on. I don't think there is a clean way to do that with ipmi/ilo either.

Changed a shell call to a file call.
@rmkraus rmkraus merged commit 5b3247a into master Jul 9, 2021
@rmkraus rmkraus deleted the 142-container-cache branch July 9, 2021 02:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants