Baremetal role not idempotent due an error 'Unable to remove "libvirtd"'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
Undecided
|
Maksim Malchuk |
Bug Description
The second run of the Baremetal role on the Ubuntu host failed with an error:
fatal: [seed0]: FAILED! => {
"changed": true,
"cmd": [
"-v",
"-R",
],
"delta": "0:00:00.081768",
"end": "2022-02-08 13:29:34.846945",
"invocation": {
"argv": null,
"warn": false
}
},
"msg": "non-zero return code",
"rc": 254,
"start": "2022-02-08 13:29:34.765177",
"stderr": "apparmor_parser: Unable to remove \"libvirtd\". Profile doesn't exist",
"stderr_lines": [
],
"stdout": "",
"stdout_lines": []
}
this is because the 'apparmor_parser -R' command removes the profile from the memory only.
We need to create the '/etc/apparmor.
Changed in kolla-ansible: | |
assignee: | nobody → Maksim Malchuk (mmalchuk) |
Changed in kolla-ansible: | |
status: | New → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /kolla- ansible/ +/824550 /opendev. org/openstack/ kolla-ansible/ commit/ 75f55d13ad9060b 7821a6e7702a347 debd785ee9
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 75f55d13ad9060b 7821a6e7702a347 debd785ee9
Author: Maksim Malchuk <email address hidden>
Date: Thu Jan 13 14:28:13 2022 +0300
Fix Apparmor libvirt profile removal
The apparmor_parser actually doesn't remove the file or doesn't create d/disable' itself so the next run of the
the symlink in '/etc/apparmor.
baremetal role will fail with the error "Unable to remove "libvirtd".
Even more after reboot, the profile is still active. We need to
disable the profile completly ourselves. This change fixes the
idempotents of the baremetal role.
Closes-Bug: #1960302 806886b1c9ea805 3b89778b4d1
Change-Id: I162e417387393e
Signed-off-by: Maksim Malchuk <email address hidden>