-
Notifications
You must be signed in to change notification settings - Fork 70
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
Support bootc #830
Support bootc #830
Changes from all commits
bee62ca
0ad4c88
8f703fe
f77e8eb
2e6ec67
5323ada
b0c5c6f
ee7c9a4
35944eb
3fa4be3
f1accda
201b673
dcbe803
e8ce9a6
d56b311
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
name: osp.edpm.edpm_kernel | ||
tags: | ||
- edpm_kernel | ||
when: not ansible_local.bootc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is the fact There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to figure out what we want this to look like still. I have just set Maybe we would need to change the default for it to |
||
- name: Import edpm_tuned | ||
ansible.builtin.import_role: | ||
name: osp.edpm.edpm_tuned | ||
|
@@ -53,9 +54,11 @@ | |
tasks_from: kernelargs.yml | ||
tags: | ||
- edpm_kernel | ||
when: not ansible_local.bootc | ||
- name: Configure KSM for kernel | ||
ansible.builtin.import_role: | ||
name: osp.edpm.edpm_kernel | ||
tasks_from: ksm.yml | ||
tags: | ||
- edpm_kernel | ||
when: not ansible_local.bootc |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,57 @@ | |
- name: Import FIPS tasks | ||
ansible.builtin.import_tasks: fips.yml | ||
when: edpm_bootstrap_fips_mode != 'check' | ||
|
||
- name: Execute bootstrap command | ||
ansible.builtin.import_tasks: bootstrap_command.yml | ||
|
||
- name: Import packages tasks | ||
ansible.builtin.import_tasks: packages.yml | ||
when: not ansible_local.bootc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to update this change based on the commit I made earlier to handle bootc. packages.yml is already included earlier at line 24 using the other variable I had used "bootc". So that needs to be undone so we can go forward with what you're proposing here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also should we switch this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also see that the only reason I believe this answers my earlier comment on |
||
|
||
- name: Set selinux state | ||
ansible.posix.selinux: | ||
policy: targeted | ||
state: "{{ edpm_bootstrap_selinux_mode }}" | ||
become: true | ||
|
||
- name: Stop NetworkManager from updating resolv.conf | ||
when: ( edpm_bootstrap_network_service == 'NetworkManager' ) and ( not edpm_bootstrap_network_resolvconf_update ) | ||
become: true | ||
block: | ||
- name: Set 'dns=none' in /etc/NetworkManager/NetworkManager.conf | ||
community.general.ini_file: | ||
path: /etc/NetworkManager/NetworkManager.conf | ||
state: present | ||
no_extra_spaces: true | ||
section: main | ||
option: dns | ||
value: none | ||
backup: true | ||
mode: '0644' | ||
- name: Set 'rc-manager=unmanaged' in /etc/NetworkManager/NetworkManager.conf | ||
community.general.ini_file: | ||
path: /etc/NetworkManager/NetworkManager.conf | ||
state: present | ||
no_extra_spaces: true | ||
section: main | ||
option: rc-manager | ||
value: unmanaged | ||
backup: true | ||
mode: '0644' | ||
- name: Reload NetworkManager | ||
ansible.builtin.systemd: | ||
name: NetworkManager | ||
state: reloaded | ||
|
||
- name: Stop dhclient from updating resolv.conf | ||
become: true | ||
ansible.builtin.copy: | ||
dest: /etc/dhcp/dhclient-enter-hooks | ||
mode: "0755" | ||
content: | | ||
#!/bin/sh | ||
make_resolv_conf() { : ; } | ||
|
||
- name: Configure swap | ||
ansible.builtin.import_tasks: swap.yml |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,25 @@ | |
- name: Configure tmpwatch on the host | ||
become: true | ||
block: | ||
- name: Create /var/lib/openstack | ||
ansible.builtin.file: | ||
path: "/var/lib/openstack" | ||
mode: 0755 | ||
state: directory | ||
owner: "{{ ansible_user }}" | ||
group: "{{ ansible_user }}" | ||
setype: "container_file_t" | ||
|
||
- name: Create /var/lib/openstack/cron | ||
ansible.builtin.file: | ||
path: "/var/lib/openstack/cron" | ||
mode: 0644 | ||
state: directory | ||
setype: "container_file_t" | ||
|
||
- name: Push script | ||
ansible.builtin.copy: | ||
dest: /usr/local/sbin/containers-tmpwatch | ||
dest: /var/lib/openstack/cron/containers-tmpwatch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
And 2. Which is this method of writing to |
||
owner: root | ||
group: root | ||
mode: "0755" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,20 @@ | |
logrotate_crond: "{{ lookup('template', 'logrotate_crond.yaml.j2') | from_yaml }}" | ||
edpm_container_standalone_kolla_config_files: | ||
logrotate_crond: "{{ lookup('file', 'files/logrotate_crond.yaml') | from_yaml }}" | ||
when: not ansible_local.bootc | ||
|
||
- name: Configure logrotate for bootc | ||
when: ansible_local.bootc | ||
become: true | ||
block: | ||
- name: Render kolla config file | ||
ansible.builtin.copy: | ||
src: files/logrotate_crond.yaml | ||
dest: /var/lib/kolla/config_files/logrotate_crond.json | ||
mode: 0644 | ||
|
||
- name: Manage logrotate crond containers | ||
ansible.builtin.systemd_service: | ||
name: edpm-compute@logrotate_crond | ||
enabled: true | ||
state: started | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to separate out this initial bootc support from the logically bound containers PR, openstack-k8s-operators/edpm-image-builder#39 This PR has a strong dep on the logically bound PR, and that complicates things. Let's just get a base bootc working with how we manage containers presently. We can move to logically bound and all the quadlet/systemd stuff as a next step. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, ok. Let's decouple them. I'll just submit a new PR to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will also need to guard the task
Download packages
fromroles/edpm_download_cache/tasks/main.yml
with the factto workaround this I dropped download-cache from my NodeSet services