Upgrading undercloud from OSP12 to OSP13 fails when SSH directory SELinux contexts need correction
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Jose Luis Franco |
Bug Description
LP bug based on Bugzilla's https:/
Description of problem:
During an undercloud upgrade from OSP12 to OSP13, instack-undercloud attempts to ensure SELinux contexts are correct on the stack user's SSH directory. If corrections are required, it attempts to execute semanage as the user running the 'openstack undercloud upgrade' command and not root. This fails with a permisson error.
Version-Release number of selected component (if applicable):
instack-
How reproducible:
Create a file with incorrect SELinux context in /home/stack/.ssh and attempt to upgrade an undercloud from Pike to Queens
Actual results:
The upgrade fails with a permission issue running semanage.
Expected results:
The SELinux context should be corrected automatically and the upgrade should succeed.
Additional info:
2018-04-26 08:51:45,091 ERROR: semanage failed: ValueError: SELinux policy is not managed or store cannot be accessed.
2018-04-26 08:51:45,093 DEBUG: An exception occurred
Traceback (most recent call last):
File "/usr/lib/
_post_
File "/usr/lib/
_ensure_
File "/usr/lib/
_run_
File "/usr/lib/
env=
File "/usr/lib64/
raise CalledProcessEr
CalledProcessError: Command '['semanage', 'fcontext', '-a', '-t', 'ssh_home_t', '/home/
2018-04-26 08:51:45,099 ERROR:
#######
Undercloud upgrade failed.
Reason: Command '['semanage', 'fcontext', '-a', '-t', 'ssh_home_t', '/home/
See the previous output for details about what went wrong. The full install
log can be found at /home/stack/
#######
Changed in tripleo: | |
importance: | Undecided → High |
tags: | added: containers upgrade |
tags: | removed: containers |
Fix proposed to branch: master /review. openstack. org/564804
Review: https:/