Skip to content

Commit

Permalink
Merge pull request #301 from SeanMooney/set-compute_id-permissions
Browse files Browse the repository at this point in the history
ensure /var/lib/nova/compute_id is owned by nova
  • Loading branch information
jistr authored Feb 22, 2024
2 parents 5130181 + bb315d8 commit b30e23e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs_user/modules/openstack-edpm_adoption.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ do
ssh \
-i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
root@"${computes[$name]}" \
"echo $uuid > /var/lib/nova/compute_id"
"echo $uuid | sudo tee /var/lib/nova/compute_id && sudo chown 42436:42436 /var/lib/nova/compute_id && sudo chcon -t container_file_t /var/lib/nova/compute_id"
done
----

Expand Down
6 changes: 3 additions & 3 deletions tests/roles/dataplane_adoption/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
when: edpm_encoded_privatekey is undefined

# Remove this when https://code.engineering.redhat.com/gerrit/q/topic:stable-compute-uuid
# is released in 17.x
# is released in 17.1.3. note that we use 42436:42436 as the nova user and group may not have
# been created yet, and we need to ensure the file is owned by the correct user and group
- name: Temporary fix to ensure stable compute UUID
block:
- name: ensure SSH key
Expand Down Expand Up @@ -75,8 +76,7 @@
ssh \
-i {{ edpm_privatekey_path | default("/tmp/ansible_private_key") }} \
{{ edpm_user }}@"${computes[$name]}" \
"echo $uuid | sudo tee /var/lib/nova/compute_id"
"echo $uuid | sudo tee /var/lib/nova/compute_id && sudo chown 42436:42436 /var/lib/nova/compute_id && sudo chcon -t container_file_t /var/lib/nova/compute_id"
done
- name: create dataplane-adoption-secret.yaml
Expand Down

0 comments on commit b30e23e

Please sign in to comment.